summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/VertexShaderGen.cpp
diff options
context:
space:
mode:
authorMarkus Wick <degasus@users.noreply.github.com>2016-07-31 10:38:42 +0200
committerGitHub <noreply@github.com>2016-07-31 10:38:42 +0200
commite281273cd7c7e173b9911ba0b8e01dd809cfd8ea (patch)
treeb70ab77109da2473b23bbe86fc7fc240e2d9a978 /Source/Core/VideoCommon/VertexShaderGen.cpp
parenta3438f916b8eb2123b8977ac334d104dd2640e5e (diff)
parent14e0b48ae43c3625f8571dec88121c91d575c65c (diff)
Merge pull request #4047 from lioncash/enum-fwd
VideoCommon: Make API_TYPE an enum class
Diffstat (limited to 'Source/Core/VideoCommon/VertexShaderGen.cpp')
-rw-r--r--Source/Core/VideoCommon/VertexShaderGen.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/Core/VideoCommon/VertexShaderGen.cpp b/Source/Core/VideoCommon/VertexShaderGen.cpp
index 77444e7dfc..aa69550bd8 100644
--- a/Source/Core/VideoCommon/VertexShaderGen.cpp
+++ b/Source/Core/VideoCommon/VertexShaderGen.cpp
@@ -12,6 +12,7 @@
#include "VideoCommon/NativeVertexFormat.h"
#include "VideoCommon/VertexLoaderManager.h"
#include "VideoCommon/VertexShaderGen.h"
+#include "VideoCommon/VideoCommon.h"
#include "VideoCommon/VideoConfig.h"
VertexShaderUid GetVertexShaderUid()
@@ -78,13 +79,13 @@ VertexShaderUid GetVertexShaderUid()
return out;
}
-ShaderCode GenerateVertexShaderCode(API_TYPE api_type, const vertex_shader_uid_data* uid_data)
+ShaderCode GenerateVertexShaderCode(APIType api_type, const vertex_shader_uid_data* uid_data)
{
ShaderCode out;
out.Write("%s", s_lighting_struct);
// uniforms
- if (api_type == API_OPENGL)
+ if (api_type == APIType::OpenGL)
out.Write("layout(std140%s) uniform VSBlock {\n",
g_ActiveConfig.backend_info.bSupportsBindingLayout ? ", binding = 2" : "");
else
@@ -96,7 +97,7 @@ ShaderCode GenerateVertexShaderCode(API_TYPE api_type, const vertex_shader_uid_d
GenerateVSOutputMembers(out, api_type, uid_data->numTexGens, uid_data->pixel_lighting, "");
out.Write("};\n");
- if (api_type == API_OPENGL)
+ if (api_type == APIType::OpenGL)
{
out.Write("in float4 rawpos; // ATTR%d,\n", SHADER_POSITION_ATTRIB);
if (uid_data->components & VB_HAS_POSMTXIDX)
@@ -430,7 +431,7 @@ ShaderCode GenerateVertexShaderCode(API_TYPE api_type, const vertex_shader_uid_d
// get rasterized correctly.
out.Write("o.pos.xy = o.pos.xy - o.pos.w * " I_PIXELCENTERCORRECTION ".xy;\n");
- if (api_type == API_OPENGL)
+ if (api_type == APIType::OpenGL)
{
if (g_ActiveConfig.backend_info.bSupportsGeometryShaders)
{