Skip to content

Commit

Permalink
#5909: Move OpenGLState type to rendersystem backend, it's not a publ…
Browse files Browse the repository at this point in the history
…ic interface and only used internally by the renderer.
  • Loading branch information
codereader committed Mar 13, 2022
1 parent ac47e37 commit 9333b5b
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 12 deletions.
1 change: 0 additions & 1 deletion include/precompiled_render_interfaces.h
Expand Up @@ -11,4 +11,3 @@
#include "irendersystemfactory.h"
#include "igl.h"
#include "iglprogram.h"
#include "iglrender.h"
3 changes: 1 addition & 2 deletions radiantcore/rendersystem/backend/GLProgramFactory.h
@@ -1,9 +1,8 @@
#pragma once

#include "iglrender.h"

#include <map>
#include <memory>
#include "igl.h"

namespace render
{
Expand Down
1 change: 1 addition & 0 deletions radiantcore/rendersystem/backend/LightInteractions.h
Expand Up @@ -11,6 +11,7 @@
namespace render
{

class OpenGLState;
class OpenGLShader;

/**
Expand Down
1 change: 1 addition & 0 deletions radiantcore/rendersystem/backend/LightingModeRenderer.cpp
Expand Up @@ -5,6 +5,7 @@
#include "OpenGLShaderPass.h"
#include "OpenGLShader.h"
#include "ObjectRenderer.h"
#include "OpenGLState.h"

namespace render
{
Expand Down
2 changes: 1 addition & 1 deletion radiantcore/rendersystem/backend/OpenGLShaderPass.h
Expand Up @@ -2,7 +2,7 @@

#include "math/Vector3.h"
#include "math/Matrix4.h"
#include "iglrender.h"
#include "OpenGLState.h"

#include <vector>
#include <map>
Expand Down
@@ -1,17 +1,17 @@
#pragma once

#include "igl.h"
#include "imodule.h"
#include "ishaders.h"
#include "ishaderlayer.h"

#include "math/Vector4.h"

#include <vector>
#include "render/Colour4.h"

// Full declaration in iglprogram.h
class GLProgram;

namespace render
{

/**
* \brief
* Data structure encapsulating various parameters of the OpenGL state machine,
Expand Down Expand Up @@ -241,7 +241,9 @@ class OpenGLState
m_pointsize(1),
m_linestipple_factor(1),
m_linestipple_pattern(0xAAAA),
glProgram(NULL),
glProgram(nullptr),
cubeMapMode(IShaderLayer::CUBE_MAP_NONE)
{ }
};

}
7 changes: 6 additions & 1 deletion radiantcore/rendersystem/backend/OpenGLStateLess.h
@@ -1,6 +1,9 @@
#pragma once

#include "iglrender.h"
#include "OpenGLState.h"

namespace render
{

/**
* Comparison class for OpenGLState objects.
Expand Down Expand Up @@ -36,3 +39,5 @@ struct OpenGLStateLess
return self < other;
}
};

}
2 changes: 1 addition & 1 deletion radiantcore/rendersystem/backend/SceneRenderer.cpp
@@ -1,7 +1,7 @@
#include "SceneRenderer.h"

#include "igl.h"
#include "iglrender.h"
#include "OpenGLState.h"

namespace render
{
Expand Down
3 changes: 2 additions & 1 deletion radiantcore/rendersystem/backend/SceneRenderer.h
@@ -1,10 +1,11 @@
#pragma once

class OpenGLState;
#include "irender.h"

namespace render
{

class OpenGLState;
class IRenderView;

/**
Expand Down
1 change: 1 addition & 0 deletions tools/msvc/DarkRadiantCore.vcxproj
Expand Up @@ -1010,6 +1010,7 @@
<ClInclude Include="..\..\radiantcore\rendersystem\backend\ObjectRenderer.h" />
<ClInclude Include="..\..\radiantcore\rendersystem\backend\OpenGLShader.h" />
<ClInclude Include="..\..\radiantcore\rendersystem\backend\OpenGLShaderPass.h" />
<ClInclude Include="..\..\radiantcore\rendersystem\backend\OpenGLState.h" />
<ClInclude Include="..\..\radiantcore\rendersystem\backend\OpenGLStateLess.h" />
<ClInclude Include="..\..\radiantcore\rendersystem\backend\OpenGLStateManager.h" />
<ClInclude Include="..\..\radiantcore\rendersystem\backend\SceneRenderer.h" />
Expand Down
3 changes: 3 additions & 0 deletions tools/msvc/DarkRadiantCore.vcxproj.filters
Expand Up @@ -2355,5 +2355,8 @@
<ClInclude Include="..\..\radiantcore\rendersystem\backend\BufferObjectProvider.h">
<Filter>src\rendersystem\backend</Filter>
</ClInclude>
<ClInclude Include="..\..\radiantcore\rendersystem\backend\OpenGLState.h">
<Filter>src\rendersystem\backend</Filter>
</ClInclude>
</ItemGroup>
</Project>

0 comments on commit 9333b5b

Please sign in to comment.