// D3D8 struct RxD3D8ResEntryHeader { RwUInt16 serialNumber; /**< The mesh headers serial number */ RwUInt16 numMeshes; /**< The number of meshes */ }; struct RxD3D8InstanceData { RwUInt32 minVert; /**< The vertex index where the meshes vertices begin. Needed for reinstancing, not for rendering */ RwInt32 stride; /**< Stride of vertex */ RwInt32 numVertices; /**< Number of vertices in the vertex buffer */ RwInt32 numIndices; /**< Number of indices to render the primitive */ RpMaterial *material; /**< The material for this instanced data */ RwUInt32 vertexShader; /**< Vertex shader or FVF flags */ RwUInt32 primType; /**< Primitive type */ void *indexBuffer; /**< Index buffer */ void *vertexBuffer; /**< Vertex buffer */ RwUInt32 baseIndex; /**< Needed if we share the vertex buffer */ RwUInt8 vertexAlpha; /**< The prelight data contains alpha */ RwUInt8 managed; /**< Created by the Vertex Buffer Manager */ RwUInt8 remapped; /**< Vertices where remapped to save VB space */ }; // Xbox struct RxXboxResEntryHeader { RwInt32 size; /**< size in bytes of entire structure + mesh data */ RwUInt16 serialNumber; /**< The mesh headers serial number */ RwUInt16 numMeshes; /**< The number of meshes */ RwUInt32 primType; /**< Primitive type either D3DPT_TRIANGLESTRIP or D3DPT_TRIANGLELIST */ RwInt32 numVertices; /**< Number of vertices in the vertex buffer */ RwInt32 stride; /**< Stride of the vertices in the vertex buffer */ // RxXboxVertexFormat format; /**< Format flags of the vertices in the vertex buffer */ void *vertexBuffer; /**< Vertex buffer for storing all meshes vertices N.B. you can still merge additional streams per mesh on to this one by adding RxXboxInstanceData->minVert vertices as padding to the beginning of the additional stream's vertex buffer */ RwBool vertexAlpha; /**< The prelight data contains alpha */ RxXboxInstanceData *begin; /**< First instanced data mesh */ RxXboxInstanceData *end; /**< One-past-the-last instanced data mesh */ /* numMeshes RxXboxInstanceDatas tacked on the end here when allocated */ /* numMeshes index buffers tacked on after that */ }; struct RxXboxInstanceData { RwUInt32 minVert; /**< The vertex index where this mesh's vertices begin. Needed for reinstancing not for rendering */ RwInt32 numVertices; /**< Number of vertices in the vertex buffer used by this mesh */ RwInt32 numIndices; /**< Number of indices in this mesh */ RxVertexIndex *indexBuffer; /**< Index buffer */ RpMaterial *material; /**< The material for this instanced data */ RwUInt32 vertexShader; /**< Vertex shader - FVF or user defined */ // RwUInt32 pixelShader; /**< Pixel shader */ }; // D3D9 struct RxD3D9ResEntryHeader { RwUInt32 serialNumber; /**< The mesh headers serial number */ RwUInt32 numMeshes; /**< The number of meshes */ void *indexBuffer; /**< Index buffer */ RwUInt32 primType; /**< Primitive type */ RxD3D9VertexStream vertexStream[RWD3D9_MAX_VERTEX_STREAMS]; /**< Vertex streams */ RwBool useOffsets; /**< Use vertex buffer offsets when setting the streams */ void *vertexDeclaration; /**< Vertex declaration */ RwUInt32 totalNumIndex; /**< Total number of indices. Needed for reinstancing, not for rendering */ RwUInt32 totalNumVertex; /**< Total number of vertices. Needed for reinstancing, not for rendering */ }; struct RxD3D9InstanceData { RwUInt32 numIndex; /**< Number of indices. Needed for reinstancing, not for rendering */ RwUInt32 minVert; /**< The vertex index where the meshes vertices begin. Needed for reinstancing, not for rendering */ RpMaterial *material; /**< The material for this instanced data */ RwBool vertexAlpha; /**< The prelight data contains alpha */ void *vertexShader; /**< Vertex shader */ RwUInt32 baseIndex; /**< Needed if we share the vertex buffer */ RwUInt32 numVertices; /**< Number of vertices in the vertex buffer */ RwUInt32 startIndex; /**< Location in the index array to start reading vertices. */ RwUInt32 numPrimitives; /**< Number of primitives to render */ }; // OpenGL struct RxOpenGLResEntryHeader { RwUInt16 serialNumber; /**< The mesh header serial number */ RwUInt16 numMeshes; /**< The number of meshes */ }; struct RxOpenGLMeshInstanceData { RwUInt32 primType; /**< OpenGL primitive type */ RwUInt32 vertexDesc; /**< Vertex description - equivalent to * \ref RpGeometryFlag or \ref * RpWorldFlag */ RwUInt32 vertexStride; /**< Stride of the vertex data * in bytes */ RwUInt32 numVertices; /**< Number of vertices in the mesh */ RwUInt32 vertexDataSize; /**< Size of the vertex data in bytes */ RwUInt8 *sysMemVertexData; /**< Vertex data in system memory, * NULL if not used */ void *vidMemVertexData; /**< Vertex data in video memory (fast * write-only memory), NULL if not * used */ RwBool vidMemDataIsStatic; /**< If vertex data is in video memory, * TRUE if a static block, FALSE if * dynamic */ RwUInt32 displayList; /**< OpenGL display list name, 0 if * there is no display list */ RwUInt32 vaoName; /**< Name of the ATI Vertex Array * object, or 0 if there is no VAO */ RwUInt32 minVertexIdx; /**< Minimum vertex index */ RwUInt32 numIndices; /**< Number of indices in the mesh */ RxVertexIndex *indexData; /**< Index data array */ RwBool remapVertexData; /**< Vertex data was remapped to reduce * vertex array sizes */ RpMaterial *material; /**< Pointer to the mesh's material*/ RwBool vertexAlpha; /**< TRUE if there are vertices in this * mesh with alpha < 255, FALSE * otherwise */ RwUInt8 *position; /**< \ref RwUInt8 pointer containing * the address, or offset, of the * start of the position data for * this mesh */ RwUInt8 *normal; /**< \ref RwUInt8 pointer containing * the address, or offset, of the * start of the normal data for this * mesh */ RwUInt8 *color; /**< \ref RwUInt8 pointer containing * the address, or offset, of the * start of the color data for this * mesh */ RwUInt8 *texCoord[rwMAXTEXTURECOORDS]; /**< Array of \ref RwUInt8 pointers * containing the address, or offset, * of each texture coordinate set * for this mesh */ };