Header
' -----------
numTextures
Texture() ' means this is array of numTextures elements with following properties:
Filename
AnisoLevel
Filtering
TranspColor
' if numTextures > 1 then here would follow again Filename, AnisoLevel, Filtering, TranspColor
' -----------
numMaterials
Material()
Ambient R, G, B, A
Diffuse R, G, B, A
Emissive R, G, B, A
Specular R, G, B, A
SpecExp E
TextureIndex ' points to a Texture() above or 0 if none
BlendFunc
AlphaFunc
' -----------
ParentEntity
MaterialID ' points to a Material() above
Rotate X, Y, Z
Scale X, Y, Z
Translate X, Y, Z
PolyType ' TBGL_BeginPoly-Equates
VertexType ' see Vertex-Format-Equates below - somehow needs a way to specify this in advance
numVertices
Vertex()
X, Y, Z [, nX, nY, nZ][,tU, tV][, R, G, B[, A]]
numChildren
ChildEntity()
MaterialID
Rotate X, Y, Z
Scale X, Y, Z
Translate X, Y, Z
PolyType
VertexType
numVertices
Vertex()
X, Y, Z [, nX, nY, nZ][, tU, tV][, R, G, B[, A]]
numChildren
ChildEntity() '- here would follow a child of first child if one
'...
ChildEntity() '- while this is second child of parent-entity
'...EOF somewhere here
' ----------------------------------------
' Vertex-Format-Equates:
%Vertex_hasPosition = 0 ' X, Y, Z are always available
%Vertex_hasNormals = 1 ' X, Y, Z, nX, nY, nZ
%Vertex_hasTexcoords = 2 ' X, Y, Z, tU, tV
%Vertex_hasNormalTex = 3 ' X, Y, Z, nX, nY, nZ, tU, tV
%Vertex_hasColor = 4 ' X, Y, Z, R, G, B
%Vertex_hasNormalColor = 5 ' X, Y, Z, nX, nY, nZ, R, G, B
%Vertex_hasTexColor = 6 ' X, Y, Z, tU, tV, R, G, B
%Vertex_hasTexNormalColor = 7 ' X, Y, Z, nX, nY, nZ, tU, tV, R, G, B
%Vertex_hasAlpha = 8 ' X, Y, Z, R, G, B, A
%Vertex_hasNormalAlpha = 9 ' X, Y, Z, nX, nY, nZ, R, G, B, A
%Vertex_hasTexAlpha = 10 ' X, Y, Z, tU, tV, R, G, B, A
%Vertex_hasNormalTexAlpha = 11 ' X, Y, Z, nX, nY, nZ, tU, tV, R, G, B, A
Edit: this way could just return top-level-parent-ID on load
Bookmarks