sio2.cc File Reference

#include "sio2.h"
#include "../lua/sio2_wrap.h"
#include "../lua/sio2_wrap.c"

Include dependency graph for sio2.cc:


Functions

void sio2InitGL (void)
void sio2InitAL (void)
void sio2ErrorGL (const char *_fname, const char *_funct, unsigned int _line)
void sio2ErrorAL (const char *_fname, const char *_funct, unsigned int _line)
void sio2Error (const char *_fname, const char *_funct, unsigned int _line, const char *_type, const char *_fmt,...)
void sio2InitLUA (void)
int sio2ExecLUA (char *_code)
void sio2ResetState (void)
void sio2ShutdownAL (void)
void sio2ShutdownLUA (void)
void sio2ResetLUA (void)
void sio2InitWidget (void)
void sio2ShutdownWidget (void)
bool sio2PhysicContactCallback (btManifoldPoint &cp, const btCollisionObject *colObj0, int partId0, int index0, const btCollisionObject *colObj1, int partId1, int index1)
size_t sio2OggRead (void *_ptr, size_t _size, size_t _read, void *_SIO2stream)
int sio2OggSeek (void *_SIO2stream, ogg_int64_t _offset, int _stride)

Variables

SIO2sio2 = NULL
 The global SIO2 handle.

Function Documentation

void sio2Error ( const char _fname,
const char _funct,
unsigned int  _line,
const char _type,
const char _fmt,
  ... 
)

Helper function to create your own C/C++ error check.

References SIO2_MAX_PATH, and sio2StringLen().

Here is the call graph for this function:

void sio2ErrorAL ( const char _fname,
const char _funct,
unsigned int  _line 
)

void sio2ErrorGL ( const char _fname,
const char _funct,
unsigned int  _line 
)

Helper function to check if there's a OpenGL error.

References SIO2_MAX_CHAR, and sio2StringCpy().

Here is the call graph for this function:

int sio2ExecLUA ( char _code  ) 

Inject and execute some LUA code.

_code: Some valid LUA code.

return the error number if any.

References SIO2::_lua_State.

void sio2InitAL ( void   ) 

Initialize OpenAL.

References SIO2::_ov_callbacks, SIO2::context, SIO2::device, sio2ErrorAL(), sio2OggClose(), sio2OggRead(), sio2OggSeek(), and sio2OggTell().

Here is the call graph for this function:

void sio2InitGL ( void   ) 

Initialize the SIO2 default OpenGL machine state.

References SIO2::_SIO2state, SIO2_CULL_FACE, SIO2_DEPTH_TEST, SIO2_VERTEX_ARRAY, and sio2StateEnable().

Here is the call graph for this function:

void sio2InitLUA ( void   ) 

Initialize a new LUA virtual machine.

References SIO2::_lua_State, SIO2_MAX_CHAR, sio2StringCpy(), sio2StringLen(), and sio2StringToUpper().

Here is the call graph for this function:

void sio2InitWidget ( void   ) 

Initialize the widget system. Basically simply create 2 VBO of a centered quads and a bottom left aligned quad that will be reuse for every widget as a template.

References SIO2::wid.

size_t sio2OggRead ( void *  _ptr,
size_t  _size,
size_t  _read,
void *  _SIO2stream 
)

The OGG read callback.

References SIO2stream::buf, SIO2stream::pos, and SIO2stream::size.

Referenced by sio2InitAL().

int sio2OggSeek ( void *  _SIO2stream,
ogg_int64_t  _offset,
int  _stride 
)

The OGG seek callback.

References SIO2stream::pos, and SIO2stream::size.

Referenced by sio2InitAL().

bool sio2PhysicContactCallback ( btManifoldPoint &  cp,
const btCollisionObject *  colObj0,
int  partId0,
int  index0,
const btCollisionObject *  colObj1,
int  partId1,
int  index1 
)

Bullet Physic, collision callback. Usually initialize by SIO2sensor. But if you are not using sensor and want to override this function with your own, you can simply assign the gContactCallback yourself. Please take note that this can only be used for dynamic object, since static object will not add a contact point.

References SIO2sensor::_SIO2object0, SIO2sensor::_SIO2object1, SIO2::_SIO2resource, SIO2resource::_SIO2sensor, SIO2sensor::_SIO2sensorcontact, and SIO2resource::n_sensor.

Referenced by sio2SensorInitContact().

void sio2ResetLUA ( void   ) 

Reset the LUA virtual machine to its default state.

References SIO2::_lua_State, and sio2ShutdownLUA().

Here is the call graph for this function:

void sio2ResetState ( void   ) 

Reset the SIO2 global variables to a default state. This function should be called everytime after you load stuff from a .SIO2 file.

References SIO2::_SIO2camera, SIO2::_SIO2constraint, SIO2::_SIO2font, SIO2::_SIO2image, SIO2::_SIO2ipo, SIO2::_SIO2ipocurve, SIO2::_SIO2lamp, SIO2::_SIO2material, SIO2::_SIO2object, SIO2::_SIO2vertexgroup, and SIO2_MATERIAL_MAX_CHANNEL.

void sio2ShutdownAL ( void   ) 

Shutdown OpenAL.

References SIO2::context, SIO2::device, and sio2ErrorAL().

Here is the call graph for this function:

void sio2ShutdownLUA ( void   ) 

References SIO2::_lua_State.

Referenced by sio2ResetLUA().

void sio2ShutdownWidget ( void   ) 

Shutdown the widget system. Basically flushing the widget template VBO.

References SIO2::wid.


Variable Documentation

SIO2* sio2 = NULL

The global SIO2 handle.

Referenced by sio2ActionFree(), sio2ActionInit(), sio2ActionLoad(), sio2CameraFree(), sio2CameraInit(), sio2CameraLoad(), sio2ConstraintFree(), sio2ConstraintInit(), sio2ConstraintLoad(), sio2EmitterFree(), sio2EmitterInit(), sio2EmitterRender(), sio2EmitterReset(), sio2FontFree(), sio2FontInit(), sio2FontPrint(), sio2FontReset(), sio2GetElapsedTime(), sio2ImageFree(), sio2ImageGenId(), sio2ImageInit(), sio2IpoFree(), sio2IpoInit(), sio2IpoLoad(), sio2LampDisableLighting(), sio2LampEnableLighting(), sio2LampFree(), sio2LampInit(), sio2LampLoad(), sio2LampRender(), sio2LampReset(), sio2MaterialFree(), sio2MaterialInit(), sio2MaterialLoad(), sio2MaterialRender(), sio2MaterialReset(), sio2MistFree(), sio2MistInit(), sio2MistRender(), sio2MistReset(), sio2ObjectBindVBO(), sio2ObjectFree(), sio2ObjectInit(), sio2ObjectLoad(), sio2ObjectRender(), sio2ObjectReset(), sio2PhysicFree(), sio2PhysicInit(), sio2ResourceBindAllSounds(), sio2ResourceDispatchStream(), sio2ResourceOpen(), sio2ResourceUnload(), sio2ScriptCompile(), sio2ScriptFree(), sio2ScriptGetError(), sio2ScriptInit(), sio2SensorFree(), sio2SensorInitCollision(), sio2SensorInitContact(), sio2SensorInitDistance(), sio2SensorInitRay(), sio2SoundBufferFree(), sio2SoundBufferGenId(), sio2SoundBufferInit(), sio2SoundFree(), sio2SoundInit(), sio2StreamOpen(), sio2TimerFree(), sio2TimerInit(), sio2UrlFree(), sio2UrlInit(), sio2VertexGroupRender(), sio2VideoFree(), sio2VideoInit(), sio2WidgetDebug(), sio2WidgetFree(), sio2WidgetInit(), and sio2WidgetRender().


Generated on Thu Mar 4 15:41:42 2010 for SIO2 Engine by  doxygen 1.5.6