I’m using OpenGL ES 2.0, with GLSL ES 1.0.0.
Currently I’m rendering a square to screen to the screen, and now attempting to apply a texture.
I’m having trouble using “varying” in vertex and fragment shaders, receiving the error message:
- Failed to compile vertex shader -
0(3) : error C5060: out can't be used with non-varying tex_varying
in vec4 texture_coord ;
in vec4 position ;
out vec2 tex_varying ;
uniform mat4 translate ;
void main ( )
{
gl_Position = translate * position ;
tex_varying = texture_coord . xy ;
}
I’ve read through the documentation and can’t figure out what I’m doing wrong.
Oops. The error message containing out is not consistent with your source ode. Do you post process your source code somehow? Which ES implementation this is? Is it some ES wrapper on desktop?
Thanks, I’ve contacted the developers of the platform who use this version to see if there’s a problem on their end. But I don’t think there’s a way I can change this.
I know that this code works with the version of ES 2.0 when developing for iOS. Currently I’m porting to a different platform which seems to use an older version.
There are no “versions of ES 2.0”. There’s one version: ES 2.0.
What you are encountering is a driver bug brought on by NVIDIA’s apparent refusal to compile actual GLSL.
In general, OpenGL ES does not work on the desktop, just as desktop GL does not work on mobile platforms. NVIDIA does have this ES profile extension, but as you can see, it has some issues.