Skip to content

Commit 1b16b47

Browse files
committed
Changed USE_DX10, USE_DX11, USE_OGL checks to ifndef USE_DX9
1 parent 7bea5f7 commit 1b16b47

31 files changed

+69
-69
lines changed

src/Layers/xrRender/Blender_Recorder_R2.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ void CBlender_Compile::r_Pass(LPCSTR _vs, LPCSTR _ps, bool bFog, BOOL bZtest, BO
2727
SVS* vs = RImplementation.Resources->_CreateVS(_vs);
2828
dest.ps = ps;
2929
dest.vs = vs;
30-
#if defined(USE_DX10) || defined(USE_DX11) || defined(USE_OGL)
30+
#ifndef USE_DX9
3131
SGS* gs = RImplementation.Resources->_CreateGS("null");
3232
dest.gs = gs;
3333
#ifdef USE_DX11

src/Layers/xrRender/D3DXRenderBase.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class D3DXRenderBase : public IRender, public pureFrame
5050

5151
// Runtime structures
5252
xr_vector<R_dsgraph::mapNormalVS::value_type *> nrmVS;
53-
#if defined(USE_DX10) || defined(USE_DX11) || defined(USE_OGL)
53+
#ifndef USE_DX9
5454
xr_vector<R_dsgraph::mapNormalGS::value_type *> nrmGS;
5555
#endif // USE_DX10
5656
xr_vector<R_dsgraph::mapNormalPS::value_type *> nrmPS;
@@ -60,7 +60,7 @@ class D3DXRenderBase : public IRender, public pureFrame
6060
xr_vector<R_dsgraph::mapNormalTextures::value_type *> nrmTexturesTemp;
6161

6262
xr_vector<R_dsgraph::mapMatrixVS::value_type *> matVS;
63-
#if defined(USE_DX10) || defined(USE_DX11) || defined(USE_OGL)
63+
#ifndef USE_DX9
6464
xr_vector<R_dsgraph::mapMatrixGS::value_type *> matGS;
6565
#endif // USE_DX10
6666
xr_vector<R_dsgraph::mapMatrixPS::value_type *> matPS;

src/Layers/xrRender/DetailManager.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ class ECORE_API CDetailManager
206206
void hw_Load_Shaders();
207207
void hw_Unload();
208208
void hw_Render();
209-
#if defined(USE_DX10) || defined(USE_DX11) || defined(USE_OGL)
209+
#ifndef USE_DX9
210210
void hw_Render_dump(const Fvector4& consts, const Fvector4& wave, const Fvector4& wind, u32 var_id, u32 lod_id);
211211
#else // USE_DX10
212212
void hw_Render_dump(ref_constant array, u32 var_id, u32 lod_id, u32 c_base);

src/Layers/xrRender/DetailManager_VS.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ void CDetailManager::hw_Load_Geom()
7575
// Fill VB
7676
{
7777
vertHW* pV;
78-
#if defined(USE_DX10) || defined(USE_DX11) || defined(USE_OGL)
78+
#ifndef USE_DX9
7979
vertHW* pVOriginal;
8080
pVOriginal = xr_alloc<vertHW>(dwVerts);
8181
pV = pVOriginal;
@@ -117,7 +117,7 @@ void CDetailManager::hw_Load_Geom()
117117
// Fill IB
118118
{
119119
u16* pI;
120-
#if defined(USE_DX10) || defined(USE_DX11) || defined(USE_OGL)
120+
#ifndef USE_DX9
121121
u16* pIOriginal;
122122
pIOriginal = xr_alloc<u16>(dwIndices);
123123
pI = pIOriginal;

src/Layers/xrRender/FSkinned.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ void CSkeletonX_PM::Load(const char* N, IReader* data, u32 dwFlags)
355355
void* _verts_ = data->pointer();
356356
inherited1::Load(N, data, dwFlags | VLOAD_NOVERTICES);
357357
GEnv.Render->shader_option_skinning(-1);
358-
#if defined(USE_DX10) || defined(USE_DX11) || defined(USE_OGL)
358+
#ifndef USE_DX9
359359
_DuplicateIndices(N, data);
360360
#endif // USE_DX10
361361
vBase = 0;
@@ -367,14 +367,14 @@ void CSkeletonX_ST::Load(const char* N, IReader* data, u32 dwFlags)
367367
void* _verts_ = data->pointer();
368368
inherited1::Load(N, data, dwFlags | VLOAD_NOVERTICES);
369369
GEnv.Render->shader_option_skinning(-1);
370-
#if defined(USE_DX10) || defined(USE_DX11) || defined(USE_OGL)
370+
#ifndef USE_DX9
371371
_DuplicateIndices(N, data);
372372
#endif // USE_DX10
373373
vBase = 0;
374374
_Load_hw(*this, _verts_);
375375
}
376376

377-
#if defined(USE_DX10) || defined(USE_DX11) || defined(USE_OGL)
377+
#ifndef USE_DX9
378378

379379
void CSkeletonX_ext::_Load_hw(Fvisual& V, void* _verts_)
380380
{
@@ -765,7 +765,7 @@ void CSkeletonX_ext::_CollectBoneFaces(Fvisual* V, u32 iBase, u32 iCount)
765765
{
766766
u16* indices = nullptr;
767767

768-
#if defined(USE_DX10) || defined(USE_DX11) || defined(USE_OGL)
768+
#ifndef USE_DX9
769769
indices = *m_Indices;
770770
#else // USE_DX10
771771
R_CHK(V->p_rm_Indices->Lock(0, V->dwPrimitives * 3, (void**)&indices, D3DLOCK_READONLY));
@@ -1083,7 +1083,7 @@ BOOL CSkeletonX_ext::_PickBone(IKinematics::pick_result& r, float dist, const Fv
10831083
CBoneData::FacesVec* faces = &BD.child_faces[ChildIDX];
10841084
BOOL result = FALSE;
10851085
u16* indices = nullptr;
1086-
#if defined(USE_DX10) || defined(USE_DX11) || defined(USE_OGL)
1086+
#ifndef USE_DX9
10871087
indices = *m_Indices;
10881088
#else // USE_DX10
10891089
CHK_DX(V->p_rm_Indices->Lock(0, V->dwPrimitives * 3, (void**)&indices, D3DLOCK_READONLY));
@@ -1151,7 +1151,7 @@ void CSkeletonX_PM::EnumBoneVertices(SEnumVerticesCallback& C, u16 bone_id)
11511151
inherited2::_EnumBoneVertices(C, this, bone_id, iBase + SW.offset, SW.num_tris * 3);
11521152
}
11531153

1154-
#if defined(USE_DX10) || defined(USE_DX11) || defined(USE_OGL)
1154+
#ifndef USE_DX9
11551155

11561156
void CSkeletonX_ext::_FillVerticesHW1W(const Fmatrix& view, CSkeletonWallmark& wm, const Fvector& normal, float size,
11571157
Fvisual* V, u16* indices, CBoneData::FacesVec& faces)
@@ -1546,7 +1546,7 @@ void CSkeletonX_ext::_EnumBoneVertices(SEnumVerticesCallback& C, Fvisual* V, u16
15461546
u16* indices = nullptr;
15471547
//R_CHK(V->pIndices->Lock(iBase, iCount, (void**)&indices, D3DLOCK_READONLY));
15481548

1549-
#if defined(USE_DX10) || defined(USE_DX11) || defined(USE_OGL)
1549+
#ifndef USE_DX9
15501550
VERIFY(*m_Indices);
15511551
indices = *m_Indices;
15521552
#else // USE_DX10

src/Layers/xrRender/HW.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class CHW
101101
stats_manager stats_manager;
102102
#endif
103103

104-
#if defined(USE_DX10) || defined(USE_DX11) || defined(USE_OGL)
104+
#ifndef USE_DX9
105105
void UpdateViews();
106106
#endif
107107
#if defined(USE_DX10) || defined(USE_DX11)

src/Layers/xrRender/R_Backend.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ class ECORE_API CBackend
110110
#endif // USE_OGL
111111

112112
// Vertices/Indices/etc
113-
#if defined(USE_DX10) || defined(USE_DX11) || defined(USE_OGL)
113+
#ifndef USE_DX9
114114
SDeclaration* decl;
115115
#else // USE_DX10
116116
IDirect3DVertexDeclaration9* decl;
@@ -151,7 +151,7 @@ class ECORE_API CBackend
151151
#ifdef DEBUG
152152
LPCSTR ps_name;
153153
LPCSTR vs_name;
154-
#if defined(USE_DX10) || defined(USE_DX11) || defined(USE_OGL)
154+
#ifndef USE_DX9
155155
LPCSTR gs_name;
156156
#ifdef USE_DX11
157157
LPCSTR hs_name;
@@ -183,7 +183,7 @@ class ECORE_API CBackend
183183
CTexture* textures_ps[CTexture::mtMaxPixelShaderTextures]; // stages
184184
//CTexture* textures_vs[5]; // dmap + 4 vs
185185
CTexture* textures_vs[CTexture::mtMaxVertexShaderTextures]; // 4 vs
186-
#if defined(USE_DX10) || defined(USE_DX11) || defined(USE_OGL)
186+
#ifndef USE_DX9
187187
CTexture* textures_gs[CTexture::mtMaxGeometryShaderTextures]; // 4 vs
188188
# ifdef USE_DX11
189189
CTexture* textures_hs[CTexture::mtMaxHullShaderTextures]; // 4 vs
@@ -303,7 +303,7 @@ class ECORE_API CBackend
303303
ICF void set_States(SState* _state);
304304
ICF void set_States(ref_state& _state) { set_States(&*_state); }
305305

306-
#if defined(USE_DX10) || defined(USE_DX11) || defined(USE_OGL)
306+
#ifndef USE_DX9
307307
ICF void set_Format(SDeclaration* _decl);
308308
#else // USE_DX10
309309
ICF void set_Format(IDirect3DVertexDeclaration9* _decl);
@@ -316,7 +316,7 @@ class ECORE_API CBackend
316316
#endif // USE_OGL
317317
ICF void set_PS(ref_ps& _ps) { set_PS(_ps->sh, _ps->cName.c_str()); }
318318

319-
#if defined(USE_DX10) || defined(USE_DX11) || defined(USE_OGL)
319+
#ifndef USE_DX9
320320
#ifdef USE_OGL
321321
ICF void set_GS(GLuint _gs, LPCSTR _n = 0);
322322
#else
@@ -431,7 +431,7 @@ class ECORE_API CBackend
431431
constants.seta(C, e, x, y, z, w);
432432
}
433433

434-
#if defined(USE_DX10) || defined(USE_DX11) || defined(USE_OGL)
434+
#ifndef USE_DX9
435435
ICF void set_c(R_constant* C, float A)
436436
{
437437
if (C)
@@ -483,7 +483,7 @@ class ECORE_API CBackend
483483
set_ca(&*ctable->get(n), e, x, y, z, w);
484484
}
485485

486-
#if defined(USE_DX10) || defined(USE_DX11) || defined(USE_OGL)
486+
#ifndef USE_DX9
487487
ICF void set_c(LPCSTR n, float A)
488488
{
489489
if (ctable)
@@ -534,7 +534,7 @@ class ECORE_API CBackend
534534
set_ca(&*ctable->get(n), e, x, y, z, w);
535535
}
536536

537-
#if defined(USE_DX10) || defined(USE_DX11) || defined(USE_OGL)
537+
#ifndef USE_DX9
538538
ICF void set_c(shared_str& n, float A)
539539
{
540540
if (ctable)
@@ -566,7 +566,7 @@ class ECORE_API CBackend
566566
// Debug render
567567
void dbg_DP(D3DPRIMITIVETYPE pt, ref_geom geom, u32 vBase, u32 pc);
568568
void dbg_DIP(D3DPRIMITIVETYPE pt, ref_geom geom, u32 baseV, u32 startV, u32 countV, u32 startI, u32 PC);
569-
#if defined(USE_DX10) || defined(USE_DX11) || defined(USE_OGL)
569+
#ifndef USE_DX9
570570
// TODO: DX10: Implement this.
571571
IC void dbg_SetRS(D3DRENDERSTATETYPE p1, u32 p2) { VERIFY(!"Not implemented"); }
572572
IC void dbg_SetSS(u32 sampler, D3DSAMPLERSTATETYPE type, u32 value) { VERIFY(!"Not implemented"); }

src/Layers/xrRender/R_Backend_DBG.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ void CBackend::dbg_DIP(D3DPRIMITIVETYPE pt, ref_geom geom, u32 baseV, u32 startV
1717

1818
void CBackend::dbg_Draw(D3DPRIMITIVETYPE T, FVF::L* pVerts, int vcnt, u16* pIdx, int pcnt)
1919
{
20-
#if defined(USE_DX10) || defined(USE_DX11) || defined(USE_OGL)
20+
#ifndef USE_DX9
2121
// TODO: DX10: implement
2222
// VERIFY(!"CBackend::dbg_Draw not implemented.");
2323
UNUSED(T);
@@ -33,7 +33,7 @@ void CBackend::dbg_Draw(D3DPRIMITIVETYPE T, FVF::L* pVerts, int vcnt, u16* pIdx,
3333
}
3434
void CBackend::dbg_Draw(D3DPRIMITIVETYPE T, FVF::L* pVerts, int pcnt)
3535
{
36-
#if defined(USE_DX10) || defined(USE_DX11) || defined(USE_OGL)
36+
#ifndef USE_DX9
3737
// TODO: DX10: implement
3838
// VERIFY(!"CBackend::dbg_Draw not implemented.");
3939
UNUSED(T);
@@ -162,7 +162,7 @@ void CBackend::dbg_DrawEllipse(Fmatrix& T, u32 C)
162162

163163
set_xform_world(T);
164164

165-
#if defined(USE_DX10) || defined(USE_DX11) || defined(USE_OGL)
165+
#ifndef USE_DX9
166166
// TODO: DX10: implement
167167
// VERIFY(!"CBackend::dbg_Draw not implemented.");
168168
// dbg_Draw(D3DPT_TRIANGLELIST,verts,vcnt,gFaces,224);

src/Layers/xrRender/R_Backend_Runtime.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ void CBackend::Invalidate()
149149
void CBackend::set_ClipPlanes(u32 _enable, Fplane* _planes /*=NULL */, u32 count /* =0*/)
150150
{
151151

152-
#if defined(USE_DX10) || defined(USE_DX11) || defined(USE_OGL)
152+
#ifndef USE_DX9
153153
// TODO: DX10: Implement in the corresponding vertex shaders
154154
// Use this to set up location, were shader setup code will get data
155155
// VERIFY(!"CBackend::set_ClipPlanes not implemented!");
@@ -196,7 +196,7 @@ void CBackend::set_ClipPlanes(u32 _enable, Fmatrix* _xform /*=NULL */, u32 fmask
196196
return;
197197
if (!_enable)
198198
{
199-
#if defined(USE_DX10) || defined(USE_DX11) || defined(USE_OGL)
199+
#ifndef USE_DX9
200200
// TODO: DX10: Implement in the corresponding vertex shaders
201201
// Use this to set up location, were shader setup code will get data
202202
// VERIFY(!"CBackend::set_ClipPlanes not implemented!");

src/Layers/xrRender/ResourceManager.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class ECORE_API CResourceManager
3838
// DX10 cut DEFINE_MAP_PRED(const char*,CRTC*, map_RTC, map_RTCIt, str_pred);
3939
using map_VS = xr_map<const char*, SVS*, str_pred>;
4040

41-
#if defined(USE_DX10) || defined(USE_DX11) || defined(USE_OGL)
41+
#ifndef USE_DX9
4242
using map_GS = xr_map<const char*, SGS*, str_pred>;
4343
#endif
4444

@@ -62,7 +62,7 @@ class ECORE_API CResourceManager
6262
map_VS m_vs;
6363
map_PS m_ps;
6464

65-
#if defined(USE_DX10) || defined(USE_DX11) || defined(USE_OGL)
65+
#ifndef USE_DX9
6666
map_GS m_gs;
6767
#endif
6868

@@ -159,7 +159,7 @@ class ECORE_API CResourceManager
159159

160160
// DX10 cut CRTC* _CreateRTC (LPCSTR Name, u32 size, D3DFORMAT f);
161161
// DX10 cut void _DeleteRTC (const CRTC* RT );
162-
#if defined(USE_DX10) || defined(USE_DX11) || defined(USE_OGL)
162+
#ifndef USE_DX9
163163
SGS* _CreateGS(LPCSTR Name);
164164
void _DeleteGS(const SGS* GS);
165165
#endif // USE_DX10

0 commit comments

Comments
 (0)