Oxygine  1
2g game engine
Classes | Typedefs | Enumerations | Functions | Variables
oxygine Namespace Reference

–oxgl-end–! More...

Classes

class  Actor
 
class  AffineTransformT
 
class  AnimationFrame
 
class  AsyncTask
 
class  AsyncTaskEvent
 
class  Atlas
 
class  Atlas2
 
class  AtlasNode
 
class  AutoRefHolder
 
class  Box9Sprite
 
class  Button
 
class  ClipRectActor
 
class  ClipUV
 
class  Clock
 
class  Color
 
class  ColorRectSprite
 
class  CreateResourceContext
 
class  CreateTextureTask
 
class  creator
 
class  DebugActor
 
struct  deserializedata
 
struct  deserializeLinkData
 
class  Diffuse
 
class  Draggable
 
class  EmscSyncFsEvent
 
class  Event
 
class  EventDispatcher
 
class  Font
 
struct  glyph
 
struct  GlyphHasher
 
class  HitTestData
 
class  HttpRequestCocoaTask
 
class  HttpRequestEmscriptenTask
 
class  HttpRequestJavaTask
 
class  HttpRequestTask
 
class  HttpRequestTaskCURL
 
class  IElementRenderer
 
class  Image
 
class  ImageData
 
class  Input
 
class  InputText
 
class  intrusive_list
 
class  intrusive_list_item
 
class  intrusive_ptr
 
class  IVideoDriver
 
class  KeyEvent
 
class  LoadResourcesContext
 
class  LocalReferenceHolder
 
class  MaskedRenderer
 
class  MaskedSprite
 
class  Material
 
class  MatrixT
 
class  Mem2Native
 
class  MTLoadingResourcesContext
 
class  MultiAtlas
 
class  Mutex
 
class  MutexAutoLock
 
class  MutexPthreadLock
 
class  NativeTexture
 
class  NativeTextureGLES
 
class  NativeTextureNull
 
class  notFound
 
class  OBBox
 
class  Object
 
class  ObjectBase
 
struct  Pixel
 
class  PixelA8
 
class  PixelA8B8G8R8
 
class  PixelA8L8
 
class  PixelA8R8G8B8
 
class  PixelB5G6R5
 
class  PixelB8G8R8A8
 
class  PixelL8
 
class  PixelR4G4B4A4
 
class  PixelR5G5B5A1
 
class  PixelR5G6B5
 
class  PixelR8G8B8
 
class  PixelR8G8B8A8
 
class  PixelR8G8B8X8
 
class  PixelX8R8G8B8
 
class  PointerState
 
class  Polygon
 
class  PoolObject
 
class  PostProcess
 
class  PostProcessOptions
 
class  PPTask
 
class  ProgressBar
 
class  Property
 
class  Property0
 
class  Property2Args
 
class  Property2Args1Arg
 
class  Property2Args2
 
class  RectT
 
class  ref_counter
 
class  RefHolder
 
class  RenderState
 
class  RenderTargetsManager
 
class  ResAnim
 
class  ResAtlas
 
class  ResAtlasGeneric
 
class  ResAtlasPrebuilt
 
class  ResBuffer
 
class  ResFont
 
class  ResFontBM
 
class  Resource
 
class  Resources
 
class  ResourcesLoadOptions
 
class  ResStarlingAtlas
 
class  Restorable
 
class  RestoreResourcesContext
 
class  RState
 
class  Serializable
 
struct  serializedata
 
class  ShaderProgram
 
class  ShaderProgramGL
 
class  SingleResAnim
 
class  SingleThreadResourcesContext
 
class  SlidingActor
 
class  Sprite
 
class  Stage
 
class  STDMaterial
 
class  STDRenderer
 
class  TextField
 
class  TextStyle
 
class  Texture
 
class  ThreadDispatcher
 
class  ThreadLoader
 
class  TouchEvent
 
class  Tween
 
class  TweenAlphaFade
 
class  TweenAnim
 
class  TweenDummy
 
class  TweenEvent
 
class  TweenGlow
 
class  TweenObj
 
class  TweenOptions
 
class  TweenOutline
 
class  TweenPostProcess
 
class  TweenProxy
 
class  TweenQueue
 
class  TweenT
 
class  UberShaderProgram
 
class  UberShaderProgramBase
 
class  UpdateState
 
class  VectorT2
 
class  VectorT3
 
class  VectorT4
 
class  VertexDeclaration
 
class  VertexDeclarationGL
 
class  VertexDeclarations
 
struct  vertexP2C
 
struct  vertexPCT2
 
struct  vertexPCT2T2
 
struct  vertexPCT2T2T2
 
struct  vertexPT2
 
class  VideoDriverGL
 
class  VideoDriverGLES20
 
class  VideoDriverNull
 
class  VisualStyle
 
class  VStyleActor
 
class  WebImage
 
class  XmlWalker
 

Typedefs

typedef int timeMS
 
typedef AffineTransform Transform
 
typedef ThreadDispatcher ThreadMessages
 
typedef unsigned int bvertex_format
 
typedef bool(* cbLoadImageFromBuffer) (Image &mt, void *data, int nSize, bool premultiplied, TextureFormat format)
 
typedef AffineTransformT< float > AffineTransform
 
typedef MatrixT< float > Matrix
 
typedef MatrixT< double > MatrixD
 
typedef RectT< PointRect
 
typedef RectT< Vector2RectF
 
typedef VectorT2< float > Vector2
 
typedef VectorT2< double > VectorD2
 
typedef VectorT2< int > Point
 
typedef VectorT2< short > PointS
 
typedef VectorT3< float > Vector3
 
typedef VectorT3< double > VectorD3
 
typedef VectorT4< float > Vector4
 
typedef VectorT4< double > VectorD4
 
typedef Image MemoryTexture
 
typedef intrusive_ptr< ImagespMemoryTexture
 
typedef Closure< void(Event *ev)> EventCallback
 
typedef Closure< void(const RenderState &rs)> RenderCallback
 
typedef Closure< void(const UpdateState &us)> UpdateCallback
 
typedef int cloneOptions
 
typedef int copyOptions
 
typedef int eventType
 
typedef unsigned int dumpOptions
 
typedef unsigned int glyphOptions
 
typedef void * nativeTextureHandle
 
typedef unsigned char pointer_index
 
typedef std::vector< AnimationFrameanimationFrames
 
typedef void(* load_texture_hook) (const std::string &file, spNativeTexture nt, bool linearFilter, bool clamp2edge, LoadResourcesContext *load_context)
 
typedef void(* render_texture_hook) (const spNativeTexture &nt)
 
typedef std::vector< AnimationFrameframes
 

Enumerations

enum  TextureFormat {
  TF_UNDEFINED, TF_A8, TF_L8, TF_A8L8,
  TF_R8G8B8A8, TF_B8G8R8A8, TF_R8G8B8, TF_R5G5B5A1,
  TF_R4G4B4A4, TF_R5G6B5, TF_B5G6R5, TF_PVRTC_2RGB,
  TF_PVRTC_2RGBA, TF_PVRTC_4RGB, TF_PVRTC_4RGBA, TF_PVRTCII_2,
  TF_PVRTCII_4, TF_ETC1
}
 
enum  blend_mode {
  blend_disabled = 0, blend_premultiplied_alpha = MAKE_BLEND_MODE(ONE, ONE_MINUS_SRC_ALPHA), blend_alpha = MAKE_BLEND_MODE(SRC_ALPHA, ONE_MINUS_SRC_ALPHA), blend_add = MAKE_BLEND_MODE(ONE, ONE),
  blend_screen = MAKE_BLEND_MODE(ONE, ONE_MINUS_SRC_COLOR), blend_multiply = MAKE_BLEND_MODE(DST_COLOR, ONE_MINUS_SRC_ALPHA), blend_inverse = MAKE_BLEND_MODE(ONE_MINUS_DST_COLOR, ZERO)
}
 
enum  VertexFormatFlags {
  VERTEX_POSITION = 0x0001, VERTEX_COLOR = 0x0002, VERTEX_LAST_BIT = 8, USER_DATA_SIZE_BIT = VERTEX_LAST_BIT + 4,
  NUM_TEX_COORD_BIT = VERTEX_LAST_BIT + 7, TEX_COORD_SIZE_BIT = VERTEX_LAST_BIT + 10, USER_DATA_SIZE_MASK = (0x7 << USER_DATA_SIZE_BIT), NUM_TEX_COORD_MASK = (0x7 << NUM_TEX_COORD_BIT),
  TEX_COORD_SIZE_MASK = (0x7 << TEX_COORD_SIZE_BIT)
}
 
enum  ImageType {
  IT_UNKNOWN, IT_PNG, IT_PKM, IT_PVR2,
  IT_PVR, IT_TGA, IT_JPEG
}
 
enum  error_policy { ep_show_error, ep_show_warning, ep_ignore_error }
 
enum  MouseButton {
  MouseButton_Touch = 0, MouseButton_Left = 0, MouseButton_Middle = 1, MouseButton_Right = 2,
  MouseButton_Num = 3
}
 

Functions

 DECLARE_SMART (Actor, spActor)
 
spTween setTimeout (timeMS dur, const EventCallback &cb, spActor root=0)
 
Vector2 convert_local2stage (spActor child, const Vector2 &pos, spActor root=0)
 
Vector2 convert_local2stage (const Actor *child, const Vector2 &pos, const Actor *root=0)
 
Vector2 convert_stage2local (spActor child, const Vector2 &pos, spActor root=0)
 
Vector2 convert_stage2local (const Actor *child, const Vector2 &pos, const Actor *root=0)
 
bool testIntersection (spActor obj1, spActor obj2, spActor commonParent=0, Vector2 *contact=0)
 
RectF getActorTransformedDestRect (Actor *actor, const Transform &tr)
 
void reattachActor (spActor actor, spActor newParent, spActor root=0)
 
void decompose (const Transform &t, Vector2 &pos, float &angle, Vector2 &scale)
 
void setDecomposedTransform (spActor &a, const Transform &t)
 
 DECLARE_SMART (AsyncTask, spAsyncTask)
 
 DECLARE_SMART (Box9Sprite, spBox9Sprite)
 
 DECLARE_SMART (Button, spButton)
 
 DECLARE_SMART (ClipRectActor, spClipRectActor)
 
 DECLARE_SMART (Clock, spClock)
 
 DECLARE_SMART (ColorRectSprite, spColorRectSprite)
 
JNIEnv * jniGetEnv (void)
 
std::string jniGetString (JNIEnv *env, jstring jstr)
 
void jniGetStringArray (vector< std::string > &res, JNIEnv *env, jobjectArray jarray)
 
jobjectArray jniGetObjectStringArray (const vector< std::string > &src, JNIEnv *env)
 
jobject jniGetMainActivity ()
 
jclass jniGetMainActivityClass ()
 
void jniSetMainActivityClass (jclass)
 
int64 jniGetTimeUTCMS ()
 
std::string jniGetLanguage ()
 
std::string jniGetPackage ()
 
bool jniIsNetworkAvailable ()
 
int64 jniGetFreeSpace (const char *)
 
bool jniExit ()
 
void jniRestartApp ()
 
void jniMoveTaskToBack ()
 
void jniBrowse (const char *url)
 
void jniWriteBuffer2InternalStorageFile (const char *path, const char *data, size_t size)
 
jobject jniFindExtension (JNIEnv *env, jclass cl)
 
std::string jniGetProperty (const std::string &id)
 
 DECLARE_SMART (HttpRequestTaskCURL, spHttpRequestTaskCURL)
 
void emscSyncFS (bool read)
 
 DECLARE_SMART (NativeTextureGLES, spNativeTextureGLES)
 
void checkGLError ()
 
int getBytesPerPixel (TextureFormat tf)
 
const char * textureFormat2String (TextureFormat f)
 
TextureFormat string2TextureFormat (const char *str)
 
bool isCompressedFormat (TextureFormat tf)
 
template<class T , class U >
bool operator== (intrusive_ptr< T > const &a, intrusive_ptr< U > const &b)
 
template<class T , class U >
bool operator!= (intrusive_ptr< T > const &a, intrusive_ptr< U > const &b)
 
template<class T >
bool operator== (intrusive_ptr< T > const &a, T *b)
 
template<class T >
bool operator!= (intrusive_ptr< T > const &a, T *b)
 
template<class T >
bool operator== (T *a, intrusive_ptr< T > const &b)
 
template<class T >
bool operator!= (T *a, intrusive_ptr< T > const &b)
 
template<class T >
T * get_pointer (intrusive_ptr< T > const &p)
 
template<class T , class U >
intrusive_ptr< T > static_pointer_cast (intrusive_ptr< U > const &p)
 
template<class T , class U >
intrusive_ptr< T > const_pointer_cast (intrusive_ptr< U > const &p)
 
template<class T , class U >
intrusive_ptr< T > dynamic_pointer_cast (intrusive_ptr< U > const &p)
 
void _sessionConfigCommonInit (NSURLSessionConfiguration *config)
 
NSURLSession * _getDefaultSession ()
 
NSURLSession * _getEphemeralSession ()
 
bool nsImageLoad (Image &mt, void *pData, int nDatalen, bool premultiplied, TextureFormat format)
 
void iosGetMemoryUsage (size_t &a)
 
void iosNavigate (const char *)
 
int64 iosGetFreeDiskspace ()
 
 DECLARE_SMART (Image, spImage)
 
 DECLARE_SMART (NativeTexture, spNativeTexture)
 
 DECLARE_SMART (Object, spObject)
 
template<class dest , class src >
dest safeCast (src ptr)
 
template<class T , class U >
intrusive_ptr< T > safeSpCast (intrusive_ptr< U > const &p)
 
void * fastAlloc (size_t size)
 
void fastFree (void *data)
 
timeMS getTimeMS ()
 
int64 getTimeUTCMS ()
 
bool isNetworkAvailable ()
 
int64 getFreeSpace (const char *fullpath=0)
 
std::string getLanguage ()
 
void sleep (timeMS)
 
Pixel initPixel (unsigned int rgba)
 
Pixel initPixel (unsigned char r, unsigned char g, unsigned char b, unsigned char a)
 
void intrusive_ptr_add_ref (ref_counter *p)
 
void intrusive_ptr_release (ref_counter *p)
 
template<class V >
void fillQuadT (V *pv, const RectF &srcRect, const RectF &destRect, const AffineTransform &transform, unsigned int rgba)
 
template<class V >
void fillQuadZT (V *pv, const RectF &srcRect, const RectF &destRect, float Z, unsigned int rgba)
 
template<class V >
void fillQuadT2 (V *pv, const RectF &srcRect, const RectF &srcRect2, const RectF &destRect, const AffineTransform &transform, unsigned int rgba)
 
Matrix makeViewMatrix (int w, int h, bool flipU=false)
 
 DECLARE_SMART (Texture, spTexture)
 
unsigned int nextPOT (unsigned int v)
 
int vertexFlags (bvertex_format vertexFormat)
 
int numTextureCoordinates (bvertex_format vertexFormat)
 
int userDataSize (bvertex_format vertexFormat)
 
int texCoordSize (int stage, bvertex_format vertexFormat)
 
unsigned int getVertexSize (bvertex_format fmt)
 
 DECLARE_SMART (DebugActor, spDebugActor)
 
Vector2 convertPosUp (Actor *src, Actor *dest, const Vector2 &pos, bool direction)
 
Vector2 convertPosDown (Actor *src, Actor *dest, const Vector2 &pos, bool direction)
 
 DECLARE_SMART (EventDispatcher, spEventDispatcher)
 
 DECLARE_SMART (HttpRequestTask, spHttpRequestTask)
 
bool getImageInfo (const void *data, size_t size, const char *name, ImageType &type, int &width, int &height)
 
void setJpegImageLoader (cbLoadImageFromBuffer)
 
void setPngImageLoader (cbLoadImageFromBuffer)
 
void setCustomImageLoader (cbLoadImageFromBuffer)
 
template<class T >
initActor (T actor)
 
template<class T , class A1 >
initActor (T actor, const A1 &arg1)
 
template<class T , class A1 , class A2 >
initActor (T actor, const A1 &arg1, const A2 &arg2)
 
template<class T , class A1 , class A2 , class A3 >
initActor (T actor, const A1 &arg1, const A2 &arg2, const A3 &arg3)
 
template<class T , class A1 , class A2 , class A3 , class A4 >
initActor (T actor, const A1 &arg1, const A2 &arg2, const A3 &arg3, const A4 &arg4)
 
template<class T , class A1 , class A2 , class A3 , class A4 , class A5 >
initActor (T actor, const A1 &arg1, const A2 &arg2, const A3 &arg3, const A4 &arg4, const A5 &arg5)
 
template<class T , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 >
initActor (T actor, const A1 &arg1, const A2 &arg2, const A3 &arg3, const A4 &arg4, const A5 &arg5, const A6 &arg6)
 
template<class T , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 >
initActor (T actor, const A1 &arg1, const A2 &arg2, const A3 &arg3, const A4 &arg4, const A5 &arg5, const A6 &arg6, const A7 &arg7)
 
template<class T , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 >
initActor (T actor, const A1 &arg1, const A2 &arg2, const A3 &arg3, const A4 &arg4, const A5 &arg5, const A6 &arg6, const A7 &arg7, const A8 &arg8)
 
template<class T , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 >
initActor (T actor, const A1 &arg1, const A2 &arg2, const A3 &arg3, const A4 &arg4, const A5 &arg5, const A6 &arg6, const A7 &arg7, const A8 &arg8, const A9 &arg9)
 
 DECLARE_SMART (InputText, spInputText)
 
 DECLARE_SMART (MaskedSprite, spMaskedSprite)
 
Color lerp (const Color &a, const Color &b, float v)
 
template<class T >
lerp (T a, T b, float v)
 
 DECLARE_SMART (DragHandler, spDragHandler)
 
 DECLARE_SMART (Polygon, spPolygon)
 
 DECLARE_SMART (ProgressBar, spProgressBar)
 
 DECLARE_SMART (RenderTexture, spRenderTexture)
 
 DECLARE_SMART (ResAnim, spResAnim)
 
 DECLARE_SMART (ResBuffer, spResBuffer)
 
 DECLARE_SMART (ResFont, spResFont)
 
 DECLARE_SMART (Resource, spResource)
 
 DECLARE_SMART (STDMaterial, spSTDMaterial)
 
 DECLARE_SMART (SlidingActor, spSlidingActor)
 
 DECLARE_SMART (Sprite, spSprite)
 
 DECLARE_SMART (Stage, spStage)
 
 DECLARE_SMART (TextField, spTextField)
 
 DECLARE_SMART (ThreadLoader, spThreadLoader)
 
 DECLARE_SMART (Tween, spTween)
 
 DECLARE_SMART (TweenQueue, spTweenQueue)
 
 DECLARE_SMART (WebImage, spWebImage)
 
void handleErrorPolicy (error_policy ep, const char *format,...)
 
 DECLARE_SMART (TweenPostProcess, spTweenPostProcess)
 
void pass (spNativeTexture srcTexture, const Rect &srcRect, spNativeTexture destTexture, const Rect &destRect, const Color &color=Color::White)
 
RenderTargetsManagergetRTManager ()
 
void updatePortProcessItems ()
 
bool isRenderingPostProcessItems ()
 
void addPostProcessItem (PPTask *)
 
void removePostProcessItem (PPTask *)
 
void clearPostProcessItems ()
 
void set_load_texture_hook (load_texture_hook)
 
void load_texture_internal (const std::string &file, spNativeTexture nt, bool linearFilter, bool clamp2edge, LoadResourcesContext *load_context)
 
void setAttrV2 (pugi::xml_node node, const char *name, const Vector2 &v, const Vector2 &def)
 
template<class T >
void setAttr (pugi::xml_node node, const char *name, T v, T def)
 
const spStage & getStage ()
 
void set_render_texture_hook (render_texture_hook)
 
render_texture_hook get_render_texture_hook ()
 
std::string dumpStyle (const TextStyle &s, bool onlydiff)
 
template<typename GS >
TweenT< GS > * createTween (const GS &gs, timeMS duration, int loops=1, bool twoSides=false, timeMS delay=0, Tween::EASE ease=Tween::ease_linear)
 
template<typename GS >
TweenT< GS > * createTween2 (const GS &gs, const TweenOptions &opt)
 
std::string ease2String (Tween::EASE ease)
 
 DECLARE_SMART (TweenObj, spTweenObj)
 
void saveImage (const ImageData &im, const char *path, const char *format="tga")
 
 DECLARE_SMART (VStyleActor, spVStyleActor)
 

Variables

int _httpRequestTaskInitialized = 0
 
HttpRequests_cls = nil
 
NSURLSession * __defaultSession = nil
 
NSURLSession * __ephemeralSession = nil
 
const unsigned char lookupTable4to8 [] = {0, 17, 34, 51, 68, 85, 102, 119, 136, 153, 170, 187, 204, 221, 238, 255}
 
const unsigned char lookupTable5to8 [] = {0, 8, 16, 24, 32, 41, 49, 57, 65, 74, 82, 90, 98, 106, 115, 123, 131, 139, 148, 156, 164, 172, 180, 189, 197, 205, 213, 222, 230, 238, 246, 255}
 
const unsigned char lookupTable6to8 [] = {0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 68, 72, 76, 80, 85, 89, 93, 97, 101, 105, 109, 113, 117, 121, 125, 129, 133, 137, 141, 145, 149, 153, 157, 161, 165, 170, 174, 178, 182, 186, 190, 194, 198, 202, 206, 210, 214, 218, 222, 226, 230, 234, 238, 242, 246, 250, 255}
 
const int MAX_TOUCHES = 17
 
const int cloneOptionsDoNotCloneClildren = 0x01
 
const int cloneOptionsResetTransform = 0x02
 
const int TWEEN_COMPLETE_DT = std::numeric_limits<int>::max() / 2
 

Detailed Description

–oxgl-end–!

main oxygine namespace

Function Documentation

◆ emscSyncFS()

void oxygine::emscSyncFS ( bool  read)

will dispatch EmscSyncFsEvent to core::dispatcher

◆ getLanguage()

std::string oxygine::getLanguage ( )

returns locale. ISO 639-1

◆ getTimeMS()

timeMS oxygine::getTimeMS ( )

returns local app time in milliseconds (1sec = 1000ms). Counting starts from zero

◆ getTimeUTCMS()

int64 oxygine::getTimeUTCMS ( )

returns UTC time in milliseconds

◆ isNetworkAvailable()

bool oxygine::isNetworkAvailable ( )

is any network connection available?

◆ jniGetLanguage()

std::string oxygine::jniGetLanguage ( )

returns locale. ISO 639-1

◆ jniGetTimeUTCMS()

int64 oxygine::jniGetTimeUTCMS ( )

returns UTC time in MS

◆ makeViewMatrix()

Matrix oxygine::makeViewMatrix ( int  w,
int  h,
bool  flipU = false 
)

Returns View matrix where Left Top corner is (0,0), and right bottom is (w,h)

◆ reattachActor()

void oxygine::reattachActor ( spActor  actor,
spActor  newParent,
spActor  root = 0 
)

changes actor parent but with the same position on the screen

◆ saveImage()

void oxygine::saveImage ( const ImageData im,
const char *  path,
const char *  format = "tga" 
)

supported formats = "tga"

◆ sleep()

void oxygine::sleep ( timeMS  )

sleep for milliseconds