DGL
https://delphigl.com/forum/

Overlay Buffer Alternatives
https://delphigl.com/forum/viewtopic.php?f=19&t=9364
Seite 1 von 1

Autor:  JohnHutch [ Di Jul 27, 2010 22:47 ]
Betreff des Beitrags:  Overlay Buffer Alternatives

I want to draw temporary items to indicate user actions eg a line from a given location to the current mouse location which will update very quickly as the mouse moves. In the past I have used a GDI overlay approach which fails in newer graphics cards.

Windows seems not to support an Overlay Buffer.

Any suggestions how I can draw and update fast temporary lines onto an Windows OpenGL window without re rendering the whole screen?

Autor:  Flash [ Di Jul 27, 2010 22:55 ]
Betreff des Beitrags:  Re: Overlay Buffer Alternatives

Are Shaders an option?

You could write an post processing shader.

Autor:  Coolcat [ Mi Jul 28, 2010 07:41 ]
Betreff des Beitrags:  Re: Overlay Buffer Alternatives

There is no shader required. Just render your normal scene into a texture, e.g. using a framebufferobject (FBO). Every time you need to update your "overlay" render that texture using a screen size quad and render your overlay above it.

However, normally there are not that many mouse events. If your scene is not unusual complex you can simply redraw everything each time.

Autor:  JohnHutch [ Mi Jul 28, 2010 20:19 ]
Betreff des Beitrags:  Re: Overlay Buffer Alternatives

Thanks.

I have been using the complete scene redraw combined with the use of display lists, but as the scenes get more complex, the redraws do get to be too slow. I need to be able to "rubber band" the mouse line as the mouse moves. The user is building the scene using the mouse and the scene can get many thousand objects to render.

I will try the FBO and Texture approach.

Seite 1 von 1 Alle Zeiten sind UTC + 1 Stunde
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/