Skip to content

Commit d1678e9

Browse files
committed
DrawUtils: Replace GLUtils by D3DUtils.
1 parent ada231a commit d1678e9

File tree

5 files changed

+11
-79
lines changed

5 files changed

+11
-79
lines changed

src/Layers/xrRender/D3DUtils.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ u32 m_ColorSafeRect = 0xffB040B0;
9595

9696
void SPrimitiveBuffer::CreateFromData(D3DPRIMITIVETYPE _pt, u32 _p_cnt, u32 FVF, LPVOID vertices, u32 _v_cnt, u16* indices, u32 _i_cnt)
9797
{
98-
#if defined(USE_DX10) || defined(USE_DX11)
98+
#if defined(USE_DX10) || defined(USE_DX11) || defined(USE_OGL)
9999
// TODO: DX10: Implement SPrimitiveBuffer::CreateFromData for DX10
100100
// VERIFY(!"SPrimitiveBuffer::CreateFromData not implemented for dx10");
101101
#else // USE_DX10
@@ -130,13 +130,15 @@ void SPrimitiveBuffer::CreateFromData(D3DPRIMITIVETYPE _pt, u32 _p_cnt, u32 FVF,
130130
}
131131
void SPrimitiveBuffer::Destroy()
132132
{
133+
#ifndef USE_OGL
133134
if (pGeom){
134135
HW.stats_manager.decrement_stats_vb (pGeom->vb);
135136
HW.stats_manager.decrement_stats_ib (pGeom->ib);
136137
_RELEASE (pGeom->vb);
137138
_RELEASE (pGeom->ib);
138139
pGeom.destroy ();
139140
}
141+
#endif // !USE_OGL
140142
}
141143

142144
void CDrawUtilities::UpdateGrid(int number_of_cell, float square_size, int subdiv){

src/Layers/xrRenderPC_GL/GLUtils.cpp

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/Layers/xrRenderPC_GL/GLUtils.h

Lines changed: 0 additions & 66 deletions
This file was deleted.

src/Layers/xrRenderPC_GL/xrRender_GL.vcxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@
211211
<ClCompile Include="..\xrRenderGL\glState.cpp" />
212212
<ClCompile Include="..\xrRenderGL\glStateUtils.cpp" />
213213
<ClCompile Include="..\xrRenderGL\glTextureUtils.cpp" />
214+
<ClCompile Include="..\xrRender\D3DUtils.cpp" />
214215
<ClCompile Include="..\xrRender\DetailManager_VS.cpp" />
215216
<ClCompile Include="..\xrRender\du_box.cpp" />
216217
<ClCompile Include="..\xrRender\du_cone.cpp" />
@@ -356,7 +357,6 @@
356357
<ClCompile Include="glResourceManager_Scripting.cpp" />
357358
<ClCompile Include="glr_constants.cpp" />
358359
<ClCompile Include="glTexture.cpp" />
359-
<ClCompile Include="GLUtils.cpp" />
360360
<ClCompile Include="GL_DStreams.cpp" />
361361
<ClCompile Include="gl_R_render.cpp" />
362362
<ClCompile Include="r2_R_calculate.cpp" />
@@ -402,6 +402,7 @@
402402
<ClInclude Include="..\xrRenderGL\glState.h" />
403403
<ClInclude Include="..\xrRenderGL\glStateUtils.h" />
404404
<ClInclude Include="..\xrRenderGL\glTextureUtils.h" />
405+
<ClInclude Include="..\xrRender\D3DUtils.h" />
405406
<ClInclude Include="..\xrRender\D3DXRenderBase.h" />
406407
<ClInclude Include="..\xrRender\du_box.h" />
407408
<ClInclude Include="..\xrRender\du_cone.h" />
@@ -508,7 +509,6 @@
508509
<ClInclude Include="..\xrRender\uber_deffer.h" />
509510
<ClInclude Include="..\xrRender\WallmarksEngine.h" />
510511
<ClInclude Include="..\xrRender\xrRender_console.h" />
511-
<ClInclude Include="GLUtils.h" />
512512
<ClInclude Include="gl_rendertarget_wallmarks.h" />
513513
<ClInclude Include="r2_types.h" />
514514
<ClInclude Include="gl_rendertarget.h" />

src/Layers/xrRenderPC_GL/xrRender_GL.vcxproj.filters

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,6 @@
177177
<ClCompile Include="..\xrRender\xrRender_console.cpp">
178178
<Filter>Kernel</Filter>
179179
</ClCompile>
180-
<ClCompile Include="GLUtils.cpp">
181-
<Filter>Refactored\Execution &amp; 3D\DebugDraw</Filter>
182-
</ClCompile>
183180
<ClCompile Include="..\xrRender\PSLibrary.cpp">
184181
<Filter>Core</Filter>
185182
</ClCompile>
@@ -639,6 +636,9 @@
639636
<ClCompile Include="glTexture.cpp">
640637
<Filter>Core</Filter>
641638
</ClCompile>
639+
<ClCompile Include="..\xrRender\D3DUtils.cpp">
640+
<Filter>Refactored\Execution &amp; 3D\DebugDraw</Filter>
641+
</ClCompile>
642642
</ItemGroup>
643643
<ItemGroup>
644644
<ClInclude Include="stdafx.h">
@@ -650,9 +650,6 @@
650650
<ClInclude Include="..\..\include\xrRender\DrawUtils.h">
651651
<Filter>Refactored\Execution &amp; 3D\DebugDraw</Filter>
652652
</ClInclude>
653-
<ClInclude Include="GLUtils.h">
654-
<Filter>Refactored\Execution &amp; 3D\DebugDraw</Filter>
655-
</ClInclude>
656653
<ClInclude Include="..\xrRender\PSLibrary.h">
657654
<Filter>Core</Filter>
658655
</ClInclude>
@@ -1067,5 +1064,8 @@
10671064
<ClInclude Include="..\xrRender\D3DXRenderBase.h">
10681065
<Filter>Core</Filter>
10691066
</ClInclude>
1067+
<ClInclude Include="..\xrRender\D3DUtils.h">
1068+
<Filter>Refactored\Execution &amp; 3D\DebugDraw</Filter>
1069+
</ClInclude>
10701070
</ItemGroup>
10711071
</Project>

0 commit comments

Comments
 (0)