68bool DX8TextureCategoryClass::m_gForceMultiply =
false;
90#define VERTEX_BUFFER_OVERFLOW 0xffff
151 MaterialPass->Add_Ref();
157 MaterialPass->Release_Ref();
182 int crc0 = mat1 ? mat1->
Get_CRC() : 0;
183 int crc1 = mat2 ? mat2->
Get_CRC() : 0;
184 return (crc0 == crc1);
197 render_task_head(
NULL),
199 container(container_)
210 if (material) material->Add_Ref();
231 render_task_head = new_prt;
233 container->Add_Visible_Texture_Category(
this,pass);
239 WWASSERT(!PolygonRendererList.Contains(p_renderer));
241 if (add_after_this !=
NULL) {
242 bool res = PolygonRendererList.Add_After(p_renderer,add_after_this,
false);
245 PolygonRendererList.Add(p_renderer);
253 PolygonRendererList.Remove(p_renderer);
255 if (PolygonRendererList.Peek_Head() ==
NULL) {
256 container->Remove_Texture_Category(
this);
257 texture_category_delete_list.Add_Tail(
this);
264 for (
unsigned pass=0;pass<
passes;++pass) {
267 for (pass=0; pass<
passes; pass++) {
271 fvf_category_container_delete_list.Add_Tail(
this);
295 bool renderTasksRemaining=
false;
297 while (mpr !=
NULL) {
306 renderTasksRemaining =
true;
314 if (last_mpr ==
NULL) {
351 SNAPSHOT_SAY((
"DX8RigidFVFCategoryContainer::Render_Delayed_Procedural_Material_Passes()\n"));
355 while (mpr !=
NULL) {
370#ifdef ENABLE_CATEGORY_LOG
372 work.
Format(
" DX8TextureCategoryClass\n");
377 work2.
Format(
" texture[%d]: %x (%s)\n", stage, textures[stage], textures[stage] ? textures[stage]->Get_Name() :
"-");
380 work2.
Format(
" material: %x (%s)\n shader: %x\n", material, material ? material->Get_Name() :
"-", shader);
384 work.
Format(
" %8s %8s %6s %6s %6s %5s %s\n",
450 for (
unsigned p=0;p<
passes;++p) {
471 dest_tex_category=dest_it.
Peek_Obj();
472 bool all_textures_same =
true;
478 if (all_textures_same &&
481 return dest_tex_category;
500 dest_tex_category=dest_it.
Peek_Obj();
501 bool all_textures_same =
true;
504 if (all_textures_same &&
506 return dest_tex_category;
525 bool foundtexture=
false;
527 if (texture==new_texture)
return;
542 if (prc==src_tex_category) {
545 if (!dest_tex_category) {
550 tmp_textures[stage]=new_texture;
564 bool found_similar_category =
false;
570 found_similar_category =
true;
576 if (!found_similar_category) {
579 dest_tex_category=new_tex_category;
582 rem->
src=src_tex_category;
583 rem->
dest=dest_tex_category;
584 rem->
pr=polygon_renderer;
592 if (foundtexture)
break;
618 bool foundtexture=
false;
620 if (vmat==new_vmat)
return;
633 if (prc==src_tex_category) {
637 if (!dest_tex_category) {
655 bool found_similar_category =
false;
661 found_similar_category =
true;
667 if (!found_similar_category) {
670 dest_tex_category=new_tex_category;
673 rem->
src=src_tex_category;
674 rem->
dest=dest_tex_category;
675 rem->
pr=polygon_renderer;
682 if (foundtexture)
break;
706 unsigned fvf=D3DFVF_XYZ;
714 fvf|=D3DFVF_SPECULAR;
717 switch (tex_coord_count) {
721 case 1: fvf|=D3DFVF_TEX1;
break;
722 case 2: fvf|=D3DFVF_TEX2;
break;
723 case 3: fvf|=D3DFVF_TEX3;
break;
724 case 4: fvf|=D3DFVF_TEX4;
break;
725 case 5: fvf|=D3DFVF_TEX5;
break;
726 case 6: fvf|=D3DFVF_TEX6;
break;
727 case 7: fvf|=D3DFVF_TEX7;
break;
728 case 8: fvf|=D3DFVF_TEX8;
break;
762#ifdef ENABLE_CATEGORY_LOG
764 work.
Format(
"DX8RigidFVFCategoryContainer --------------\n");
783 for (
unsigned p=0;p<
passes;++p) {
810 SNAPSHOT_SAY((
"DX8RigidFVFCategoryContainer::Render()\n"));
815 for (
unsigned p=0;p<
passes;++p) {
841 unsigned required_indices=required_polygons*3*mmc->
Get_Pass_Count();
844 required_vertices<=available_vertices &&
845 (required_indices)<=available_indices) {
857 unsigned polygon_count;
860 bool allocated_polygon_array;
866 npatch_enable(
false),
867 allocated_polygon_array(
false)
870 if (mmc->Get_Flag(MeshGeometryClass::ALLOW_NPATCHES)) {
879 allocated_polygon_array=
true;
900 if (allocated_polygon_array) {
901 delete[] polygon_array;
907 return mmc->Get_Vertex_Array();
912 return mmc->Get_Vertex_Normal_Array();
917 return mmc->Get_Color_Array(index,
false);
922 return mmc->Get_UV_Array_By_Index(uv_array_index);
927 return mmc->Get_Vertex_Count();
932 return polygon_count;
937 return mmc->Get_Pass_Count();
942 if (mmc->Has_Texture_Array(pass,stage)) {
943 if (idx>=
unsigned(mmc->Get_Polygon_Count())) {
945 return mmc->Get_Gap_Filler()->Get_Texture_Array(pass,stage)[idx-mmc->Get_Polygon_Count()];
947 return mmc->Peek_Texture(idx,pass,stage);
949 return mmc->Peek_Single_Texture(pass,stage);
954 if (mmc->Has_Material_Array(pass)) {
955 if (idx>=
unsigned(mmc->Get_Polygon_Count())) {
957 return mmc->Get_Gap_Filler()->Get_Material_Array(pass)[idx-mmc->Get_Polygon_Count()];
959 return mmc->Peek_Material(mmc->Get_Polygon_Array()[idx][0],pass);
961 return mmc->Peek_Single_Material(pass);
966 if (mmc->Has_Shader_Array(pass)) {
969 if (idx>=
unsigned(mmc->Get_Polygon_Count())) {
971 shader=mmc->Get_Gap_Filler()->Get_Shader_Array(pass)[idx-mmc->Get_Polygon_Count()];
973 else shader=mmc->Get_Shader(idx,pass);
981 if (!npatch_enable)
return mmc->Get_Single_Shader(pass);
995 return (
unsigned short*)polygon_array;
1014 if (vb_size<needed_vertices) vb_size=needed_vertices;
1043 if ((
FVF&D3DFVF_NORMAL)==D3DFVF_NORMAL && norms) {
1047 if ((
FVF&D3DFVF_DIFFUSE)==D3DFVF_DIFFUSE) {
1055 if ((
FVF&D3DFVF_SPECULAR)==D3DFVF_SPECULAR) {
1071 if ((
FVF&D3DFVF_TEX1) == D3DFVF_TEX1) {
1074 if ((
FVF&D3DFVF_TEX2) == D3DFVF_TEX2) {
1077 if ((
FVF&D3DFVF_TEX3) == D3DFVF_TEX3) {
1080 if ((
FVF&D3DFVF_TEX4) == D3DFVF_TEX4) {
1083 if ((
FVF&D3DFVF_TEX5) == D3DFVF_TEX5) {
1086 if ((
FVF&D3DFVF_TEX6) == D3DFVF_TEX6) {
1089 if ((
FVF&D3DFVF_TEX7) == D3DFVF_TEX7) {
1092 if ((
FVF&D3DFVF_TEX8) == D3DFVF_TEX8) {
1096 for (
int j=0; j<uvcount; j++) {
1119 unsigned vertex_offset)
1125 bool fit_in_existing_category =
false;
1130 bool all_textures_same =
true;
1132 all_textures_same = all_textures_same && (tex_category->
Peek_Texture(stage) == texs[stage]);
1134 if (all_textures_same && Equal_Material(tex_category->
Peek_Material(),mat) && tex_category->
Get_Shader()==shader) {
1136 fit_in_existing_category =
true;
1142 if (!fit_in_existing_category) {
1152 bool found_similar_category =
false;
1158 found_similar_category =
true;
1164 if (!found_similar_category) {
1184 bool all_textures_same =
true;
1186 all_textures_same = all_textures_same && (texs[stage] ==
added_textures[stage][a]);
1214 if (ib_size<index_count) ib_size=index_count;
1230 for (
int i=0;i<polygon_count;++i) {
1236 textures[stage]=split_table.
Peek_Texture(i,pass,stage);
1246 WWASSERT(new_inds<=polygon_count*3);
1255 VisibleVertexCount(0),
1256 VisibleSkinHead(
NULL),
1257 VisibleSkinTail(
NULL)
1271#ifdef ENABLE_CATEGORY_LOG
1273 work.
Format(
"DX8SkinFVFCategoryContainer --------------\n");
1284 for (
unsigned pass=0;pass<
passes;++pass) {
1298 SNAPSHOT_SAY((
"DX8SkinFVFCategoryContainer::Render()\n"));
1309 unsigned int maxVertexCount=VisibleVertexCount;
1310 if (maxVertexCount > 65535)
1312 maxVertexCount = 65535;
1319 SNAPSHOT_SAY((
"DynamicVBAccess - %s - %d vertices\n",
sorting ?
"sorting" :
"non-sorting",VisibleVertexCount));
1321 unsigned int renderedVertexCount=0;
1324 MeshClass * remainingMesh = VisibleSkinHead;
1325 while (renderedVertexCount < VisibleVertexCount)
1326 { mesh = remainingMesh;
1329 unsigned vertex_offset=0;
1330 remainingMesh =
NULL;
1332 while (mesh !=
NULL) {
1337 if (vertex_offset+mesh_vertex_count > maxVertexCount || remainingMesh)
1340 if (remainingMesh ==
NULL)
1341 remainingMesh = mesh;
1349 WWASSERT((vertex_offset+mesh_vertex_count)<=VisibleVertexCount);
1352 if (_TempVertexBuffer.Length() < mesh_vertex_count) _TempVertexBuffer.Resize(mesh_vertex_count);
1353 if (_TempNormalBuffer.Length() < mesh_vertex_count) _TempNormalBuffer.Resize(mesh_vertex_count);
1355 Vector3* loc=&(_TempVertexBuffer[0]);
1356 Vector3* norm=&(_TempNormalBuffer[0]);
1365 for (
int v=0;v<mesh_vertex_count;++v) {
1366 verts[v].
x=(*loc)[0];
1367 verts[v].
y=(*loc)[1];
1368 verts[v].
z=(*loc)[2];
1369 verts[v].
nx=(*norm)[0];
1370 verts[v].
ny=(*norm)[1];
1371 verts[v].
nz=(*norm)[2];
1379 verts[v].
u1=(*uv0)[0];
1380 verts[v].
v1=(*uv0)[1];
1388 verts[v].
u2=(*uv1)[0];
1389 verts[v].
v2=(*uv1)[1];
1402 vertex_offset+=mesh_vertex_count;
1403 renderedVertexCount += mesh_vertex_count;
1415 for (
unsigned pass=0;pass<
passes;++pass) {
1429 for (
unsigned pass=0;pass<
passes;++pass) {
1434 WWASSERT(renderedVertexCount==VisibleVertexCount);
1437 clearVisibleSkinList();
1454void DX8SkinFVFCategoryContainer::clearVisibleSkinList()
1456 while (VisibleSkinHead !=
NULL)
1460 VisibleSkinHead = next;
1462 VisibleSkinHead =
NULL;
1463 VisibleSkinTail =
NULL;
1464 VisibleVertexCount = 0;
1470 DEBUG_CRASH((
"Mesh %s is already a visible skin, and we tried to add it again... please notify Mark W or Steven J immediately!\n",mesh->
Get_Name()));
1473 if (VisibleSkinHead ==
NULL)
1474 VisibleSkinTail = mesh;
1476 VisibleSkinHead = mesh;
1483void DX8SkinFVFCategoryContainer::Reset()
1485 clearVisibleSkinList();
1487 for (
unsigned pass=0;pass<
passes;++pass) {
1489 delete texture_category;
1510 unsigned vertex_offset,
1511 unsigned index_offset,
1517 unsigned index_count=0;
1522 unsigned polygons=0;
1524 for (
int i=0;i<poly_count;++i) {
1525 bool all_textures_same =
true;
1527 all_textures_same = all_textures_same && (split_table.
Peek_Texture(i, pass, stage) == textures[stage]);
1532 if (all_textures_same && Equal_Material(mat,material) && shd==shader) {
1542 index_count=polygons*3;
1543#ifndef ENABLE_STRIPING
1544 bool stripify=
false;
1555 int triangle_index_count=0;
1556 for (
int i=0;i<poly_count;++i) {
1557 bool all_textures_same =
true;
1559 all_textures_same = all_textures_same && (split_table.
Peek_Texture(i, pass, stage) == textures[stage]);
1564 if (all_textures_same && Equal_Material(mat,material) && shd==shader) {
1565 triangles[triangle_index_count++]=src_indices[i][0]+vertex_offset;
1566 triangles[triangle_index_count++]=src_indices[i][1]+vertex_offset;
1567 triangles[triangle_index_count++]=src_indices[i][2]+vertex_offset;
1576 if (index_count<
unsigned(strip[0])) {
1580 index_count=strip[0];
1590 PolygonRendererList.Add_Tail(p_renderer);
1596 unsigned short vmin=0xffff;
1597 unsigned short vmax=0;
1602 for (
unsigned i=0;i<index_count;++i) {
1605 idx=
unsigned short(strip[i+1]);
1630 PolygonRendererList.Add_Tail(p_renderer);
1635 unsigned short vmin=0xffff;
1636 unsigned short vmax=0;
1641 for (
int i=0;i<poly_count;++i) {
1642 bool all_textures_same =
true;
1644 all_textures_same = all_textures_same && (split_table.
Peek_Texture(i, pass, stage) == textures[stage]);
1649 if (all_textures_same && Equal_Material(mat,material) && shd==shader) {
1652 idx=
unsigned short(src_indices[i][0]+vertex_offset);
1658 idx=
unsigned short(src_indices[i][1]+vertex_offset);
1664 idx=
unsigned short(src_indices[i][2]+vertex_offset);
1732 bool renderTasksRemaining=
false;
1749 renderTasksRemaining =
true;
1835 tmp_world.
Obj_Look_At(mesh_position,mesh_position + camera_z_vector,0.0f);
1836 world_transform = &tmp_world;
1847 tmp_world.
Obj_Look_At(mesh_position,camera_position,0.0f);
1848 world_transform = &tmp_world;
1854 world_transform = &tmp_world;
1890 unsigned int oldUVOffsetSyncTime;
1908 theAlphaShader = theShader;
1949 if (last_prt ==
NULL) {
1950 render_task_head = next_prt;
1959 if (!renderTasksRemaining)
1995 _TempVertexBuffer.Clear();
1996 _TempNormalBuffer.Clear();
2020 while (!it.Is_Done()) {
2021 container = it.Peek_Obj();
2030 container_list->
Add_Tail(container);
2041 _RegisteredMeshList.Remove(mmc);
2056#ifdef ENABLE_CATEGORY_LOG
2093 if (!_RegisteredMeshList.Contains(mmc)) {
2104 if (container && container->
Get_FVF()!=fvf)
continue;
2106 Add_Rigid_Mesh_To_Container(list,fvf,mmc);
2118 Add_Rigid_Mesh_To_Container(new_fvf_category,fvf,mmc);
2125 _RegisteredMeshList.Add_Tail(mmc);
2128 WWDEBUG_SAY((
"Error: Register_Mesh_Type failed! file: %s line: %d\r\n",__FILE__,__LINE__));
2136static unsigned statistics_requested=0;
2153 while (!it.Is_Done()) {
2154 it.Peek_Obj()->Render();
2159static void Render_FVF_Category_Container_List_Delayed_Passes(
FVFCategoryList& list)
2162 while (!it.Is_Done()) {
2163 it.Peek_Obj()->Render_Delayed_Procedural_Material_Passes();
2216 if (!decal_mesh)
return;
2220 while (decal_mesh !=
NULL) {
2231static void Log_Container_List(
FVFCategoryList& container_list,
bool only_visible)
2234 while (!it.Is_Done()) {
2235 it.Peek_Obj()->Log(only_visible);
2251static void Invalidate_FVF_Category_Container_List(
FVFCategoryList& list)
2254 delete fvf_category;
2261 _RegisteredMeshList.Reset_List();
#define DX8_RECORD_SKIN_RENDER(polys, verts)
IndexBufferClass * index_buffer
TextureCategoryList texture_category_list[MAX_PASSES]
void Add_Visible_Material_Pass(MaterialPassClass *pass, MeshClass *mesh)
void Insert_To_Texture_Category(Vertex_Split_Table &split_table, TextureClass **textures, VertexMaterialClass *mat, ShaderClass shader, int pass, unsigned vertex_offset)
virtual void Add_Mesh(MeshModelClass *mmc)=0
unsigned uv_coordinate_channels
bool AnyDelayedPassesToRender
TextureCategoryList visible_texture_category_list[MAX_PASSES]
virtual ~DX8FVFCategoryContainer()
MatPassTaskClass * visible_matpass_tail
void Change_Polygon_Renderer_Texture(DX8PolygonRendererList &polygon_renderer_list, TextureClass *texture, TextureClass *new_texture, unsigned pass, unsigned stage)
bool Anything_To_Render()
MatPassTaskClass * visible_matpass_head
void Render_Procedural_Material_Passes(void)
static unsigned Define_FVF(MeshModelClass *mmc, bool enable_lighting)
void Remove_Texture_Category(DX8TextureCategoryClass *tex_category)
virtual bool Check_If_Mesh_Fits(MeshModelClass *mmc)=0
DX8TextureCategoryClass * Find_Matching_Texture_Category(TextureClass *texture, unsigned pass, unsigned stage, DX8TextureCategoryClass *ref_category)
bool Any_Delayed_Passes_To_Render()
DX8FVFCategoryContainer(unsigned FVF, bool sorting)
void Generate_Texture_Categories(Vertex_Split_Table &split_table, unsigned vertex_offset)
void Change_Polygon_Renderer_Material(DX8PolygonRendererList &polygon_renderer_list, VertexMaterialClass *vmat, VertexMaterialClass *new_vmat, unsigned pass)
void Invalidate(bool shutdown=false)
DecalMeshClass * visible_decal_meshes
void Render_Decal_Meshes(void)
void Log_Statistics_String(bool only_visible)
SimpleDynVecClass< FVFCategoryList * > texture_category_container_lists_rigid
void Clear_Pending_Delete_Lists()
FVFCategoryList * texture_category_container_list_skin
static void Request_Log_Statistics()
void Add_To_Render_List(DecalMeshClass *decalmesh)
void Unregister_Mesh_Type(MeshModelClass *mmc)
void Register_Mesh_Type(MeshModelClass *mmc)
DX8TextureCategoryClass * Get_Texture_Category()
void Render_Sorted(int base_vertex_offset, const SphereClass &bounding_sphere)
void Set_Texture_Category(DX8TextureCategoryClass *tc)
void Render(int base_vertex_offset)
void Set_Vertex_Index_Range(unsigned min_vertex_index_, unsigned vertex_index_range_)
static WWINLINE bool Is_Enabled()
MatPassTaskClass * delayed_matpass_tail
void Add_Mesh(MeshModelClass *mmc)
virtual void Render_Delayed_Procedural_Material_Passes(void)
bool Check_If_Mesh_Fits(MeshModelClass *mmc)
VertexBufferClass * vertex_buffer
void Log(bool only_visible)
DX8RigidFVFCategoryContainer(unsigned FVF, bool sorting)
MatPassTaskClass * delayed_matpass_head
virtual void Add_Delayed_Visible_Material_Pass(MaterialPassClass *pass, MeshClass *mesh)
~DX8RigidFVFCategoryContainer()
void Add_Visible_Skin(MeshClass *mesh)
~DX8SkinFVFCategoryContainer()
void Add_Mesh(MeshModelClass *mmc)
DX8SkinFVFCategoryContainer(bool sorting)
bool Check_If_Mesh_Fits(MeshModelClass *mmc)
void Log(bool only_visible)
~DX8TextureCategoryClass()
void Add_Render_Task(DX8PolygonRendererClass *p_renderer, MeshClass *p_mesh)
void Add_Polygon_Renderer(DX8PolygonRendererClass *p_renderer, DX8PolygonRendererClass *add_after_this=NULL)
unsigned Add_Mesh(Vertex_Split_Table &split_buffer, unsigned vertex_offset, unsigned index_offset, IndexBufferClass *index_buffer, unsigned pass)
DX8TextureCategoryClass(DX8FVFCategoryContainer *container, TextureClass **textures, ShaderClass shd, VertexMaterialClass *mat, int pass)
const VertexMaterialClass * Peek_Material()
void Log(bool only_visible)
void Remove_Polygon_Renderer(DX8PolygonRendererClass *p_renderer)
TextureClass * Peek_Texture(int stage)
static void Set_World_Identity()
static void Set_Vertex_Buffer(const VertexBufferClass *vb, unsigned stream=0)
static void Set_Texture(unsigned stage, TextureBaseClass *texture)
static const DX8Caps * Get_Current_Caps()
static void Set_Light_Environment(LightEnvironmentClass *light_env)
Set the light environment. This is a lighting model which used up to four directional lights to produ...
static void Set_Index_Buffer(const IndexBufferClass *ib, unsigned short index_base_offset)
static void Set_Material(const VertexMaterialClass *material)
static void Set_Shader(const ShaderClass &shader)
static void Set_Transform(D3DTRANSFORMSTATETYPE transform, const Matrix4x4 &m)
static void Apply_Render_State_Changes()
static void Set_DX8_Render_State(D3DRENDERSTATETYPE state, unsigned value)
DecalMeshClass * Peek_Next_Visible(void)
virtual void Render(void)=0
void Set_Next_Visible(DecalMeshClass *mesh)
VertexFormatXYZNDUV2 * Get_Formatted_Vertex_Array()
unsigned Get_Tex_Offset(unsigned int n) const
unsigned Get_FVF_Size() const
unsigned Get_Diffuse_Offset() const
unsigned Get_Specular_Offset() const
unsigned Get_Location_Offset() const
unsigned Get_Normal_Offset() const
WWINLINE const TriIndex * Get_Polygon_Array() const
WWINLINE unsigned Get_Polygon_Count() const
unsigned short * Get_Index_Array()
int Get_Light_Count(void) const
virtual int Mapper_ID(void) const
unsigned int Get_LastUsedSyncTime()
void Get_Current_UV_Offset(Vector2 &cur)
void Set_Current_UV_Offset(const Vector2 &cur)
void Set_LastUsedSyncTime(unsigned int time)
MeshClass * Peek_Mesh(void)
MaterialPassClass * Peek_Material_Pass(void)
MatPassTaskClass * Get_Next_Visible(void)
void Set_Next_Visible(MatPassTaskClass *mpr)
MatPassTaskClass(MaterialPassClass *pass, MeshClass *mesh)
WWINLINE Vector3 Get_Translation(void) const
WWINLINE void Make_Identity(void)
void Obj_Look_At(const Vector3 &p, const Vector3 &t, float roll)
float Get_Alpha_Override(void)
void Render_Material_Pass(MaterialPassClass *pass, IndexBufferClass *ib)
void Get_Deformed_Vertices(Vector3 *dst_vert, Vector3 *dst_norm)
virtual int Get_Num_Polys(void) const
void Set_Base_Vertex_Offset(int base)
virtual const char * Get_Name(void) const
int Get_Base_Vertex_Offset(void)
LightEnvironmentClass * Get_Lighting_Environment(void)
void Set_Next_Visible_Skin(MeshClass *next_visible)
MeshModelClass * Peek_Model(void)
bool Is_Disabled_By_Debugger() const
MeshClass * Peek_Next_Visible_Skin(void)
ShareBufferClass< uint16 > * VertexBoneLink
int Get_Sort_Level(void) const
@ PRELIT_LIGHTMAP_MULTI_TEXTURE
@ PRELIT_LIGHTMAP_MULTI_PASS
int Get_Vertex_Count(void) const
const char * Get_Name(void) const
const TriIndex * Get_Polygon_Array(void)
int Get_Polygon_Count(void) const
int Get_Flag(FlagsType flag)
GapFillerClass * GapFiller
unsigned * Get_Color_Array(int array_index, bool create=true)
bool Needs_Vertex_Normals(void)
const Vector2 * Get_UV_Array_By_Index(int index)
int Get_Pass_Count(void) const
DX8PolygonRendererList PolygonRendererList
int Get_UV_Array_Count(void)
const GapFillerClass * Get_Gap_Filler() const
bool Add(ObjectType *obj, bool onlyonce=true)
ObjectType * Remove_Head()
bool Add_Tail(ObjectType *obj, bool onlyonce=true)
void Remove_Current_Object(void)
ObjectType * Peek_Obj(void)
MultiListObjectClass(void)
DX8TextureCategoryClass * dest
DX8TextureCategoryClass * src
DX8PolygonRendererClass * pr
DX8PolygonRendererClass * Renderer
PolyRenderTaskClass * NextVisible
DX8PolygonRendererClass * Peek_Polygon_Renderer(void)
void Set_Next_Visible(PolyRenderTaskClass *prtc)
~PolyRenderTaskClass(void)
MeshClass * Peek_Mesh(void)
PolyRenderTaskClass(DX8PolygonRendererClass *p_renderer, MeshClass *p_mesh)
PolyRenderTaskClass * Get_Next_Visible(void)
@ USER_DATA_MATERIAL_OVERRIDE
const float Get_ObjectScale(void) const
virtual int Is_Additive(void) const
virtual const SphereClass & Get_Bounding_Sphere(void) const
const Matrix3D & Get_Transform(void) const
virtual void * Get_User_Data()
bool Is_Transform_Identity() const
void Set_Src_Blend_Func(SrcBlendFuncType x)
void Set_Dst_Blend_Func(DstBlendFuncType x)
DstBlendFuncType Get_Dst_Blend_Func(void) const
void Set_NPatch_Enable(NPatchEnableType x)
@ DSTBLEND_ONE_MINUS_SRC_ALPHA
int _cdecl Format(const TCHAR *format,...)
static int * Combine_Strips(const int *strips, int strip_count)
static int * Stripify(const int *tris, int tri_count)
@ MAPPER_ID_LINEAR_OFFSET
unsigned Get_Pass_Count() const
const Vector3 * Get_Vertex_Array() const
const Vector2 * Get_UV_Array(unsigned uv_array_index) const
Vertex_Split_Table(MeshModelClass *mmc_)
unsigned Get_Vertex_Count() const
const unsigned * Get_Color_Array(unsigned index) const
MeshModelClass * Get_Mesh_Model_Class()
ShaderClass Peek_Shader(unsigned idx, unsigned pass)
unsigned Get_Polygon_Count() const
const Vector3 * Get_Vertex_Normal_Array() const
TextureClass * Peek_Texture(unsigned idx, unsigned pass, unsigned stage)
unsigned short * Get_Polygon_Array(unsigned pass)
VertexMaterialClass * Peek_Material(unsigned idx, unsigned pass)
void * Get_Vertex_Array()
void Get_Diffuse(Vector3 *set_color) const
unsigned long Get_CRC(void) const
void Set_Diffuse(const Vector3 &color)
TextureMapperClass * Peek_Mapper(int stage=0)
float Get_Opacity(void) const
void Set_Opacity(float o)
static unsigned int Get_Sync_Time(void)
static unsigned int Get_Frame_Count(void)
static unsigned Get_NPatches_Level()
static void Expose_Prelit(bool onoff)
static bool Is_Sorting_Enabled(void)
MultiListClass< DX8TextureCategoryClass > TextureCategoryList
MultiListIterator< DX8PolygonRendererClass > DX8PolygonRendererListIterator
MultiListClass< DX8FVFCategoryContainer > FVFCategoryList
MultiListIterator< DX8TextureCategoryClass > TextureCategoryListIterator
MultiListClass< DX8PolygonRendererClass > DX8PolygonRendererList
MultiListIterator< DX8FVFCategoryContainer > FVFCategoryListIterator
MultiListClass< PolyRemover > PolyRemoverList
#define VERTEX_BUFFER_OVERFLOW
const unsigned MAX_ADDED_TYPE_COUNT
DX8MeshRendererClass TheDX8MeshRenderer
MultiListIterator< PolyRemover > PolyRemoverListIterator
DX8MeshRendererClass TheDX8MeshRenderer
const unsigned dynamic_fvf_type
@ BUFFER_TYPE_DYNAMIC_DX8
@ BUFFER_TYPE_DYNAMIC_SORTING
const unsigned MAX_TEXTURE_STAGES
#define DEFINE_AUTO_POOL(T, BLOCKSIZE)
#define REF_PTR_RELEASE(x)
#define REF_PTR_SET(dst, src)
bool Add_Textures_Material_And_Shader(TextureClass **texs, VertexMaterialClass *mat, ShaderClass shd)
unsigned added_type_count
ShaderClass added_shaders[MAX_ADDED_TYPE_COUNT]
VertexMaterialClass * added_materials[MAX_ADDED_TYPE_COUNT]
TextureClass * added_textures[MeshMatDescClass::MAX_TEX_STAGES][MAX_ADDED_TYPE_COUNT]
Textures_Material_And_Shader_Booking_Struct()
#define WWASSERT_PRINT(expr, string)
#define WWMEMLOG(category)