How can i render in single buffer by using egl

i want to use single buffer, but there is no parameter could be set in the egl 1.1, but in the egl 1.3, i found i could set the EGL_RENDER_BUFFER valu to EGL_SINGLE_BUFFER. BUT, in this website i just find the egl.h, and there is no lib, how can i use it ? and where can i get the egl 1.3

EGL is part of the graphics driver stack, so you must obtain it from the same place you got your OpenGL ES driver. If they aren’t shipping an EGL 1.3 implementation yet, then you are probably out of luck.

Khronos specifies APIs, but implementations are the responsibility of individual Khronos Members and Adopters.

Thanks for your answer. i use vincent, but it does not support opengl es 2.x, so i can’t use the egl 1.3. so how can i implement the single buffer?
because i found the function “eglswapbuffers” cost nearly 100ms, it is to long, did you found it , or it is a error in my code.

EGL 1.3 supports OpenGL ES 2.x, but it is not limited to supporting ES 2.x. The intent is that an EGL 1.3 implementation can support both OpenGL ES 1.x and OpenGL ES 2.x contexts.

That’s a separate question from whether Vincent in its current form includes an EGL 1.3 implementation, which I don’t know the answer to. Hans-Martin does participate in the forums here, so perhaps he will answer that question directly. He may also have some insight into performance of eglSwapBuffers(). In principle all that needs to do is a page flip or blit from the ES color buffer, and 1/10 of a second sounds like way too long a time for there to be a sync-to-retrace limitation, so I’m clueless offhand as to what might be causing the problem. But again, I’m not familiar with Vincent and am only speculating about what it might be doing.

One other thing: setting EGL_RENDER_BUFFER to EGL_SINGLE_BUFFER is not a guarantee. It’s just a hint to the driver, which may be ignored (and is likely to be ignored by OpenGL ES hardware renderers). It was added primarily to support OpenVG rendering to the visible window. As the EGL specification says:

EGL_RENDER_BUFFER specifies which buffer should be used for client API rendering to the window, as described in section 2.2.2. If its value is EGL_SINGLE_BUFFER, then client APIs should render directly into the visible window. If its value is EGL_BACK_BUFFER, then all client APIs should render into the back buffer. The default value of EGL_RENDER_BUFFER is EGL_BACK_BUFFER.

Client APIs may not be able to respect the requested rendering buffer. To determine the actual buffer being rendered to by a context, call eglQueryContext (see section 3.7.4).

Yes, even if Vincent would support this setting, it would actually be ignored. Vincent uses a GDI off-screen bitmap as target, as Windows does not provide direct access to the framebuffer. You might consider using PocketHAL if the GDI driver is indeed of such low quality as you indicate in your initial posting.

  • HM

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.