Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: Single buffered rendering

Hybrid View

  1. #1
    Junior Member Regular Contributor
    Join Date
    Nov 2012
    Location
    Bremen, Germany
    Posts
    149

    Single buffered rendering

    A while ago I wanted to try out single-buffered rendering under Windows as the final Screen-Rendering would have been a simple full-Screen-quad with a texture representing the whole Scene. I created a window without the double-buffered-flag and tried rendering the quad directly into the front-buffer. I got a black Screen. Just for fun I tried rendering into the backbuffer (which should not be there) and got the scene rendered correctly but a also gl-Error.
    Is rendering single-buffered just possible under Windows and NVIDIA-hardware?
    Is the behaviour described above expected? Is it a bug somewhere (either in my code or as such operation is non-supported)?
    Will rendering a full-screen quad cause flickering?

    Just curios - rendering double-buffered works fine...

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Jan 2007
    Posts
    1,180
    Try a glFlush at the end of your scene. Yes, single buffered rendering is possible (judging by the number of people who follow outdated GLUT tutorials and create single buffered contexts) but on modern Windows is meaningless as the DWM means that all contexts are double buffered by default anyway. A quick Google search for "opengl windows black screen" would have given you all the information you needed here. Wanting to create a single buffered context just for the hell of it seems a lot like pointless nitpicking IMO.

  3. #3
    Junior Member Regular Contributor
    Join Date
    Nov 2012
    Location
    Bremen, Germany
    Posts
    149
    Didn't seem to be worth the trouble, you're right. I'm sorry.
    That few mb of additional memory that could potentially have been saved won't hurt so much I guess.

  4. #4
    Senior Member OpenGL Pro
    Join Date
    Jan 2007
    Posts
    1,180
    It's worth adding here that single buffered/double buffered is part of context creation, which OpenGL itself doesn't specify but which is left to the windowing system. It's perfectly permissible for one windowing system to not have robust support for single buffered contexts, just as it would be perfectly permissible for a hypothetical other windowing system to not have any support at all for double buffered contexts.

    A few MB of memory saving is not much nowadays; we're in the desktop GL forums, not the ES forums, so mobile and mobile constraints are not relevant here - we're talking the equivalent of a handful of textures worth, really. There's bigger, more important stuff to focus one's energys at.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •