[leveller] That old smoothie: Buffered OpenGL

  • From: Ray Gardener <rayg@xxxxxxxxxxxxxxxxxx>
  • To: leveller@xxxxxxxxxxxxx
  • Date: Tue, 28 Mar 2006 22:23:21 -0800

One of the longest-running issues with Leveller's display has been resolved for 2.6: there is now an option to fully buffer the OpenGL output in the 3D scene pane to completely avoid artifacting problems when one makes another app active and overlaps Leveller's window with it. The pixel ownership issue is solved by making the render target an offscreen bitmap, thus OpenGL draws everything it is asked to. You can hit F5, switch to another app, clobber the Lev window, and when the render is finished, Lev won't have anything missing.

There is a catch: I don't know of any video cards that do hardware acceleration for offscreen GL. Worse, depending on the OpenGL implementation, small pixel artifacts may appear sprinkled in the image. My guess is that on Windows, the OS switches to its own software renderer when offscreen OpenGL is requested, and it isn't as good as hardware versions from nVidia, etc.

The speed difference is of course noticeable; on my 1.6Ghz box the buffered drawing was on average about 50% of normal. This may sound not too bad but only because Lev is atypical in drawing lots of small triangles where a game normally draws fewer and bigger tris. The buffering option will therefore likely be extended with a "Don't buffer for documents above X pixels" setting. But if you have a card that supports accelerated offscreening, Lev 2.6 will take advantage of it.

Ray




Other related posts:

  • » [leveller] That old smoothie: Buffered OpenGL