Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
rinfo.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/rinfo.h $*
26 * *
27 * Org Author:: Greg Hjelstrom *
28 * *
29 * Author : Kenny Mitchell *
30 * *
31 * $Modtime:: 06/27/02 1:27p $*
32 * *
33 * $Revision:: 16 $*
34 * *
35 * 06/27/02 KM Render to shadow buffer texture support *
36 *---------------------------------------------------------------------------------------------*
37 * Functions: *
38 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
39
40
41#if defined(_MSC_VER)
42#pragma once
43#endif
44
45#ifndef RINFO_H
46#define RINFO_H
47
48
49#include "always.h"
50#include "bittype.h"
51#include "ww3d.h"
52#include "wwdebug.h"
53#include "shader.h"
54#include "vector.h"
55#include "matrix3d.h"
56#include "matrix4.h"
57
58
62class BWRenderClass;
63class TexProjectClass;
64
66const unsigned MAX_OVERRIDE_FLAG_LEVEL=32;
67
77{
78public:
80 ~RenderInfoClass(void);
81
83 RINFO_OVERRIDE_DEFAULT = 0x0000, // No overrides
84 RINFO_OVERRIDE_FORCE_TWO_SIDED = 0x0001, // Override mesh settings to force no backface culling
85 RINFO_OVERRIDE_FORCE_SORTING = 0x0002, // Override mesh settings to force sorting
86 RINFO_OVERRIDE_ADDITIONAL_PASSES_ONLY = 0x0004, // Do not render base passes (only additional passes)
87 RINFO_OVERRIDE_SHADOW_RENDERING = 0x0008 // Hint: we are rendering a shadow
88 };
89
91 void Pop_Material_Pass(void);
92
93 int Additional_Pass_Count(void);
95
96 void Push_Override_Flags(RINFO_OVERRIDE_FLAGS flg); // Saves current override flags on stack and installs a new one
97 void Pop_Override_Flags(void); // Restores previous override flags from stack
98 RINFO_OVERRIDE_FLAGS & Current_Override_Flags(void); // Access to current override flags
99
101
104 float fog_end;
105 float alphaOverride; //added for 'Generals' to allow variable alpha -MW
108
110
112
113protected:
119
120};
121
122
137{
138
139public:
140 SpecialRenderInfoClass(CameraClass & cam,int render_type);
142
143 // The following fields are only used by the Special_Render function.
144 // this is basically just a place to stick whatever information you need.
145 enum
146 {
149 };
151
152 // RENDER_VIS variables and methods:
154
155 // RENDER_SHADOW variables and methods:
156 // NOTE: this is somewhat obsolete now that we have hardware render-to-texture.
157 BWRenderClass * BWRenderer; // Black & white non-textured renderer
158
159private:
160
161 // Not implemented...
163 SpecialRenderInfoClass & operator = (const RenderInfoClass &);
164
165};
166
167
168
169#endif
void Pop_Override_Flags(void)
Definition rinfo.cpp:120
unsigned AdditionalMaterialPassCount
Definition rinfo.h:115
RINFO_OVERRIDE_FLAGS OverrideFlag[MAX_OVERRIDE_FLAG_LEVEL]
Definition rinfo.h:117
TexProjectClass * Texture_Projector
Definition rinfo.h:111
MaterialPassClass * Peek_Additional_Pass(int i)
Definition rinfo.cpp:107
CameraClass & Camera
Definition rinfo.h:100
float fog_scale
Definition rinfo.h:102
float fog_start
Definition rinfo.h:103
void Push_Override_Flags(RINFO_OVERRIDE_FLAGS flg)
Definition rinfo.cpp:112
~RenderInfoClass(void)
Definition rinfo.cpp:69
MaterialPassClass * AdditionalMaterialPassArray[MAX_ADDITIONAL_MATERIAL_PASSES]
Definition rinfo.h:114
unsigned RejectedMaterialPasses
Definition rinfo.h:116
RINFO_OVERRIDE_FLAGS & Current_Override_Flags(void)
Definition rinfo.cpp:126
float fog_end
Definition rinfo.h:104
@ RINFO_OVERRIDE_ADDITIONAL_PASSES_ONLY
Definition rinfo.h:86
@ RINFO_OVERRIDE_SHADOW_RENDERING
Definition rinfo.h:87
@ RINFO_OVERRIDE_FORCE_TWO_SIDED
Definition rinfo.h:84
@ RINFO_OVERRIDE_DEFAULT
Definition rinfo.h:83
@ RINFO_OVERRIDE_FORCE_SORTING
Definition rinfo.h:85
void Push_Material_Pass(MaterialPassClass *matpass)
Definition rinfo.cpp:73
float alphaOverride
Definition rinfo.h:105
int Additional_Pass_Count(void)
Definition rinfo.cpp:102
RenderInfoClass(CameraClass &cam)
Definition rinfo.cpp:51
unsigned OverrideFlagLevel
Definition rinfo.h:118
float materialPassAlphaOverride
Definition rinfo.h:106
void Pop_Material_Pass(void)
Definition rinfo.cpp:87
LightEnvironmentClass * light_environment
Definition rinfo.h:109
float materialPassEmissiveOverride
Definition rinfo.h:107
BWRenderClass * BWRenderer
Definition rinfo.h:157
SpecialRenderInfoClass(CameraClass &cam, int render_type)
Definition rinfo.cpp:139
~SpecialRenderInfoClass(void)
Definition rinfo.cpp:147
VisRasterizerClass * VisRasterizer
Definition rinfo.h:153
const unsigned MAX_ADDITIONAL_MATERIAL_PASSES
Definition rinfo.h:65
const unsigned MAX_OVERRIDE_FLAG_LEVEL
Definition rinfo.h:66