Windows 8.1 ANGLE reguires vert and frag shaders to use same precision

This commit is contained in:
Dale Stammen 2014-10-23 07:13:38 -07:00
parent 1112cad792
commit 01fbcfcd31
1 changed files with 4 additions and 2 deletions

View File

@ -418,7 +418,9 @@ bool GLProgram::compileShader(GLuint * shader, GLenum type, const GLchar* source
}
const GLchar *sources[] = {
#if (CC_TARGET_PLATFORM != CC_PLATFORM_WIN32 && CC_TARGET_PLATFORM != CC_PLATFORM_LINUX && CC_TARGET_PLATFORM != CC_PLATFORM_MAC)
#if CC_TARGET_PLATFORM == CC_PLATFORM_WINRT
(type == GL_VERTEX_SHADER ? "precision mediump float;\n precision mediump int;\n" : "precision mediump float;\n precision mediump int;\n"),
#elif (CC_TARGET_PLATFORM != CC_PLATFORM_WIN32 && CC_TARGET_PLATFORM != CC_PLATFORM_LINUX && CC_TARGET_PLATFORM != CC_PLATFORM_MAC)
(type == GL_VERTEX_SHADER ? "precision highp float;\n precision highp int;\n" : "precision mediump float;\n precision mediump int;\n"),
#endif
"uniform mat4 CC_PMatrix;\n"
@ -562,7 +564,7 @@ bool GLProgram::link()
_vertShader = _fragShader = 0;
#if DEBUG || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8)
#if DEBUG || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT)
glGetProgramiv(_program, GL_LINK_STATUS, &status);
if (status == GL_FALSE)