Skip to content

Commit 1196cac

Browse files
committed
Move xrRender_R4 and xrRender_GL to separate namespaces
1 parent f326b8d commit 1196cac

File tree

11 files changed

+77
-28
lines changed

11 files changed

+77
-28
lines changed

src/Layers/xrRenderPC_GL/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,7 @@ target_compile_definitions(xrRender_GL
418418
PRIVATE
419419
XRRENDER_GL_EXPORTS
420420
USE_OGL
421+
RENDER_NAMESPACE=render_gl
421422
PURE_DYNAMIC_CAST
422423
)
423424

src/Layers/xrRenderPC_GL/stdafx.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@
1818
#include <SDL_opengl.h>
1919
#include <SDL_opengl_glext.h>
2020

21+
#define R_GL 0
22+
#define R_R1 1
23+
#define R_R2 2
24+
#define R_R3 3
25+
#define R_R4 4
26+
#define RENDER R_GL
27+
2128
#include "Layers/xrRenderGL/CommonTypes.h"
2229

2330
#include "Layers/xrRenderGL/glHW.h"
@@ -31,13 +38,6 @@
3138
#include "Layers/xrRender/Blender.h"
3239
#include "Layers/xrRender/Blender_CLSID.h"
3340

34-
#define R_GL 0
35-
#define R_R1 1
36-
#define R_R2 2
37-
#define R_R3 3
38-
#define R_R4 4
39-
#define RENDER R_GL
40-
4141
#include "Common/_d3d_extensions.h"
4242

4343
#include "Layers/xrRender/ResourceManager.h"

src/Layers/xrRenderPC_GL/xrRender_GL.vcxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<ItemDefinitionGroup>
2727
<ClCompile>
2828
<AdditionalIncludeDirectories>$(SolutionDir)Layers\xrRender_R2;$(xrSdkDir)include\DirectXMesh;$(xrExternals)imgui;$(xrExternals)OpenAutomate\inc;$(xrExternals)gli;$(xrExternals)gli\external;$(xrExternals)AGS_SDK;$(xrExternals)glslang\glslang\Public;$(xrExternals)sse2neon\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
29-
<PreprocessorDefinitions>_USRDLL;XRRENDER_GL_EXPORTS;USE_OGL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
29+
<PreprocessorDefinitions>_USRDLL;XRRENDER_GL_EXPORTS;USE_OGL;RENDER_NAMESPACE=render_gl;%(PreprocessorDefinitions)</PreprocessorDefinitions>
3030
<AdditionalOptions Condition="'$(EnableUnitySupport)'=='true'">/bigobj %(AdditionalOptions)</AdditionalOptions>
3131
</ClCompile>
3232
<Link>

src/Layers/xrRenderPC_R4/stdafx.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@
3535

3636
#include <tracy/TracyD3D11.hpp>
3737

38+
#define R_GL 0
39+
#define R_R1 1
40+
#define R_R2 2
41+
#define R_R3 3
42+
#define R_R4 4
43+
#define RENDER R_R4
44+
3845
#include "Layers/xrRenderDX11/CommonTypes.h"
3946

4047
#include "Layers/xrRenderDX11/dx11HW.h"
@@ -47,13 +54,6 @@
4754
#include "Layers/xrRender/Blender.h"
4855
#include "Layers/xrRender/Blender_CLSID.h"
4956

50-
#define R_GL 0
51-
#define R_R1 1
52-
#define R_R2 2
53-
#define R_R3 3
54-
#define R_R4 4
55-
#define RENDER R_R4
56-
5757
#include "Common/_d3d_extensions.h"
5858

5959
#include "Layers/xrRender/ResourceManager.h"

src/Layers/xrRenderPC_R4/xrRender_R4.vcxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<ItemDefinitionGroup>
2727
<ClCompile>
2828
<AdditionalIncludeDirectories>$(SolutionDir)Layers\xrRender_R2;$(xrExternals)imgui;$(xrExternals)OpenAutomate\inc;$(xrSdkDir)include\nvapi;$(xrSdkDir)include\DirectXMesh;$(xrExternals)AGS_SDK;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
29-
<PreprocessorDefinitions>_USRDLL;XRRENDER_R4_EXPORTS;USE_DX11;%(PreprocessorDefinitions)</PreprocessorDefinitions>
29+
<PreprocessorDefinitions>_USRDLL;XRRENDER_R4_EXPORTS;USE_DX11;RENDER_NAMESPACE=render_r4;%(PreprocessorDefinitions)</PreprocessorDefinitions>
3030
<AdditionalOptions Condition="'$(EnableUnitySupport)'=='true'">/bigobj %(AdditionalOptions)</AdditionalOptions>
3131
</ClCompile>
3232
<Link>

src/xrEngine/Environment.h

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,17 @@ struct SThunderboltDesc;
2626
struct SThunderboltCollection;
2727
class CLensFlareDescriptor;
2828

29-
namespace xray::render::RENDER_NAMESPACE
29+
namespace xray::render
30+
{
31+
namespace render_r4
32+
{
33+
class dxEnvironmentRender;
34+
}
35+
namespace render_gl
3036
{
3137
class dxEnvironmentRender;
3238
}
39+
} // namespace xray::render
3340

3441
#define DAY_LENGTH 86400.f
3542

@@ -231,7 +238,8 @@ class ENGINE_API CEnvDescriptorMixer : public CEnvDescriptor
231238

232239
class ENGINE_API CEnvironment : public xray::editor::ide_tool
233240
{
234-
friend class xray::render::RENDER_NAMESPACE::dxEnvironmentRender;
241+
friend class xray::render::render_r4::dxEnvironmentRender;
242+
friend class xray::render::render_gl::dxEnvironmentRender;
235243

236244
struct str_pred
237245
{

src/xrEngine/GameFont.h

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,24 @@
77
#include "xrCore/xrstring.h"
88
#endif
99

10-
namespace xray::render::RENDER_NAMESPACE
10+
namespace xray::render
11+
{
12+
namespace render_r4
13+
{
14+
class dxFontRender;
15+
}
16+
namespace render_gl
1117
{
1218
class dxFontRender;
1319
}
20+
} // namespace xray::render
1421

1522
class IFontRender;
1623

1724
class ENGINE_API CGameFont : public IGameFont
1825
{
19-
friend class xray::render::RENDER_NAMESPACE::dxFontRender;
26+
friend class xray::render::render_r4::dxFontRender;
27+
friend class xray::render::render_gl::dxFontRender;
2028

2129
private:
2230
struct String

src/xrEngine/Rain.h

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,22 @@
1414
// refs
1515
class ENGINE_API IRender_DetailModel;
1616

17-
namespace xray::render::RENDER_NAMESPACE
17+
namespace xray::render
18+
{
19+
namespace render_r4
20+
{
21+
class dxRainRender;
22+
}
23+
namespace render_gl
1824
{
1925
class dxRainRender;
2026
}
27+
} // namespace xray::render
2128

2229
class ENGINE_API CEffect_Rain
2330
{
24-
friend class xray::render::RENDER_NAMESPACE::dxRainRender;
31+
friend class xray::render::render_r4::dxRainRender;
32+
friend class xray::render::render_gl::dxRainRender;
2533

2634
private:
2735
struct Item

src/xrEngine/StatGraph.h

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,23 @@
66
#include "Include/xrRender/StatGraphRender.h"
77
#include "xrCommon/xr_deque.h"
88

9-
namespace xray::render::RENDER_NAMESPACE
9+
namespace xray::render
10+
{
11+
namespace render_r4
12+
{
13+
class dxStatGraphRender;
14+
}
15+
namespace render_gl
1016
{
1117
class dxStatGraphRender;
1218
}
19+
} // namespace xray::render
1320

1421
//---------------------------------------------------------------------------
1522
class ENGINE_API CStatGraph : public pureRender
1623
{
17-
friend class xray::render::RENDER_NAMESPACE::dxStatGraphRender;
24+
friend class xray::render::render_r4::dxStatGraphRender;
25+
friend class xray::render::render_gl::dxStatGraphRender;
1826

1927
public:
2028
enum EStyle

src/xrEngine/thunderbolt.h

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,17 @@ class ENGINE_API IRender_DetailModel;
1414
class ENGINE_API CLAItem;
1515
class ENGINE_API CEnvDescriptorMixer;
1616

17-
namespace xray::render::RENDER_NAMESPACE
17+
namespace xray::render
18+
{
19+
namespace render_r4
20+
{
21+
class dxThunderboltRender;
22+
}
23+
namespace render_gl
1824
{
1925
class dxThunderboltRender;
2026
}
27+
} // namespace xray::render
2128

2229
struct ENGINE_API SThunderboltDesc
2330
{
@@ -78,7 +85,8 @@ struct ENGINE_API SThunderboltCollection
7885
//
7986
class ENGINE_API CEffect_Thunderbolt
8087
{
81-
friend class xray::render::RENDER_NAMESPACE::dxThunderboltRender;
88+
friend class xray::render::render_r4::dxThunderboltRender;
89+
friend class xray::render::render_gl::dxThunderboltRender;
8290

8391
protected:
8492
xr_vector<SThunderboltCollection*> collections;

0 commit comments

Comments
 (0)