I am running into an issue that does not make too much sense to me. I am testing some simple GLES30 code on a Nexus 6 device an HTC. I am setting the code to API 23 and OS lollipop 5.0. According to the wiki it uses Adreno 420 which supports full gles 3.1 profile
https://en.wikipedia.org/wiki/Nexus_6
Yet, a simple shader fails the compilation as below:
Shader code:
#version 300 es
layout(location = 4) in vec4 a_position;
layout(location = 5) in vec4 a_color;
uniform mat4 u_mvpMatrix;
out vec4 v_color;
void main()
{
v_color = a_color;
gl_Position = u_mvpMatrix * a_position;
}
Logs:
Vertex shader failed to compile with the following errors:
ERROR: 0:2: error(#308) Profile " " is not available in shader version 1777753240
ERROR: 0:1: error(#132) Syntax error: "es" parse error
ERROR: error(#273) 2 compilation errors. No code generated
I set my Context to 3.0 as below.
const EGLint context_attribs[] = {EGL_CONTEXT_CLIENT_VERSION,
3, // Request opengl ES3.0
EGL_NONE};
context_ = eglCreateContext(display_, config_, NULL, context_attribs);
still did not compile.
Am I missing something?
thx!