Table of Contents
OMA
  • OMAvoid omaBindChunk(OMAuint Chunk)
    • Sets Chunk as the currently bound chunk.
  • OMAvoid omaChunkDataf(OMAenum Type, OMAuint Index, OMAfloat Value)
    • Type must be one of:
      • OMA_DATA
        • The currently bound chunk's type must be one of:
          • OMA_FLOAT
            • Sets the floating point number at Index to Value.
  • OMAvoid omaChunkDatafv(OMAenum Type, OMAuint Index, OMAsizei Count, const OMAfloat *Value)
    • Type must be one of:
      • OMA_DATA
        • The currently bound chunk's type must be one of:
          • OMA_FLOAT
            • Sets Index and the following Count floating point numbers to the values stored in the array at Value.
          • OMA_FLOAT2
            • Sets Index and the following Count floating point number pairs to the values stored in the array at Value.
          • OMA_FLOAT3
            • Sets Index and the following Count floating point number tuples to the values stored in the array at Value.
          • OMA_FLOAT4
            • Sets Index and the following Count floating point number quads to the values stored in the array at Value.
          • OMA_QUAT
            • Sets Index and the following Count quaternions to the values stored in the array at Value.
            • The quaternion is stored in "W, X, Y, Z" format.
          • OMA_MATRIX
            • Sets Index and the following Count matrices to the values stored in the array at Value.
            • The matrix is stored in column major format:
              	[ 0][ 4][ 8][12]
              	[ 1][ 5][ 9][13]
              	[ 2][ 6][10][14]
              	[ 3][ 7][11][15]
              	
  • OMAvoid omaChunkDatai(OMAenum Type, OMAuint Index, OMAint Value)
    • Type must be one of:
      • OMA_DATA
        • The currently bound chunk's type must be one of:
          • OMA_INT
            • The currently selected chunk must be of type OMA_INT.
            • Sets the integer at Index.
      • OMA_INDICES
        • The currently bound chunk's type must be one of:
          • OMA_FRAME
            • Sets the ID of the chunk the frame at Index uses for indices to Value.
      • OMA_GEOMETRY
        • The currently bound chunk's type must be one of:
          • OMA_FRAME
            • Sets the enum of the type of the data used by the frame at Index to Value.
            • The type will be one of:
              • OMA_TRIANGLES
              • OMA_TRIANGLE_STRIP
              • OMA_TRIANGLE_FAN
              • OMA_QUADS
              • OMA_QUAD_STRIP
              • OMA_LINES
              • OMA_LINE_LOOP
              • OMA_LINE_STRIP
              • OMA_POLYGON
              • OMA_POINTS
      • OMA_VERTICES
        • The currently bound chunk's type must be one of:
          • OMA_FRAME
            • Sets the ID of the chunk the frame at Index uses for vertices to Value.
      • OMA_TEXTURE_COORDS
        • The currently bound chunk's type must be one of:
          • OMA_FRAME
            • Sets the ID of the chunk the frame at Index uses for texture coordinates to Value (use 0 if it uses none).
      • OMA_NORMALS
        • The currently bound chunk's type must be one of:
          • OMA_FRAME
            • Sets the ID of the chunk the frame at Index uses for normals to Value (use 0 if it uses none).
      • OMA_COLORS
        • The currently bound chunk's type must be one of:
          • OMA_FRAME
            • Sets the ID of the chunk the frame at Index uses for colors to Value (use 0 if it uses none).
          • OMA_LIGHT
            • Sets the ID of the chunk the light at Index uses for colors to Value (use 0 if it uses none).
      • OMA_FRAME
        • The currently bound chunk's type must be one of:
          • OMA_OBJECT
            • Sets of the ID of the chunk the object uses for its frame to Value.
      • OMA_INDEX
        • The currently bound chunk's type must be one of:
          • OMA_OBJECT
            • Sets of the index of the frame the object uses to Value.
      • OMA_MATERIAL
        • The currently bound chunk's type must be one of:
          • OMA_OBJECT
            • Sets the ID of the chunk the object uses for its material to Value.
          • OMA_KEYFRAME
            • Sets the ID of the chunk the key frame animation uses for its material(s) to Value.
      • OMA_DURATIONS
        • The currently bound chunk's type must be one of:
          • OMA_KEYFRAME
            • Sets the ID of the chunk the key frame animation uses for durations to Value.
      • OMA_FRAMES
        • The currently bound chunk's type must be one of:
          • OMA_KEYFRAME
            • Sets of the ID of the chunk the key frame animation uses for its frames to Value.
      • OMA_TRANSITION
        • The currently bound chunk's type must be one of:
          • OMA_KEYFRAME
            • Sets the enum of the type of the transition used by the key frame animation to Value.
            • The type will be one of:
              • OMA_ROUND_DOWN
              • OMA_ROUND_UP
              • OMA_ROUND_NEAREST
              • OMA_LINEAR_INTERPOLATION
              • OMA_CUBIC_INTERPOLATION
              • OMA_TRIANGLES
  • OMAvoid omaChunkDataiv(OMAenum Type, OMAuint Index, OMAsizei Count, const OMAint *Value)
    • Type must be one of:
      • OMA_DATA
        • The currently bound chunk's type must be one of:
          • OMA_INT
            • Sets Index and the following Count integers to the values stored in the array at Value.
  • OMAvoid omaChunkDataub(OMAenum Type, OMAuint Index, OMAubyte Value)
    • Type must be one of:
      • OMA_DATA
        • The currently bound chunk's type must be one of:
          • OMA_TEXT
            • Sets the byte at Index to Value.
  • OMAvoid omaChunkDataubv(OMAenum Type, OMAuint Index, OMAsizei Count, const OMAubyte *Value)
    • Type must be one of:
      • OMA_DATA
        • The currently bound chunk's type must be one of:
          • OMA_TEXT
            • Sets Index and the following Count bytes to the values stored in the array at Value.
  • OMAvoid omaDeleteChunks(OMAsizei Count, OMAuint *Chunks)
    • Frees the memory of Count chunks found in the contiguous buffer Chunks.
  • OMAvoid omaGenChunks(OMAsizei Count, OMAuint *Chunks)
    • Fills the array at Chunks with the ID's of up to Count chunks from the queue.
  • OMAboolean omaGetBoolean(OMAenum What)
    • No uses at this time.
  • OMAvoid omaGetBooleanv(OMAenum What, OMAboolean *)
    • See omaGetBoolean.
  • OMAfloat omaGetChunkf(OMAenum Type, OMAuint)
    • Type must be one of:
      • OMA_DATA
        • The currently bound chunk's type must be one of:
          • OMA_FLOAT
            • Returns the float value at Index.
  • const OMAfloat *omaGetChunkfv(OMAenum Type, OMAuint Index)
    • Type must be one of:
      • OMA_DATA
        • The currently bound chunk's type must be one of:
          • OMA_FLOAT
            • Returns a pointer to the float at Index.
          • OMA_FLOAT2
            • Returns a pointer to the float pair at Index.
          • OMA_FLOAT3
            • Returns a pointer to the float tuple at Index.
          • OMA_FLOAT4
            • Returns a pointer to the float quad at Index.
          • OMA_QUAT
            • Returns a pointer to the quaternion at Index.
            • The quaternion is stored in "W, X, Y, Z" format.
          • OMA_MATRIX
            • Returns a pointer to the matrix at Index.
            • The matrix returned is stored in column major format:
              	[ 0][ 4][ 8][12]
              	[ 1][ 5][ 9][13]
              	[ 2][ 6][10][14]
              	[ 3][ 7][11][15]
              	
  • OMAint omaGetChunki(OMAenum Type, OMAuint Index)
    • Type must be one of:
      • OMA_DATA
        • The currently bound chunk's type must be one of:
          • OMA_INT
            • Returns the integer at Index.
      • OMA_INDICES
        • The currently bound chunk's type must be one of:
          • OMA_FRAME
            • Returns the ID of the chunk the frame at Index uses for indices or 0 if it uses none.
      • OMA_GEOMETRY
        • The currently bound chunk's type must be one of:
          • OMA_FRAME
            • Returns the enum of the type of the data used by the frame at Index.
            • The type will be one of:
              • OMA_TRIANGLES
              • OMA_TRIANGLE_STRIP
              • OMA_TRIANGLE_FAN
              • OMA_QUADS
              • OMA_QUAD_STRIP
              • OMA_LINES
              • OMA_LINE_LOOP
              • OMA_LINE_STRIP
              • OMA_POLYGON>
              • OMA_POINTS
      • OMA_VERTICES
        • The currently bound chunk's type must be one of:
          • OMA_FRAME
            • Returns the ID of the chunk the frame at Index uses for vertices or 0 if it uses none.
      • OMA_TEXTURE_COORDS
        • The currently bound chunk's type must be one of:
          • OMA_FRAME
            • Returns the ID of the chunk the frame at Index uses for texture coordinates or 0 if it uses none.
      • OMA_NORMALS
        • The currently bound chunk's type must be one of:
          • OMA_FRAME
            • Returns the ID of the chunk the frame at Index uses for normals or 0 if it uses none.
      • OMA_COLORS
        • The currently bound chunk's type must be one of:
          • OMA_FRAME
            • Returns the ID of the chunk the frame at Index uses for colors or 0 if it uses none.
          • OMA_LIGHT
            • Returns the ID of the chunk the light at Index uses for colors or 0 if it uses none.
      • OMA_FRAME
        • The currently bound chunk's type must be one of:
          • OMA_OBJECT
            • Returns the index of the frame to use in the frame chunk selected.
      • OMA_INDEX
        • The currently bound chunk's type must be one of:
          • OMA_OBJECT
            • Returns the ID of the chunk the key frame animation uses for durations or 0 if it uses none.
      • OMA_INDEX
        • The currently bound chunk's type must be one of:
          • OMA_OBJECT
            • Returns the index of the frame to use in the frame chunk selected.
      • OMA_MATERIAL
        • The currently bound chunk's type must be one of:
          • OMA_OBJECT
            • Returns the ID of the chunk the object uses for its material(s) or 0 if it uses none.
          • OMA_KEYFRAME
            • Returns the ID of the chunk the key frame animation uses for its material(s) or 0 if it uses none.
      • OMA_DURATIONS
        • The currently bound chunk's type must be one of:
          • OMA_KEYFRAME
            • Returns the ID of the chunk the key frame animation uses for durations or 0 if it uses none.
      • OMA_FRAMES
        • The currently bound chunk's type must be one of:
          • OMA_KEYFRAME
            • Returns of the ID of the chunk the key frame animation uses for its frame.
      • OMA_GEOMETRY
        • The currently bound chunk's type must be one of:
          • OMA_KEYFRAME
            • Returns the enum of the type of transition used by the keyframe.
            • The type will be one of:
              • OMA_ROUND_DOWN
              • OMA_ROUND_UP
              • OMA_ROUND_NEAREST
              • OMA_LINEAR_INTERPOLATION
              • OMA_CUBIC_INTERPOLATION
              • OMA_TRIANGLES
  • const OMAint *omaGetChunkiv(OMAenum Type, OMAuint Index)
    • Type must be one of:
      • OMA_DATA
        • The currently bound chunk's type must be one of:
          • OMA_INT
            • Returns a pointer to the integer at Index.
  • OMAubyte omaGetChunkub(OMAenum Type, OMAuint Index)
    • Type must be one of:
      • OMA_DATA
        • The currently bound chunk's type must be one of:
          • OMA_TEXT
            • Returns the byte at Index.
  • const OMAubyte *omaGetChunkubv(OMAenum Type, OMAuint Index)
    • Type must be one of:
      • OMA_DATA
        • The currently bound chunk's type must be one of:
          • OMA_TEXT
            • Returns a pointer to the byte at Index.
  • OMAvoid omaGetDoublev(OMAenum What, OMAdouble *)
    • No uses at this time.
  • OMAenum omaGetError(OMAvoid)
    • Returns the first error that has occured since the last call to omaGetError.
    • The returned error code must be one of:
      • OMA_NO_ERROR (guaranteed to be 0)
      • OMA_INVALID_ENUM
      • OMA_OUT_OF_MEMORY
      • OMA_INTERNAL_ERROR
      • OMA_FILE_IO_ERROR
      • OMA_NOT_IMPLEMENTED
      • OMA_INVALID_CHUNK_TYPE
      • OMA_NO_CHUNK
      • OMA_INVALID_VALUE
  • OMAvoid omaGetFloatv(OMAenum What, OMAfloat *)
    • No uses at this time.
  • OMAint omaGetInteger(OMAenum What)
    • What must be one of:
      • OMA_CHUNK_BINDING
        • Returns the ID of the chunk currently selected.
      • OMA_CHUNK_STACK_DEPTH
        • Returns the number of chunks pushed onto the chunk stack.
      • OMA_CHUNK_TYPE
        • Returns the type of the chunk currently selected.
        • The type will be one of:
          • OMA_TEXT
          • OMA_INT
          • OMA_FLOAT
          • OMA_FLOAT2
          • OMA_FLOAT3
          • OMA_FLOAT4
          • OMA_SET
          • OMA_QUAT
          • OMA_MATRIX
          • OMA_FRAME
          • OMA_OBJECT
          • OMA_KEYFRAME
          • OMA_EXTENSION
      • OMA_CHUNK_ELEM_COUNT
        • Returns the number of elements in the chunk currently selected.
      • OMA_CHUNK_ELEM_SIZE
        • Returns the size of each element in the chunk currently selected.
      • OMA_CHUNKS_READ
        • Returns the number of chunks read in the last load call.
      • OMA_CHUNKS_GENED
        • Returns the number of chunks 'gened' in the last omaGenChunks call.
      • OMA_CHUNKS_WAITING
        • Returns the number of chunks in the queue.
      • OMA_BYTES_READ
        • Returns the number of bytes read in the last load call.
  • OMAvoid omaGetIntegerv(OMAenum What, OMAint *)
    • See omaGetInteger.
  • OMAvoid *omaGetProcAddress(const OMAubyte *ProcName)
    • Returns the address of the function specified.
  • const OMAubyte *omaGetString(OMAenum What)
    • What must be one of:
      • OMA_VERSION
        • Returns a NULL terminated string in the format of "x.x.x" (containing the version of OMA in use) possibly followed by a space and miscellaneous data.
      • OMA_VENDOR
        • Returns a free formatted (but NULL terminated) string of the vendor.
        >
      • OMA_EXTENSIONS
        • Returns a white space seperated, NULL terminated string of extention chunks supported.
        • Each extension name will be in the following form (name can contain underscores, 'src' cannot):
          • OMA_src_name
  • OMAvoid omaInit(OMAvoid)
    • Call this once at startup before any other oma* functions.
  • OMAvoid omaLoadBuffer(OMAenum ModelType, const OMAubyte *Buffer, OMAsizei Size, OMAsizei *ChunksLoaded)
    • Call this to load the file specified as queued chunks.
    • ModelType must be one of:
      • OMA_LOAD_3DS
      • OMA_LOAD_OMA
      • OMA_LOAD_OMX
      • OMA_LOAD_WFOBJ
    • Buffer is a portion of memory containing the data of the model with a size of at least Size.
    • If not NULL, ChunksLoaded will point to an OMAsizei that will be filled with the number of chunks found and queued in the file.
  • OMAvoid omaLoadPath(OMAenum ModelType, const OMAubyte *Path, OMAsizei *ChunksLoaded)
    • Call this to load the file specified as queued chunks.
    • ModelType must be one of:
      • OMA_LOAD_3DS
      • OMA_LOAD_OMA
      • OMA_LOAD_OMX
      • OMA_LOAD_WFOBJ
    • Path is a NULL terminated string that refers to a file in a format appropriate to the specific platform.
    • If not NULL, ChunksLoaded will point to an OMAsizei that will be filled with the number of chunks found and queued in the file.
  • OMAvoid omaPopChunk(OMAvoid)
    • Pops the chunk at the top of the chunk stack and makes it the currently bound chunk.
  • OMAvoid omaPushChunk(OMAvoid)
    • Pushes the currently bound chunk on to the top of the chunk stack.
  • OMAvoid omaQueueChunk(OMAsizei Count, OMAenum Type, OMAuint *ID)
    • Places a chunk in the queue and returns its eventual ID in the OMAuint pointed to by ID.
    • Count is the number of type Type items to create.
    • Type must be one of:
      • OMA_TEXT
      • OMA_INT
      • OMA_FLOAT
      • OMA_FLOAT2
      • OMA_FLOAT3
      • OMA_FLOAT4
      • OMA_SET
      • OMA_QUAT
      • OMA_MATRIX
      • OMA_FRAME
      • OMA_OBJECT
      • OMA_KEYFRAME
      • OMA_EXTENSION
    • All ID numbers stored in the items of type Type are initialized to 0. No other data is initialized.
  • OMAvoid omaResizeChunk(OMAenum How, OMAsizei Count, OMAuint Index)
    • The currently bound chunk is resized to be Count items.
    • The state of the 'new' data is determined by How:
      • OMA_RESIZE_DISCARD
        All of the new data is like it would be after being created by omaQueueChunk.
      • OMA_RESIZE_PRESERVE
        The new data's first OldCount (the Count before calling omaResizeChunk) minus Index items are set to the old data's Index through (up to) the old data's last item. Any new data is like it would be after being created by omaQueueChunk.
    • Index must be 0 unless How is one of:
      • OMA_RESIZE_PRESERVE
    • This function cannot be used with 'single item' chunks such as OMA_KEYFRAME and OMA_OBJECT.
  • OMAvoid omaShutdown(OMAvoid)
    • Call this once after you're done with all other oma* functions.
  • OMAvoid omaSubstituteChunk(OMAsizei Count, OMAenum Type)
    • Replaces a currently valid chunk ID with a new chunk without queueing the ID.
    • Count is the number of type Type items to create.
    • Type must be one of:
      • OMA_TEXT
      • OMA_INT
      • OMA_FLOAT
      • OMA_FLOAT2
      • OMA_FLOAT3
      • OMA_FLOAT4
      • OMA_SET
      • OMA_QUAT
      • OMA_MATRIX
      • OMA_FRAME
      • OMA_OBJECT
      • OMA_KEYFRAME
      • OMA_EXTENSION
    • All ID numbers stored in the items of type Type are initialized to 0. No other data is initialized.
Top
OMAU
  • OMAenum omauGetError(OMAvoid)
    • Returns the first error that has occured since the last call to omauGetError.
    • The returned error code must be one of:
      • OMAU_NO_ERROR (guaranteed to be 0)
      • OMAU_OMA_ERROR
      • OMAU_INVALID_ENUM
      • OMAU_INVALID_CHUNK_TYPE
      • OMAU_OUT_OF_MEMORY
  • OMAvoid omauConvertChunk(OMAenum Type, OMAenum How, const OMAvoid *Data)
    • Attempts to convert the currently bound chunk to a chunk of type Type.
    • How must be one of:
      • OMAU_CONVERT_TRUNCATE
        For use when Type is smaller than the bound chunk's current type. The extra data of each item is simply dropped.
      • OMAU_CONVERT_REPLICATE
        For use when Type is larger than the bound chunk's current type. The extra space will be filled with repetitions of the original item's data.
      • OMAU_CONVERT_FILL
        For use when Type is larger than the bound chunk's current type. The extra space will be filled with Data:
        Name Byte Size Type
        Data sizeof(Type - OldType) Depends on Type
      • OMAU_CONVERT_TEST
        For use when Type is larger than the bound chunk's current type. The extra space will be filled with E if the equality test with VALUE passes within Tolerance, or NE if it fails. The Data is layed out like this:
        Name Byte Size Type
        E (Equal) sizeof(Type - OldType) Depends on Type
        NE (Not Equal) sizeof(Type - OldType) Depends on Type
        Value sizeof(Type) Depends on Type
        Tolerance sizeof(OMAfloat) Depends on OldType
    • Data should be NULL, unless How is one of (see above for information on what Data is filled with):
      • OMAU_CONVERT_FILL
      • OMAU_CONVERT_TEST
    • Note: If Type and the type of the currently bound chunk are the same, omauConvertChunk will return immediately and successfully.
    • Note: currently, the bound chunk must be an OMA_FLOAT, OMA_FLOAT2, OMA_FLOAT3, or OMA_FLOAT4 to use this function. This should change in the future.
Top
OMAUT
  • OMAenum omautGetError(OMAvoid)
    • Returns the first error that has occured since the last call to omautGetError.
    • The returned error code must be one of:
      • OMAUT_NO_ERROR (guaranteed to be 0)
      • OMAUT_GL_ERROR
      • OMAUT_OMA_ERROR
      • OMAUT_OMAU_ERROR
      • OMAUT_INVALID_CHUNK_TYPE
  • OMAvoid omautGLBindColorArray(OMAvoid)
    • Binds the current bound chunk as a color array in OpenGL.
    • This overwrites certain client states in OpenGL. Use glPushClientAttrib with GL_CLIENT_VERTEX_ARRAY_BIT before calling omautGLBindColorArray and glPopClientAttrib afterwards to prevent this.
    • Note: currently, the bound chunk must be an OMA_FLOAT3 or OMA_FLOAT4 to use this function.
  • OMAvoid omautGLBindFrame(OMAuint Index, OMAsizei *Count, const OMAuint **Indices, OMAuint *Type)
    • Binds the current bound OMA_FRAME chunk at Index as vertex arrays in OpenGL, and passes back a number of elements in Count, indices in Indices (NULL for no indices), and the GLenum of the primitive type in Type.
    • This overwrites certain client states in OpenGL. Use glPushClientAttrib with GL_CLIENT_VERTEX_ARRAY_BIT before calling omautGLBindModel and glPopClientAttrib afterwards to prevent this.
    • Note: only available if OpenGL headers and libraries are present when building OMAUT.
    • Note: at this time, this function does not support multitexturing. All texture operations are taken against the current texture unit.
  • OMAvoid omautGLBindObject(OMAsizei *Count, const OMAuint **Indices, OMAuint *Type)
    • Binds the current bound OMA_OBJECT chunk as vertex arrays in OpenGL, and passes back a number of elements in Count, indices in Indices (NULL for no indices), and the GLenum of the primitive type in Type.
    • This overwrites certain client states in OpenGL. Use glPushClientAttrib with GL_CLIENT_VERTEX_ARRAY_BIT before calling omautGLBindModel and glPopClientAttrib afterwards to prevent this.
    • Note: only available if OpenGL headers and libraries are present when building OMAUT.
    • Note: at this time, this function does not support multitexturing. All texture operations are taken against the current texture unit.
  • OMAvoid omautGLBindNormalArray(OMAvoid)
    • Binds the current bound chunk as a normal array in OpenGL.
    • This overwrites certain client states in OpenGL. Use glPushClientAttrib with GL_CLIENT_VERTEX_ARRAY_BIT before calling omautGLBindNormalArray and glPopClientAttrib afterwards to prevent this.
    • Note: currently, the bound chunk must be an OMA_FLOAT3 to use this function.
  • OMAvoid omautGLBindTexCoordArray(OMAvoid)
    • Binds the current bound chunk as a texcoord array in OpenGL.
    • This overwrites certain client states in OpenGL. Use glPushClientAttrib with GL_CLIENT_VERTEX_ARRAY_BIT before calling omautGLBindTexCoordArray and glPopClientAttrib afterwards to prevent this.
    • Note: currently, the bound chunk must be an OMA_FLOAT, OMA_FLOAT2, OMA_FLOAT3, or OMA_FLOAT4 to use this function.
    • Note: at this time, this function does not go out of its way to support multitexturing at all. It will bind against the current texture unit.
  • OMAvoid omautGLBindVertexArray(OMAvoid)
    • Binds the current bound chunk as a vertex array in OpenGL.
    • This overwrites certain client states in OpenGL. Use glPushClientAttrib with GL_CLIENT_VERTEX_ARRAY_BIT before calling omautGLBindVertexArray and glPopClientAttrib afterwards to prevent this.
    • Note: currently, the bound chunk must be an OMA_FLOAT2, OMA_FLOAT3, or OMA_FLOAT4 to use this function.
  • OMAvoid omautGLDrawObject(OMAvoid)
    • Draws the current bound OMA_OBJECT chunk with OpenGL.
    • Note: only available if OpenGL headers and libraries are present when building OMAUT.
    • Note: at this time, this function does not support multitexturing. All texture operations are taken against the current texture unit.
Top
SourceForge.net Logo Valid CSS!