Merge pull request #227 from magumagu/swbackend-fix-shaders

SW backend: make shaders work on Intel/Windows.
This commit is contained in:
Ryan Houdek 2014-04-02 14:51:14 -05:00
commit ca9ee3586f
2 changed files with 5 additions and 5 deletions

View File

@ -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"
@ -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"
@ -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"

View File

@ -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"
@ -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"