Renderable/Xbox 360

From Burnout Wiki

Structures

Renderable

Offset Length Type Name Description Comments
0x0 0x10 Vector3Plus mBoundingSphere
0x10 0x2 uint16_t mu16VersionNumber Version 11
0x12 0x2 uint16_t mu16NumMeshes Number of meshes
0x14 0x4 RenderableMesh** mppMeshes Meshes
0x18 0x4 ObjectScopeTextureInfo* mpObjectScopeTextureInfo Set at runtime
0x1C 0x2 uint16_t mu16Flags Flags See flags

RenderableMesh

Offset Length Type Name Description Comments
0x0 0x10 PackedOobb mPackedBoundingBox
0x10 0x10 DrawIndexedParameters mDrawIndexedParameters
0x20 0x4 MaterialAssembly* mpMaterialAssembly
0x24 0x1 uint8_t mu8NumVertexDescriptors Number of vertex descriptors
0x25 0x1 uint8_t mu8InstanceCount
0x26 0x1 uint8_t mu8NumVertexBuffers Number of vertex buffers
0x27 0x1 uint8_t mu8Flags Flags Always 0?
0x28 0x4 void*[1] maBuffers Buffers Index buffers, then vertex buffers, then vertex descriptors.
See IndexBuffer and VertexBuffer

PackedOobb

A packed oriented bounding box. It unpacks into a Matrix44 through a set of vector operations.

Offset Length Type Name Description Comments
0x0 0x10 VectorIntrinsic mPackedBB

DrawIndexedParameters

The parameters passed to DrawIndexedVertices().

Offset Length Type Name Description Comments
0x0 0x4 uint32_t PrimitiveType The type of primitive to render. See D3DPRIMITIVETYPE
0x4 0x4 int32_t BaseVertexIndex Value added to every index after it's retrieved from the index buffer.
0x8 0x4 uint32_t StartIndex Location in the index array to start reading vertices.
0xC 0x4 uint32_t IndexCount Number of indices to render.

renderengine::IndexBuffer

Hmmm...
Hmmm...
To do:
Largely unknown; requires further research. Some fields may be incorrect.
Offset Length Type Name Description Comments
0x0 0x4 uint32_t ? D3D resource type May have highest nibble as a flag
See D3DRESOURCETYPE
0x4 0x4 uint32_t ? Always 1?
0x8 0x4 ? ?
0xC 0x4 ? ?
0x10 0x4 ? ?
0x14 0x2 int16_t ? Always -1?
0x16 0x2 Padding
0x18 0x4 uint32_t ? Start offset
0x1C 0x4 uint32_t ? Buffer size May have highest nibble as a flag
0x20 0x4 uint32_t ? Index count

renderengine::VertexBuffer

Hmmm...
Hmmm...
To do:
Largely unknown; requires further research. Some fields may be incorrect.
Offset Length Type Name Description Comments
0x0 0x4 uint32_t ? D3D resource type May have highest nibble as a flag
See D3DRESOURCETYPE
0x4 0x4 uint32_t ? Always 1?
0x8 0x4 ? ?
0xC 0x4 ? ?
0x10 0x4 ? ?
0x14 0x2 int16_t ? Always -1?
0x16 0x2 Padding
0x18 0x4 uint32_t ? Start offset + 3
0x1C 0x4 uint32_t ? Buffer size + 2 May have highest nibble as a flag
0x20 0x4 uint32_t ? Buffer size

Enumerations

Renderable flags

Name Value Comments
? 0x1
? 0x2
? 0x4
? 0x8
? 0x10
? 0x20
? 0x40
? 0x80
? 0x100
? 0x200
? 0x400
? 0x800

D3DPRIMITIVETYPE

From the Microsoft Xbox 360 SDK.

Name Value Comments
D3DPT_POINTLIST 1 Renders the vertices as a collection of isolated points. This value is unsupported for indexed primitives.
D3DPT_LINELIST 2 Renders the vertices as a list of isolated straight line segments. Calls using this primitive type fail if the count is less than two or is odd.
D3DPT_LINESTRIP 3 Renders the vertices as a single polyline. Calls using this primitive type fail if the count is less than two.
D3DPT_TRIANGLELIST 4 Renders the specified vertices as a sequence of isolated triangles. Each group of three vertices defines a separate triangle.
Back-face culling is affected by the current winding-order render state.
D3DPT_TRIANGLEFAN 5 Renders the vertices as a triangle fan.
D3DPT_TRIANGLESTRIP 6 Renders the vertices as a triangle strip. The backface-culling flag is automatically flipped on even-numbered triangles.
D3DPT_RECTLIST 8 Each set of three vertices (upper-left corner, upper-right corner, and lower-left corner) defines a screen-aligned quadrilateral. Wherever you would usually use a full-screen quad, such as during a post-processing pass, use the D3DPT_RECTLIST type instead. This primitive type has the advantage that it avoids the performance penalty inherent in the seam that runs down the middle of a quad and so can save a few percent on both fill-rate and pixel shader cost.
Pixel shader interpolators for the fourth vertex of the rectangle (lower-right corner) are computed using the equation below. In this equation, i0 is the interpolator for the upper-left vertex, i1 is the interpolator for the upper-right vertex, and i2 is the interpolator for the lower-right vertex.
i4 = −i0 + i1 + i2
D3DPT_RECTLIST has several inherent limitations.
  • No clipping or frustum culling is performed.
  • No back-face culling is performed.
  • There is no fill mode other than solid.
  • Vertices are forced to be screen-aligned before the scan conversion.
D3DPT_QUADLIST 13 Each set of four vertices is used to construct a quadrilateral. The vertices in each set should be listed in clockwise or counterclockwise order.
D3DPT_FORCE_DWORD 0x7FFFFFFF Forces this enumeration to compile to 32 bits in size. This value is not used.

D3DRESOURCETYPE

From the Microsoft Xbox 360 SDK.

Name Value Comments
D3DRTYPE_NONE 0 No resource is specified.
D3DRTYPE_VERTEXBUFFER 1 Vertex buffer resource.
D3DRTYPE_INDEXBUFFER 2 Index buffer resource.
D3DRTYPE_TEXTURE 3 Texture resource.
D3DRTYPE_SURFACE 4 Surface resource.
D3DRTYPE_VERTEXDECLARATION 5 Vertex declaration resource.
D3DRTYPE_VERTEXSHADER 6 Vertex shader resource.
D3DRTYPE_PIXELSHADER 7 Pixel shader resource.
D3DRTYPE_CONSTANTBUFFER 8 Constant buffer resource.
D3DRTYPE_COMMANDBUFFER 9 Command buffer resource.
D3DRTYPE_ASYNCCOMMANDBUFFERCALL 10 Aysnchronous command buffer call resource.
D3DRTYPE_PERFCOUNTERBATCH 11 Performance counter batch resource.
D3DRTYPE_OCCLUSIONQUERYBATCH 12 Occlusion query batch resource.
D3DRTYPE_VOLUME 16 Volume resource.
D3DRTYPE_VOLUMETEXTURE 17 Volume texture resource.
D3DRTYPE_CUBETEXTURE 18 Cube texture resource.
D3DRTYPE_ARRAYTEXTURE 19 Array texture resource.
D3DRTYPE_LINETEXTURE 20 Line texture resource.
D3DRTYPE_FORCE_DWORD 0x7FFFFFFF Forces this enumeration to compile to 32 bits in size. This value is not used.