Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
dx8polygonrenderer.cpp
Go to the documentation of this file.
1/*
2** Command & Conquer Generals Zero Hour(tm)
3** Copyright 2025 Electronic Arts Inc.
4**
5** This program is free software: you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation, either version 3 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19/***********************************************************************************************
20 *** C O N F I D E N T I A L --- W E S T W O O D S T U D I O S ***
21 ***********************************************************************************************
22 * *
23 * Project Name : ww3d *
24 * *
25 * $Archive:: /Commando/Code/ww3d2/dx8polygonrenderer.cpp $*
26 * *
27 * Original Author:: Greg Hjelstrom *
28 * *
29 * $Author:: Jani_p $*
30 * *
31 * $Modtime:: 8/22/01 6:54p $*
32 * *
33 * $Revision:: 11 $*
34 * *
35 *---------------------------------------------------------------------------------------------*
36 * Functions: *
37 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
38
39
40
41#include "dx8polygonrenderer.h"
42#include "dx8renderer.h"
43
44
45// ----------------------------------------------------------------------------
46
48 unsigned index_count_,
49 MeshModelClass* mmc_,
51 unsigned vertex_offset_,
52 unsigned index_offset_,
53 bool strip_,
54 unsigned pass_)
55 :
56 mmc(mmc_),
57 texture_category(tex_cat),
58 index_offset(index_offset_),
59 vertex_offset(vertex_offset_),
60 min_vertex_index(0),
61 vertex_index_range(0),
62 index_count(index_count_),
63 strip(strip_),
64 pass(pass_)
65{
66 WWASSERT(index_count);
67 mmc->PolygonRendererList.Add_Tail(this);
68}
69
71 :
72 mmc(mmc_),
73 texture_category(src.texture_category),
74 index_offset(src.index_offset),
75 vertex_offset(src.vertex_offset),
76 min_vertex_index(src.min_vertex_index),
77 vertex_index_range(src.vertex_index_range),
78 index_count(src.index_count),
79 strip(src.strip),
80 pass(src.pass)
81{
82 mmc->PolygonRendererList.Add_Tail(this);
83}
84
86{
87 if (texture_category) texture_category->Remove_Polygon_Renderer(this);
88}
89
90// ----------------------------------------------------------------------------
91
93{
94 StringClass work(true);
95
96 work.Format(" %8d %8d %6d %6d %6d %s\n",
97 index_count,
98 index_count/3,
99 index_offset,
100 min_vertex_index,
101 vertex_index_range,
102 mmc->Get_Name());
103
104/* work.Format(
105 " Index count: %d (%d polys) i_offset: %d min_vi: %d vi_range: %d ident: %d (%s)\n",
106 index_count,
107 index_count/3,
108 index_offset,
109 min_vertex_index,
110 vertex_index_range,
111 mmc->ident,
112 mmc->Get_Name());
113*/ WWDEBUG_SAY((work));
114}
115
#define WWASSERT
DX8PolygonRendererClass(unsigned index_count, MeshModelClass *mmc_, DX8TextureCategoryClass *tex_cat, unsigned vertex_offset, unsigned index_offset, bool strip, unsigned pass)
int _cdecl Format(const TCHAR *format,...)
Definition wwstring.cpp:273
#define WWDEBUG_SAY(x)
Definition wwdebug.h:114