Vertex Buffer

From Burnout Wiki
IndexBuffer
aka {{{othernames}}}
No Example
Resource names Unknown
Type ID 0x9
Category Generic
Memory
distribution
Header in Main Memory
Vertices in secondary
Imports Unknown
Imported by Mesh State
Editor
available?
No

Vertex buffers were used alongside index buffers in renderable meshes. Their only known use is in Black 2 (2006-06-29 build); the type was deprecated by the time Burnout 5 (2006-11-13 build) was built.

Note that because this is a standalone resource type, indices and vertices are completely separate. This is unlike its modern counterpart, where they reside together in a single buffer.

Structures

This listing defines types for Xbox 360 only. For other platforms, although the modern format is not identical, it is similar. See Renderable.

renderengine::VertexBuffer

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

This is followed by the array header.

Array header

Offset Length Type Name Description Comments
0x0 0x2 uint16_t ? Combined length of this header and values
Same as in mesh state
0x2 0x1 uint8_t ? Number of values
0x3 0x1 ? ? Padding?
0x4 0x4 uint32_t ?

The values this stores are possibly flags, though none of the fields are known.

Enumerations

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.