Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
ww3d.h
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/ww3d.h $*
26 * *
27 * $Author:: Steve_t $*
28 * *
29 * $Modtime:: 1/02/02 4:17p $*
30 * *
31 * $Revision:: 42 $*
32 * *
33 *---------------------------------------------------------------------------------------------*
34 * Functions: *
35 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
36
37
38#if defined(_MSC_VER)
39#pragma once
40#endif
41
42#ifndef WW3D_H
43#define WW3D_H
44
45#include "always.h"
46#include "vector3.h"
47#include "layer.h"
48#include "w3derr.h"
49#include "robjlist.h"
50
51class SceneClass;
52class CameraClass;
53class ShaderClass;
54class DX8Wrapper;
55
56struct RenderStatistics;
57class FrameGrabClass;
59class ExtraMaterialPassClass;
60class RenderInfoClass;
62class StringClass;
66
67#define MESH_RENDER_SNAPSHOT_ENABLED
68#define SNAPSHOT_SAY(x) if (WW3D::Is_Snapshot_Activated()) { WWDEBUG_SAY(x); }
69//#define SNAPSHOT_SAY(x)
70
77class WW3D
78{
79public:
80
86
96
102
107
108
109 static WW3DErrorType Init(void * hwnd, char *defaultpal = NULL, bool lite = false);
110 static WW3DErrorType Shutdown(void);
111 static bool Is_Initted(void) { return IsInitted; }
112
113 static const int Get_Render_Device_Count(void);
114 static const char * Get_Render_Device_Name(int device_index);
115 static const RenderDeviceDescClass & Get_Render_Device_Desc(int device = -1);
116
117 static int Get_Render_Device(void);
118 static WW3DErrorType Set_Render_Device( int dev=-1, int resx=-1, int resy=-1, int bits=-1, int windowed=-1, bool resize_window = false, bool reset_device=false, bool restore_assets=true);
119 static WW3DErrorType Set_Render_Device( const char *dev_name, int resx=-1, int resy=-1, int bits=-1, int windowed=-1, bool resize_window = false );
122
123 static void Get_Pixel_Center(float &x, float &y);
124 static void Get_Render_Target_Resolution(int & set_w,int & set_h,int & get_bits,bool & get_windowed);
125 static void Get_Device_Resolution(int & set_w,int & set_h,int & get_bits,bool & get_windowed);
126 static WW3DErrorType Set_Device_Resolution(int w=-1,int h=-1,int bits=-1,int windowed=-1, bool resize_window=false );
127
128 static bool Is_Windowed( void );
129 static WW3DErrorType Toggle_Windowed ( void );
130 static void Set_Window( void *hwnd );
131 static void * Get_Window( void );
132
133 static WW3DErrorType On_Activate_App( void );
134 static WW3DErrorType On_Deactivate_App( void );
135
136 static WW3DErrorType Registry_Save_Render_Device( const char * sub_key );
137 static WW3DErrorType Registry_Save_Render_Device( const char * sub_key, int device, int width, int height, int depth, bool windowed, int texture_depth );
138 static WW3DErrorType Registry_Load_Render_Device( const char * sub_key, bool resize_window = false );
139 static bool Registry_Load_Render_Device( const char * sub_key, char *device, int device_len, int &width, int &height, int &depth, int &windowed, int& texture_depth);
140
141 // 0 = bilinear, 1 = trilinear, 2 = anisotropic
142 static void Set_Texture_Filter(int filter);
143 static int Get_Texture_Filter() { return TextureFilter; }
144
145 /*
146 ** Rendering functions
147 ** Each frame should be bracketed by a Begin_Render and End_Render call. Between these two calls you will
148 ** normally render scenes. The render function which accepts a single render object is implemented for
149 ** special cases like generating a shadow texture for an object. Basically this function will have the
150 ** entire scene rendering overhead.
151 */
152 static WW3DErrorType Begin_Render(bool clear = false,bool clearz = true,const Vector3 & color = Vector3(0,0,0), float dest_alpha=0.0f, void(*network_callback)(void) = NULL);
153 static WW3DErrorType Render(const LayerListClass & layerlist);
154 static WW3DErrorType Render(const LayerClass & layer);
155 static WW3DErrorType Render(SceneClass * scene,CameraClass * cam,bool clear = false,bool clearz = false,const Vector3 & color = Vector3(0,0,0));
157 static void Flush(RenderInfoClass & rinfo); // NOTE: "normal" usage should *NEVER* require the user to call this function
158
159 static WW3DErrorType End_Render(bool flip_frame = true);
160
161 static bool Is_Rendering( void ) { return( IsRendering ); }
162
163 static void Flip_To_Primary(void);
164
165
166 /*
167 ** Timing
168 ** By calling the Sync function, the application can move the ww3d library time forward. This
169 ** will control things like animated uv-offset mappers and render object animations.
170 */
171 static void Sync( unsigned int sync_time );
172 static unsigned int Get_Sync_Time(void) { return SyncTime; }
173 static unsigned int Get_Frame_Time(void) { return SyncTime - PreviousSyncTime; }
174 static unsigned int Get_Frame_Count(void) { return FrameCount; }
175 static unsigned int Get_Last_Frame_Poly_Count(void);
176 static unsigned int Get_Last_Frame_Vertex_Count(void);
177
178 /*
179 ** Screen/Movie capturing
180 ** These functions allow you to create screenshots and movies.
181 */
182 static void Make_Screen_Shot( const char * filename = "ScreenShot", const float gamma = 1.3f, const ScreenShotFormatEnum format = TGA);
183 static void Start_Movie_Capture( const char * filename_base = "Movie", float frame_rate = 15);
184 static void Stop_Movie_Capture( void);
185 static void Toggle_Movie_Capture( const char * filename_base = "Movie", float frame_rate = 15);
186 static void Start_Single_Frame_Movie_Capture(const char *filename_base = "Frames");
187 static void Capture_Next_Movie_Frame();
188 static void Update_Movie_Capture( void);
189 static float Get_Movie_Capture_Frame_Rate( void);
190 static void Pause_Movie(bool mode);
191 static bool Is_Movie_Paused();
192 static bool Is_Recording_Next_Frame();
193 static bool Is_Movie_Ready();
194
195 /*
196 ** Set_Ext_Swap_Interval - how many vertical retraces to wait before flipping frames
197 ** Get_Ext_Swap_Interval - what is our current setting for the swap interval?
198 */
199 static void Set_Ext_Swap_Interval(long swap);
200 static long Get_Ext_Swap_Interval(void);
201
202 /*
203 ** Texture Reduction - all currently loaded textures can be de-resed on the fly
204 ** by passing in a non-unit value to Set_Texture_Reduction. Passing in 2 causes
205 ** all textures to be half their normal resolution. Passing in 3 causes them to
206 ** be cut in half twice, etc
207 */
208 static void Set_Texture_Reduction( int value, int min_dim=1 );
209 static int Get_Texture_Reduction( void );
210 static int Get_Texture_Min_Dimension(void);
211 static void Enable_Large_Texture_Extra_Reduction(bool onoff);
213 static void _Invalidate_Mesh_Cache();
214 static void _Invalidate_Textures();
215
216 static void Set_Thumbnail_Enabled(bool b) { ThumbnailEnabled=b; }
217 static bool Get_Thumbnail_Enabled() { return ThumbnailEnabled; }
218
219 static void Enable_Sorting(bool onoff);
220 static bool Is_Sorting_Enabled(void) { return IsSortingEnabled; }
221
222 static void Set_Screen_UV_Bias( bool onoff ) { IsScreenUVBiased = onoff; }
223 static bool Is_Screen_UV_Biased( void ) { return IsScreenUVBiased; }
224
225 static void Set_Collision_Box_Display_Mask(int mask);
226 static int Get_Collision_Box_Display_Mask(void);
227
228 static void Set_Default_Native_Screen_Size(float dnss) { DefaultNativeScreenSize = dnss; }
229 static float Get_Default_Native_Screen_Size(void) { return DefaultNativeScreenSize; }
230
231 static void Normalize_Coordinates(int x, int y, float &fx, float &fy); // convert pixel coordinates to 0..1 screen coordinates
232
237
238 static void Set_Prelit_Mode (PrelitModeEnum mode) { PrelitMode = mode; }
239 static PrelitModeEnum Get_Prelit_Mode () { return (PrelitMode); }
240 static bool Supports_Prelit_Mode (PrelitModeEnum mode) { return (true); }
241 static void Expose_Prelit (bool onoff) { ExposePrelit = onoff; }
242 static bool Expose_Prelit () { return (ExposePrelit); }
243
244 static void Set_Texture_Bitdepth(int bitdepth);
245 static int Get_Texture_Bitdepth();
246
247 static void Set_Mesh_Draw_Mode (MeshDrawModeEnum mode) { MeshDrawMode = mode; }
248 static MeshDrawModeEnum Get_Mesh_Draw_Mode () { return (MeshDrawMode); }
249
251 static NPatchesGapFillingModeEnum Get_NPatches_Gap_Filling_Mode () { return (NPatchesGapFillingMode); }
252
253 static void Set_NPatches_Level(unsigned level);
254 static unsigned Get_NPatches_Level() { return NPatchesLevel; }
255
256 static void Enable_Texturing(bool b);
257 static bool Is_Texturing_Enabled() { return IsTexturingEnabled; }
258 static bool Is_Coloring_Enabled() { return (IsColoringEnabled == 0) ? false : true; }
259 static void Enable_Coloring(unsigned int color);
260
261 static int Get_Last_Frame_Memory_Allocation_Count() { return LastFrameMemoryAllocations; }
262 static int Get_Last_Frame_Memory_Free_Count() { return LastFrameMemoryFrees; }
263
264 /*
265 ** Decal control
266 ** These global settings can control whether decals are rendered at all and
267 ** at what distance to stop rendering/creating decals
268 */
269 static void Enable_Decals(bool onoff) { AreDecalsEnabled = onoff; }
270 static bool Are_Decals_Enabled(void) { return AreDecalsEnabled; }
271 static void Set_Decal_Rejection_Distance(float d) { DecalRejectionDistance = d; }
272 static float Get_Decal_Rejection_Distance(void) { return DecalRejectionDistance; }
273
274 /*
275 ** Static sort lists. The ability to temporarily set a different static
276 ** sort list from the default one and a min/max sort list range is for
277 ** specialised uses (such as pipctuire-in-picture windows which need to
278 ** sort at a certain sort level). After this override is called, the
279 ** default sort list must be restored.
280 */
281 static void Enable_Static_Sort_Lists(bool onoff) { AreStaticSortListsEnabled = onoff; }
282 static bool Are_Static_Sort_Lists_Enabled(void) { return AreStaticSortListsEnabled; }
283 static void Enable_Munge_Sort_On_Load(bool onoff) { MungeSortOnLoad=onoff; }
284 static bool Is_Munge_Sort_On_Load_Enabled(void) { return MungeSortOnLoad; }
285 static void Add_To_Static_Sort_List(RenderObjClass *robj, unsigned int sort_level);
289
290 /*
291 ** Overbright modify on load - when this mode is set meshes will be
292 ** modified at load time. All shaders which originally had the primary
293 ** gradient set to MODULATE will be changed to MODULATE2X instead.
294 */
295 static void Enable_Overbright_Modify_On_Load(bool onoff) { OverbrightModifyOnLoad = onoff; }
296 static bool Is_Overbright_Modify_On_Load_Enabled(void) { return OverbrightModifyOnLoad; }
297
298 static bool Is_Snapshot_Activated() { return SnapshotActivated; }
299 static void Activate_Snapshot(bool b) { SnapshotActivated=b; }
300
301 // These clock all the time under user control, and are used to update
302 // Stats.UserStat* when performance sampling is enabled.
303 static long UserStat0;
304 static long UserStat1;
305 static long UserStat2;
306
307 // Gamma control
308 static void Set_Gamma(float gamma,float bright,float contrast,bool calibrate=true);
309
310private:
311
312 enum
313 {
314 DEFAULT_RESOLUTION_WIDTH = 640,
315 DEFAULT_RESOLUTION_HEIGHT = 480,
316 DEFAULT_BIT_DEPTH = 16
317 };
318
319 static void Read_Gerd_Render_Device_Description(RenderDeviceDescClass &desc);
320 static void Update_Pixel_Center(void);
321 static void Allocate_Debug_Resources(void);
322 static void Release_Debug_Resources(void);
323
324 // Timing info:
325 // The absolute synchronized frame time (in milliseconds) supplied by the
326 // application at the start of every frame. Note that wraparound cases
327 // etc. need to be considered.
328 static unsigned int SyncTime;
329
330 // The previously set absolute sync time - this is used to get the interval between
331 // the most recently set sync time and the previous one. Assuming the
332 // application sets sync time at the start of every frame, this represents
333 // the frame interval.
334 static unsigned int PreviousSyncTime;
335
336 static float PixelCenterX;
337 static float PixelCenterY;
338
339 static bool IsInitted;
340 static bool IsRendering;
341 static bool IsCapturing;
342 static bool IsSortingEnabled;
343 static bool IsScreenUVBiased;
344 static bool IsBackfaceDebugEnabled;
345
346 static bool AreDecalsEnabled;
347 static float DecalRejectionDistance;
348
349 static bool AreStaticSortListsEnabled;
350 static bool MungeSortOnLoad;
351
352 static bool OverbrightModifyOnLoad;
353
354 static FrameGrabClass * Movie;
355 static bool PauseRecord;
356 static bool RecordNextFrame;
357 static int FrameCount;
358
359 static VertexMaterialClass * DefaultDebugMaterial;
360 static VertexMaterialClass * BackfaceDebugMaterial;
361 static ShaderClass DefaultDebugShader;
362 static ShaderClass LightmapDebugShader;
363
364 static PrelitModeEnum PrelitMode;
365 static bool ExposePrelit;
366
367 static int TextureFilter;
368
369 static bool SnapshotActivated;
370 static bool ThumbnailEnabled;
371
372 static MeshDrawModeEnum MeshDrawMode;
373 static NPatchesGapFillingModeEnum NPatchesGapFillingMode;
374 static unsigned NPatchesLevel;
375 static bool IsTexturingEnabled;
376 static bool IsColoringEnabled;
377
378 static bool Lite;
379
380 // This is the default native screen size which will be set for each
381 // RenderObject on construction. The native screen size is the screen size
382 // at which the object was designed to be viewed, and it is used in the
383 // texture resizing algorithm (may be used in future for other things).
384 // If the default is overriden, it will usually be in the asset manager
385 // post-load callback.
386 static float DefaultNativeScreenSize;
387
388 // For meshes which have a static sorting order. These will get drawn
389 // after opaque meshes and before normally sorted meshes. The 'current'
390 // pointer is so the application can temporarily set a different set of
391 // static sort lists to be used temporarily. This is for specialised uses.
392 static StaticSortListClass * DefaultStaticSortLists;
393 static StaticSortListClass * CurrentStaticSortLists;
394
395 // Memory allocation statistics
396 static int LastFrameMemoryAllocations;
397 static int LastFrameMemoryFrees;
398};
399
400
401/*
402** RenderStatistics
403** This struct holds the results of a performance sampling. The WW3D object returns
404** its statistics packaged up in one of these structures.
405*/
407{
408 // General statistics
411
412 // Geometry engine statistics
418
419 // State change statistics
431
432 // Rendering device statistics
436
437 // Surface cache statistics
438 long Hits;
439 long Misses;
444
445 // User stats (can be used to see how often a function is called, etc.)
449};
450
451
452
453#endif
#define NULL
Definition BaseType.h:92
void const char * value
@ false
Definition bool.h:59
Definition ww3d.h:78
static WW3DErrorType On_Activate_App(void)
Definition ww3d.cpp:1941
static WW3DErrorType Render(const LayerListClass &layerlist)
Definition ww3d.cpp:876
static bool Is_Recording_Next_Frame()
Definition ww3d.cpp:1638
static unsigned int Get_Sync_Time(void)
Definition ww3d.h:172
static ShaderClass Peek_Lightmap_Debug_Shader(void)
Definition ww3d.cpp:1880
static bool Is_Snapshot_Activated()
Definition ww3d.h:298
static WW3DErrorType Registry_Save_Render_Device(const char *sub_key)
Definition ww3d.cpp:689
static void Set_Mesh_Draw_Mode(MeshDrawModeEnum mode)
Definition ww3d.h:247
static void Set_Ext_Swap_Interval(long swap)
Definition ww3d.cpp:1199
static unsigned int Get_Frame_Count(void)
Definition ww3d.h:174
static bool Is_Movie_Paused()
Definition ww3d.cpp:1620
static void Render_And_Clear_Static_Sort_Lists(RenderInfoClass &rinfo)
Definition ww3d.cpp:1989
static bool Is_Overbright_Modify_On_Load_Enabled(void)
Definition ww3d.h:296
static int Get_Texture_Reduction(void)
Definition ww3d.cpp:1794
static NPatchesGapFillingModeEnum Get_NPatches_Gap_Filling_Mode()
Definition ww3d.h:251
static unsigned int Get_Frame_Time(void)
Definition ww3d.h:173
static VertexMaterialClass * Peek_Default_Debug_Material(void)
Definition ww3d.cpp:1841
static WW3DErrorType Set_Render_Device(int dev=-1, int resx=-1, int resy=-1, int bits=-1, int windowed=-1, bool resize_window=false, bool reset_device=false, bool restore_assets=true)
Definition ww3d.cpp:444
static long UserStat2
Definition ww3d.h:305
static MeshDrawModeEnum Get_Mesh_Draw_Mode()
Definition ww3d.h:248
static WW3DErrorType Init(void *hwnd, char *defaultpal=NULL, bool lite=false)
Definition ww3d.cpp:268
static WW3DErrorType Set_Device_Resolution(int w=-1, int h=-1, int bits=-1, int windowed=-1, bool resize_window=false)
Definition ww3d.cpp:626
static void Add_To_Static_Sort_List(RenderObjClass *robj, unsigned int sort_level)
Definition ww3d.cpp:1984
static void Enable_Texturing(bool b)
Definition ww3d.cpp:1770
static void Activate_Snapshot(bool b)
Definition ww3d.h:299
ScreenShotFormatEnum
Definition ww3d.h:103
@ TGA
Definition ww3d.h:104
@ BMP
Definition ww3d.h:105
static WW3DErrorType Toggle_Windowed(void)
Definition ww3d.cpp:526
static PrelitModeEnum Get_Prelit_Mode()
Definition ww3d.h:239
static void * Get_Window(void)
Definition ww3d.cpp:489
static WW3DErrorType Begin_Render(bool clear=false, bool clearz=true, const Vector3 &color=Vector3(0, 0, 0), float dest_alpha=0.0f, void(*network_callback)(void)=NULL)
Definition ww3d.cpp:791
static void Pause_Movie(bool mode)
Definition ww3d.cpp:1602
static void Set_Default_Native_Screen_Size(float dnss)
Definition ww3d.h:228
static unsigned Get_NPatches_Level()
Definition ww3d.h:254
static int Get_Texture_Filter()
Definition ww3d.h:143
static bool Is_Windowed(void)
Definition ww3d.cpp:506
MeshDrawModeEnum
Definition ww3d.h:87
@ MESH_DRAW_MODE_NEW
Definition ww3d.h:89
@ MESH_DRAW_MODE_DEBUG_BOX
Definition ww3d.h:92
@ MESH_DRAW_MODE_OLD
Definition ww3d.h:88
@ MESH_DRAW_MODE_DX8_ONLY
Definition ww3d.h:94
@ MESH_DRAW_MODE_DEBUG_CLIP
Definition ww3d.h:91
@ MESH_DRAW_MODE_DEBUG_DRAW
Definition ww3d.h:90
@ MESH_DRAW_MODE_NONE
Definition ww3d.h:93
static bool Are_Static_Sort_Lists_Enabled(void)
Definition ww3d.h:282
static WW3DErrorType On_Deactivate_App(void)
Definition ww3d.cpp:1932
static void Set_Gamma(float gamma, float bright, float contrast, bool calibrate=true)
Definition ww3d.cpp:2022
static bool Expose_Prelit()
Definition ww3d.h:242
static WW3DErrorType Shutdown(void)
Definition ww3d.cpp:332
static int Get_Texture_Bitdepth()
Definition ww3d.cpp:1979
static void Flip_To_Primary(void)
Definition ww3d.cpp:1139
static void Update_Movie_Capture(void)
Definition ww3d.cpp:1675
static void Enable_Coloring(unsigned int color)
when non-zero color is passed, it will override vertex colors
Definition ww3d.cpp:1777
static void Set_Thumbnail_Enabled(bool b)
Definition ww3d.h:216
static void Enable_Large_Texture_Extra_Reduction(bool onoff)
Definition ww3d.cpp:1816
static void Toggle_Movie_Capture(const char *filename_base="Movie", float frame_rate=15)
Definition ww3d.cpp:1544
static bool Is_Rendering(void)
Definition ww3d.h:161
static void Normalize_Coordinates(int x, int y, float &fx, float &fy)
Definition ww3d.cpp:1273
static ShaderClass Peek_Backface_Debug_Shader(void)
static bool Is_Texturing_Enabled()
Definition ww3d.h:257
static const RenderDeviceDescClass & Get_Render_Device_Desc(int device=-1)
Definition ww3d.cpp:569
static bool Is_Large_Texture_Extra_Reduction_Enabled(void)
Definition ww3d.cpp:1824
static void Start_Single_Frame_Movie_Capture(const char *filename_base="Frames")
Definition ww3d.cpp:1566
static void Get_Device_Resolution(int &set_w, int &set_h, int &get_bits, bool &get_windowed)
Definition ww3d.cpp:670
static void Enable_Munge_Sort_On_Load(bool onoff)
Definition ww3d.h:283
static void _Invalidate_Textures()
Definition ww3d.cpp:754
static const char * Get_Render_Device_Name(int device_index)
Definition ww3d.cpp:608
static void Set_Texture_Filter(int filter)
Definition ww3d.cpp:770
static float Get_Movie_Capture_Frame_Rate(void)
Definition ww3d.cpp:1737
PrelitModeEnum
Definition ww3d.h:81
@ PRELIT_MODE_LIGHTMAP_MULTI_PASS
Definition ww3d.h:83
@ PRELIT_MODE_VERTEX
Definition ww3d.h:82
@ PRELIT_MODE_LIGHTMAP_MULTI_TEXTURE
Definition ww3d.h:84
static bool Is_Movie_Ready()
Definition ww3d.cpp:1656
static bool Is_Screen_UV_Biased(void)
Definition ww3d.h:223
static const int Get_Render_Device_Count(void)
Definition ww3d.cpp:589
static WW3DErrorType Set_Any_Render_Device(void)
Definition ww3d.cpp:421
static WW3DErrorType Registry_Load_Render_Device(const char *sub_key, bool resize_window=false)
Definition ww3d.cpp:734
static void Set_Decal_Rejection_Distance(float d)
Definition ww3d.h:271
static void Sync(unsigned int sync_time)
Definition ww3d.cpp:1180
static int Get_Texture_Min_Dimension(void)
Definition ww3d.cpp:1811
static bool Is_Initted(void)
Definition ww3d.h:111
static bool Get_Thumbnail_Enabled()
Definition ww3d.h:217
static float Get_Default_Native_Screen_Size(void)
Definition ww3d.h:229
static void Flush(RenderInfoClass &rinfo)
Definition ww3d.cpp:1059
static WW3DErrorType End_Render(bool flip_frame=true)
Definition ww3d.cpp:1082
static int Get_Last_Frame_Memory_Allocation_Count()
Definition ww3d.h:261
static void Set_Texture_Bitdepth(int bitdepth)
Definition ww3d.cpp:1974
static float Get_Decal_Rejection_Distance(void)
Definition ww3d.h:272
static void Set_Texture_Reduction(int value, int min_dim=1)
Definition ww3d.cpp:1760
static void Set_Screen_UV_Bias(bool onoff)
Definition ww3d.h:222
static void Enable_Static_Sort_Lists(bool onoff)
Definition ww3d.h:281
static int Get_Render_Device(void)
Definition ww3d.cpp:550
static int Get_Collision_Box_Display_Mask(void)
Definition ww3d.cpp:1252
static void Enable_Decals(bool onoff)
Definition ww3d.h:269
static void Enable_Sorting(bool onoff)
Definition ww3d.cpp:1999
static void Start_Movie_Capture(const char *filename_base="Movie", float frame_rate=15)
Definition ww3d.cpp:1474
static void Set_Window(void *hwnd)
static long UserStat0
Definition ww3d.h:303
static void _Invalidate_Mesh_Cache()
Definition ww3d.cpp:749
static void Capture_Next_Movie_Frame()
Definition ww3d.cpp:1584
static void Make_Screen_Shot(const char *filename="ScreenShot", const float gamma=1.3f, const ScreenShotFormatEnum format=TGA)
Definition ww3d.cpp:1298
static void Reset_Current_Static_Sort_Lists_To_Default(void)
Definition ww3d.cpp:2017
static long UserStat1
Definition ww3d.h:304
static void Enable_Overbright_Modify_On_Load(bool onoff)
Definition ww3d.h:295
static bool Are_Decals_Enabled(void)
Definition ww3d.h:270
static long Get_Ext_Swap_Interval(void)
Definition ww3d.cpp:1217
static void Expose_Prelit(bool onoff)
Definition ww3d.h:241
static unsigned int Get_Last_Frame_Vertex_Count(void)
Definition ww3d.cpp:1162
static bool Is_Munge_Sort_On_Load_Enabled(void)
Definition ww3d.h:284
static int Get_Last_Frame_Memory_Free_Count()
Definition ww3d.h:262
NPatchesGapFillingModeEnum
Definition ww3d.h:97
@ NPATCHES_GAP_FILLING_ENABLED
Definition ww3d.h:99
@ NPATCHES_GAP_FILLING_DISABLED
Definition ww3d.h:98
@ NPATCHES_GAP_FILLING_FORCE
Definition ww3d.h:100
static void Set_NPatches_Gap_Filling_Mode(NPatchesGapFillingModeEnum mode)
Definition ww3d.cpp:239
static void Set_NPatches_Level(unsigned level)
Definition ww3d.cpp:247
static void Stop_Movie_Capture(void)
Definition ww3d.cpp:1517
static unsigned int Get_Last_Frame_Poly_Count(void)
Definition ww3d.cpp:1157
static bool Is_Sorting_Enabled(void)
Definition ww3d.h:220
static void Override_Current_Static_Sort_Lists(StaticSortListClass *sort_list)
Definition ww3d.cpp:2007
static ShaderClass Peek_Default_Debug_Shader(void)
Definition ww3d.cpp:1863
static bool Is_Coloring_Enabled()
Definition ww3d.h:258
static void Get_Pixel_Center(float &x, float &y)
Definition ww3d.cpp:1947
static void Set_Collision_Box_Display_Mask(int mask)
Definition ww3d.cpp:1235
static void Get_Render_Target_Resolution(int &set_w, int &set_h, int &get_bits, bool &get_windowed)
Definition ww3d.cpp:651
static bool Supports_Prelit_Mode(PrelitModeEnum mode)
Definition ww3d.h:240
static WW3DErrorType Set_Next_Render_Device(void)
Definition ww3d.cpp:467
static void Set_Prelit_Mode(PrelitModeEnum mode)
Definition ww3d.h:238
List< LayerClass * > LayerListClass
Definition layer.h:95
void swap(T &a, T &b)
long MaxMemory
Definition ww3d.h:443
double TrianglesSubmitted
Definition ww3d.h:414
long UserStat2
Definition ww3d.h:448
double DrawStateChanges
Definition ww3d.h:421
double ViewStateChanges
Definition ww3d.h:420
double TextureParameterChanges
Definition ww3d.h:423
double TexturesCreated
Definition ww3d.h:424
double PixelsRejected
Definition ww3d.h:435
long UserStat0
Definition ww3d.h:446
long Insertions
Definition ww3d.h:440
double TextureChanges
Definition ww3d.h:422
double ElapsedSeconds
Definition ww3d.h:409
double TrianglesClipCreated
Definition ww3d.h:429
double TrianglesReceived
Definition ww3d.h:413
double ShaderChanges
Definition ww3d.h:426
long Removals
Definition ww3d.h:441
double DeviceDriverCalls
Definition ww3d.h:430
long UserStat1
Definition ww3d.h:447
int FramesRendered
Definition ww3d.h:410
double PixelsDrawn
Definition ww3d.h:434
double TextureTransfers
Definition ww3d.h:433
double TrianglesClipRemoved
Definition ww3d.h:428
double VerticesSubmitted
Definition ww3d.h:417
double TrianglesSorted
Definition ww3d.h:415
double DrawCommands
Definition ww3d.h:427
double VerticesReceived
Definition ww3d.h:416
double PaletteChanges
Definition ww3d.h:425
unsigned char filter
Definition vchannel.cpp:272
WW3DErrorType
Definition w3derr.h:51