0
我遇到了一個對我來說沒有多大意義的問題。我正在測試Nexus 6設備上的一些簡單的GLES30代碼。我將代碼設置爲API 23和OS棒棒糖5.0。根據維基它採用了Adreno 420,支持全GLES 3.1輪廓無法在nexus 6(和類似設備)上編譯gles 30
https://en.wikipedia.org/wiki/Nexus_6
然而,一個簡單的着色器未能按下面的編譯:
shader代碼:
#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;
}
日誌:
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
我將我的上下文設置爲3.0 如下。
const EGLint context_attribs[] = {EGL_CONTEXT_CLIENT_VERSION,
3, // Request opengl ES3.0
EGL_NONE};
context_ = eglCreateContext(display_, config_, NULL, context_attribs);
仍然沒有編譯。
我錯過了什麼嗎?
thx!
這是驅動程序更新問題。 – gmmo