if(!features.legacy)
{
- prog.bind_fragment_data(0, "frag_color");
+ // OpenGL ES does not support binding fragment shader outputs
+ if(get_gl_api()!=OPENGL_ES2)
+ prog.bind_fragment_data(0, "frag_color");
+
prog.bind_attribute(VERTEX4, "vertex");
if(features.lighting)
prog.bind_attribute(NORMAL3, "normal");
if(!features.legacy)
{
- source += "#version 130\n";
- if(use_blocks)
- source += "#extension GL_ARB_uniform_buffer_object: require\n";
+ if(get_gl_api()==OPENGL_ES2)
+ {
+ if(use_blocks)
+ source += "#version 300 es\n";
+ }
+ else
+ {
+ source += "#version 130\n";
+ if(use_blocks)
+ source += "#extension GL_ARB_uniform_buffer_object: require\n";
+ }
}
set<const VariableDefinition *> declared_types;