28 #ifndef HPL_RENDERER3D_H 29 #define HPL_RENDERER3D_H 31 #include "hpl1/engine/graphics/GPUProgram.h" 32 #include "hpl1/engine/graphics/GraphicsTypes.h" 33 #include "hpl1/engine/graphics/Material.h" 34 #include "hpl1/engine/math/Frustum.h" 35 #include "hpl1/engine/math/MathTypes.h" 39 #define eRendererDebugFlag_DrawTangents (0x00000001) 40 #define eRendererDebugFlag_DrawNormals (0x00000002) 41 #define eRendererDebugFlag_DisableLighting (0x00000004) 42 #define eRendererDebugFlag_LogRendering (0x00000008) 43 #define eRendererDebugFlag_DrawBoundingBox (0x00000010) 44 #define eRendererDebugFlag_DrawBoundingSphere (0x00000020) 45 #define eRendererDebugFlag_DrawLightBoundingBox (0x00000040) 46 #define eRendererDebugFlag_RenderLines (0x00000080) 48 typedef tFlag tRendererDebugFlag;
51 class iLowLevelGraphics;
52 class LowLevelResources;
61 class cRendererPostEffects;
68 enum eRendererShowShadows {
69 eRendererShowShadows_All,
70 eRendererShowShadows_Static,
71 eRendererShowShadows_None,
72 eRendererShowShadows_LastEnum
88 unsigned int *mpTempIndexArray;
103 eRendererShowShadows mShowShadows;
105 tRendererDebugFlag mDebugFlags;
108 int mlLastShadowAlgo;
112 eMaterialAlphaMode mAlphaMode;
113 eMaterialBlendMode mBlendMode;
114 eMaterialChannelMode mChannelMode;
119 bool mbVertexUseLight;
124 bool mbMatrixWasNULL;
131 iTexture *mpTexture[MAX_TEXTUREUNITS];
132 eMaterialBlendMode mTextureBlend[MAX_TEXTUREUNITS];
145 void UpdateRenderList(
cWorld3D *apWorld,
cCamera3D *apCamera,
float afFrameTime);
149 void SetSkyBox(
iTexture *apTexture,
bool abAutoDestroy);
150 void SetSkyBoxActive(
bool abX);
151 void SetSkyBoxColor(
const cColor &aColor);
153 iTexture *GetSkyBox() {
return mpSkyBoxTexture; }
154 bool GetSkyBoxActive() {
return mbSkyBoxActive; }
155 cColor GetSkyBoxColor() {
return mSkyBoxColor; }
157 void SetAmbientColor(
const cColor &aColor) { mRenderSettings.mAmbientColor = aColor; }
158 cColor GetAmbientColor() {
return mRenderSettings.mAmbientColor; }
160 iTexture *GetFogSolidTexture() {
return mpFogLinearSolidTexture; }
161 iTexture *GetFogAddTexture() {
return mpFogLinearAddTexture; }
162 iTexture *GetFogAlphaTexture() {
return mpFogLinearAlphaTexture; }
164 void SetRefractionUsed(
bool abX) { mbRefractionUsed = abX; }
165 bool GetRefractionUsed() {
return mbRefractionUsed; }
168 void SetFogActive(
bool abX);
169 void SetFogStart(
float afX);
170 void SetFogEnd(
float afX);
171 void SetFogColor(
const cColor &aCol) { mRenderSettings.mFogColor = aCol; }
172 void SetFogCulling(
bool abX) { mRenderSettings.mbFogCulling = abX; }
174 bool GetFogActive() {
return mRenderSettings.mbFogActive; }
175 float GetFogStart() {
return mRenderSettings.mfFogStart; }
176 float GetFogEnd() {
return mRenderSettings.mfFogEnd; }
177 cColor GetFogColor() {
return mRenderSettings.mFogColor; }
178 bool GetFogCulling() {
return mRenderSettings.mbFogCulling; }
185 void SetDebugFlags(tRendererDebugFlag aFlags) { mDebugFlags = aFlags; }
186 tRendererDebugFlag GetDebugFlags() {
return mDebugFlags; }
188 cRenderList *GetRenderList() {
return mpRenderList; }
191 eRendererShowShadows GetShowShadows();
192 void SetShowShadows(eRendererShowShadows aState);
194 void FetchOcclusionQueries();
197 inline void BeginRendering(
cCamera3D *apCamera);
208 void RenderOcclusionQueries(
cCamera3D *apCamera);
220 eMaterialRenderType aRenderType,
iLight3D *apLight);
241 bool mbRefractionAvailable;
242 bool mbRefractionUsed;
255 bool mbAutoDestroySkybox;
261 tRendererDebugFlag mDebugFlags;
266 #endif // HPL_RENDERER3D_H Definition: PortalContainer.h:181
Definition: Renderer3D.h:77
Definition: VertexBuffer.h:90
Definition: Light3D.h:117
Definition: Material.h:181
Definition: BoundingVolume.h:71
Definition: Renderable.h:70
Definition: low_level_resources.h:40
Definition: RendererPostEffects.h:71
Definition: World3D.h:179
Definition: MeshCreator.h:43
Definition: Renderer3D.h:139
Definition: RenderList.h:145
Definition: Resources.h:160
Definition: Material.h:203
Definition: LowLevelGraphics.h:200
Definition: Camera3D.h:53
Definition: GPUProgram.h:62