Skip to content

Commit

Permalink
Merge pull request #227 from magumagu/swbackend-fix-shaders
Browse files Browse the repository at this point in the history
SW backend: make shaders work on Intel/Windows.
  • Loading branch information
Sonicadvance1 committed Apr 2, 2014
2 parents 2aac3f1 + bdcd5ba commit ca9ee35
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Source/Core/VideoBackends/Software/HwRasterizer.cpp
Expand Up @@ -39,7 +39,7 @@ namespace HwRasterizer
{
// Color Vertices
static const char *fragcolText =
"#if GL_ES\n"
"#ifdef GL_ES\n"
"precision highp float;\n"
"#endif\n"
"varying vec4 TexCoordOut;\n"
Expand All @@ -48,7 +48,7 @@ namespace HwRasterizer
"}\n";
// Texture Vertices
static const char *fragtexText =
"#if GL_ES\n"
"#ifdef GL_ES\n"
"precision highp float;\n"
"#define texture2DRect texture2D\n"
"#define sampler2DRect sampler2D\n"
Expand All @@ -60,7 +60,7 @@ namespace HwRasterizer
"}\n";
// Clear shader
static const char *fragclearText =
"#if GL_ES\n"
"#ifdef GL_ES\n"
"precision highp float;\n"
"#endif\n"
"uniform vec4 Color;\n"
Expand Down
4 changes: 2 additions & 2 deletions Source/Core/VideoBackends/Software/SWRenderer.cpp
Expand Up @@ -51,7 +51,7 @@ void SWRenderer::Shutdown()
void CreateShaders()
{
static const char *fragShaderText =
"#if GL_ES\n"
"#ifdef GL_ES\n"
"precision highp float;\n"
"#endif\n"
"varying vec2 TexCoordOut;\n"
Expand All @@ -60,7 +60,7 @@ void CreateShaders()
" gl_FragColor = texture2D(Texture, TexCoordOut);\n"
"}\n";
static const char *vertShaderText =
"#if GL_ES\n"
"#ifdef GL_ES\n"
"precision highp float;\n"
"#endif\n"
"attribute vec4 pos;\n"
Expand Down

0 comments on commit ca9ee35

Please sign in to comment.