3

I have an OpenGL ES 2 app that's working fine with the default window surface:

eglSurface = eglCreateWindowSurface( eglDisplay, config, nativeWindow, NULL );

When I try and make it single buffered, like this:

static const EGLint surf_attribute_list[] = {
    EGL_RENDER_BUFFER, EGL_SINGLE_BUFFER,
    EGL_NONE // attribute list is termintated with EGL_NONE
};
eglSurface = eglCreateWindowSurface( eglDisplay, config, nativeWindow, surf_attribute_list );

I no longer see anything drawn on the screen.

Is there something else I need to do to switch from double to single buffering?

damian
  • 151
  • 5

1 Answers1

2

I was unable to solve this. I needed single-buffering so that I could leave content on existing framebuffer between one frame and the next, and ended up using an FBO to achieve this.

damian
  • 151
  • 5
  • It is 10 years later and I have the same issue. FBO is such a waste, let's make a third buffer to solve not being able to use one buffer. But it is what it is... – scippie Jan 19 '24 at 12:44