I am working on GLES program using ARM GLES3.1 Emulator ver 2.2.
glShaderSource is giving 'GL_INVALID_OPERATION' error if shader is of following form
============================================
#ifndef GL_ES
#version 400 core
#define mediump
in vec3 position;
void main() {
gl_Position = vec4(position, 1.0);
}
#else
attribute vec3 position;
#endif
=======================================================
On console it writes FATAL - GLES: <gles::GLES31Api::glShaderSource 126> Invalid version detected.
It seems it is due to line "#version 400 core", but I wonder why it should go to this line when GL_ES is defined.
Thanks Adam. Really appreciate.