Thanks for the reply.
The version of EGL is 1.4 and the platform supports RGB565.
I tried switching to RGBA8888 but it still didn't work.
And in the code of NV's demo I found that the "configAttributes" it uses is different as follows:
Code:
EGLint configAttrs[] = {
EGL_RED_SIZE, 1,
EGL_GREEN_SIZE, 1,
EGL_BLUE_SIZE, 1,
EGL_DEPTH_SIZE, 16,
EGL_SAMPLE_BUFFERS, 0,
EGL_SAMPLES, 0,
EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
EGL_NONE
};
And there are some evaluations below:
Code:
// If FSAA requested, get a config that supports it
if (fsaa > 1) {
configAttrs[9] = 1;
configAttrs[11] = fsaa;
}
I don't know what value they give to "fsaa", I tried "2" and "4", but neither could find a matched configuration.
So I changed the value referring to that(0 to fsaa) and had another try, now the EGL context could be successfully created but the program still failed. Here's part of the log:
Code:
......
06:10:48 T:1099496096 M:332644352 DEBUG: RefreshEGLContext Succeeded! Format:A0|R1|G1|B1|BPP16
......
06:10:48 T:1099496096 M:329379840 DEBUG: GL: Vertex Shader compilation log:
06:10:48 T:1099496096 M:329379840 DEBUG: 14 lines, 0 errors.
06:10:48 T:1099496096 M:329379840 DEBUG: GL: Vertex Shader compiled successfully
06:10:48 T:1099496096 M:329220096 DEBUG: GL: Pixel Shader compilation log:
06:10:48 T:1099496096 M:329220096 DEBUG:
S0021: Fragment shader pragma that conflicts with fixed-function state ignored : #pragma profilepragma blendoperation( gl_FragColor, GL_FUNC_ADD, GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA )11 lines, 0 errors.
06:10:48 T:1099496096 M:329220096 DEBUG: GL: Fragment Shader compiled successfully
06:10:48 T:1099496096 M:329220096 ERROR: GL: Error validating shader
06:10:48 T:1099496096 M:329220096 ERROR:
P1202: Texture's gl states do not match with shader's
06:10:48 T:1099496096 M:329220096 ERROR: GUI Shader - Initialise failed
......
By the way, what value should I use to define BPP?
And here is the code they use to initialize EGL:
Code:
// Initialize EGL
eglStatus = eglInitialize(gfxState.display, 0, 0);
Does it matter?
Is it time I deal with the shader?
Thanks for your time~