@@ -161,7 +161,7 @@ void D3DXRenderBase::r_dsgraph_insert_dynamic (dxRender_Visual *pVisual, Fvector
161161
162162
163163#ifdef USE_RESOURCE_DEBUGGER
164- #if defined(USE_DX10) || defined(USE_DX11)
164+ #if defined(USE_DX10) || defined(USE_DX11) || defined(USE_OGL)
165165 mapMatrixVS::TNode* Nvs = map.insert (pass.vs );
166166 mapMatrixGS::TNode* Ngs = Nvs->val .insert (pass.gs );
167167 mapMatrixPS::TNode* Nps = Ngs->val .insert (pass.ps );
@@ -170,7 +170,11 @@ void D3DXRenderBase::r_dsgraph_insert_dynamic (dxRender_Visual *pVisual, Fvector
170170 mapMatrixPS::TNode* Nps = Nvs->val .insert (pass.ps );
171171 #endif // USE_DX10
172172#else
173- #if defined(USE_DX10) || defined(USE_DX11)
173+ #if defined(USE_OGL)
174+ mapMatrixVS::TNode* Nvs = map.insert (pass.vs ->vs );
175+ mapMatrixGS::TNode* Ngs = Nvs->val .insert (pass.gs ->gs );
176+ mapMatrixPS::TNode* Nps = Ngs->val .insert (pass.ps ->ps );
177+ #elif defined(USE_DX10) || defined(USE_DX11)
174178 mapMatrixVS::TNode* Nvs = map.insert (&*pass.vs );
175179 mapMatrixGS::TNode* Ngs = Nvs->val .insert (pass.gs ->gs );
176180 mapMatrixPS::TNode* Nps = Ngs->val .insert (pass.ps ->ps );
@@ -207,11 +211,11 @@ void D3DXRenderBase::r_dsgraph_insert_dynamic (dxRender_Visual *pVisual, Fvector
207211#else
208212 if (SSA>Nps->val .ssa ) { Nps->val .ssa = SSA;
209213#endif
210- #if defined(USE_DX10) || defined(USE_DX11)
214+ #if defined(USE_DX10) || defined(USE_DX11) || defined(USE_OGL)
211215 if (SSA>Ngs->val .ssa ) { Ngs->val .ssa = SSA;
212216#endif // USE_DX10
213217 if (SSA>Nvs->val .ssa ) { Nvs->val .ssa = SSA;
214- #if defined(USE_DX10) || defined(USE_DX11)
218+ #if defined(USE_DX10) || defined(USE_DX11) || defined(USE_OGL)
215219 } } } } } }
216220#else // USE_DX10
217221 } } } } }
@@ -322,7 +326,7 @@ void D3DXRenderBase::r_dsgraph_insert_static (dxRender_Visual *pVisual)
322326// #endif
323327
324328#ifdef USE_RESOURCE_DEBUGGER
325- # if defined(USE_DX10) || defined(USE_DX11)
329+ # if defined(USE_DX10) || defined(USE_DX11) || defined(USE_OGL)
326330 mapNormalVS::TNode* Nvs = map.insert (pass.vs );
327331 mapNormalGS::TNode* Ngs = Nvs->val .insert (pass.gs );
328332 mapNormalPS::TNode* Nps = Ngs->val .insert (pass.ps );
@@ -331,7 +335,11 @@ void D3DXRenderBase::r_dsgraph_insert_static (dxRender_Visual *pVisual)
331335 mapNormalPS::TNode* Nps = Nvs->val .insert (pass.ps );
332336# endif // USE_DX10
333337#else // USE_RESOURCE_DEBUGGER
334- # if defined(USE_DX10) || defined(USE_DX11)
338+ # if defined(USE_OGL)
339+ mapNormalVS::TNode* Nvs = map.insert (pass.vs ->vs );
340+ mapNormalGS::TNode* Ngs = Nvs->val .insert (pass.gs ->gs );
341+ mapNormalPS::TNode* Nps = Ngs->val .insert (pass.ps ->ps );
342+ # elif defined(USE_DX10) || defined(USE_DX11)
335343 mapNormalVS::TNode* Nvs = map.insert (&*pass.vs );
336344 mapNormalGS::TNode* Ngs = Nvs->val .insert (pass.gs ->gs );
337345 mapNormalPS::TNode* Nps = Ngs->val .insert (pass.ps ->ps );
@@ -764,16 +772,32 @@ void D3DXRenderBase::Copy(IRender &_in)
764772{ *this = *(D3DXRenderBase*)&_in; }
765773
766774void D3DXRenderBase::setGamma (float fGamma )
767- { m_Gamma.Gamma (fGamma ); }
775+ {
776+ #ifndef USE_OGL
777+ m_Gamma.Gamma (fGamma );
778+ #endif // !USE_OGL
779+ }
768780
769781void D3DXRenderBase::setBrightness (float fGamma )
770- { m_Gamma.Brightness (fGamma ); }
782+ {
783+ #ifndef USE_OGL
784+ m_Gamma.Brightness (fGamma );
785+ #endif // !USE_OGL
786+ }
771787
772788void D3DXRenderBase::setContrast (float fGamma )
773- { m_Gamma.Contrast (fGamma ); }
789+ {
790+ #ifndef USE_OGL
791+ m_Gamma.Contrast (fGamma );
792+ #endif // !USE_OGL
793+ }
774794
775795void D3DXRenderBase::updateGamma ()
776- { m_Gamma.Update (); }
796+ {
797+ #ifndef USE_OGL
798+ m_Gamma.Update ();
799+ #endif // !USE_OGL
800+ }
777801
778802void D3DXRenderBase::OnDeviceDestroy (bool bKeepTextures)
779803{
@@ -875,7 +899,9 @@ void D3DXRenderBase::OnDeviceCreate(const char *shName)
875899{
876900 // Signal everyone - device created
877901 RCache.OnDeviceCreate ();
902+ #ifndef USE_OGL
878903 m_Gamma.Update ();
904+ #endif // !USE_OGL
879905 Resources->OnDeviceCreate (shName);
880906 create ();
881907 if (!g_dedicated_server)
0 commit comments