Hello,
I have 2 questions about rendering to texture of OpenGL ES 1.1.
A.
I find that the render result on the window surface is incorrect if
calling eglBindTexImage after rendering something to the windows
surface.
I tested three cases:
Case 1(call it after rendering to texture, the result is OK):
1. Make current(pbuffer)
2. Render to pbuffer
3. Bind pbuffer and texture
4. Make current(window surface)
5. glClear
6. glBindTexture(tex_id)
7. glDrawArrays
…
8. Release pbuffer from texture
The result is Ok.
Case 2(call it after making the main surface current, the result is OK):
1. Make current(pbuffer)
2. Render to pbuffer
3. Make current(window surface)
4. Bind pbuffer and texture
5. glClear
6. glBindTexture(tex_id)
7. glDrawArrays
…
8. Release pbuffer from texture
Case 3(call it after calling glClear or rendering something and before
rendering to the window surface with the texture maped, the result is
incorrect):
1. Make current(pbuffer)
2. Render to pbuffer
3. Make current(window surface)
4. glClear or render something
5. glBindTexture(tex_id)
6. Bind pbuffer and texture
7. glDrawArrays
…
8. Release pbuffer from texture
Why
the final render result is not correct? Rendering to window surface
should not affect the pbuffer surface and binding the pbuffer surface
to a texture should not affect the content of the window surface.
What time is the correct time to call eglBindTexImage?
B.
Is the eglReleaseTexImage a sync function? After the eglReleaseTexImage
returned, has the release operation been done, or just a release
command has been sent?
Thank you!
Chris
This is not expected behaviour - which device and OS are you seeing this on?