Files |  Tutorials |  Articles |  Links |  Home |  Team |  Forum |  Wiki |  Impressum

Aktuelle Zeit: Do Mär 28, 2024 15:56

Foren-Übersicht » English » English Programming Forum
Unbeantwortete Themen | Aktive Themen



Ein neues Thema erstellen Auf das Thema antworten  [ 4 Beiträge ] 
Autor Nachricht
 Betreff des Beitrags: Overlay Buffer Alternatives
BeitragVerfasst: Di Jul 27, 2010 22:47 
Offline
DGL Member

Registriert: Di Jul 27, 2010 21:40
Beiträge: 2
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?


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags: Re: Overlay Buffer Alternatives
BeitragVerfasst: Di Jul 27, 2010 22:55 
Offline
Guitar Hero
Benutzeravatar

Registriert: Do Sep 25, 2003 15:56
Beiträge: 7804
Wohnort: Sachsen - ERZ / C
Programmiersprache: Java (, Pascal)
Are Shaders an option?

You could write an post processing shader.

_________________
Blog: kevin-fleischer.de und fbaingermany.com


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags: Re: Overlay Buffer Alternatives
BeitragVerfasst: Mi Jul 28, 2010 07:41 
Offline
DGL Member
Benutzeravatar

Registriert: Do Dez 29, 2005 12:28
Beiträge: 2249
Wohnort: Düsseldorf
Programmiersprache: C++, C#, Java
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.

_________________
Yeah! :mrgreen:


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags: Re: Overlay Buffer Alternatives
BeitragVerfasst: Mi Jul 28, 2010 20:19 
Offline
DGL Member

Registriert: Di Jul 27, 2010 21:40
Beiträge: 2
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.


Nach oben
 Profil  
Mit Zitat antworten  
Beiträge der letzten Zeit anzeigen:  Sortiere nach  
Ein neues Thema erstellen Auf das Thema antworten  [ 4 Beiträge ] 
Foren-Übersicht » English » English Programming Forum


Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 5 Gäste


Du darfst keine neuen Themen in diesem Forum erstellen.
Du darfst keine Antworten zu Themen in diesem Forum erstellen.
Du darfst deine Beiträge in diesem Forum nicht ändern.
Du darfst deine Beiträge in diesem Forum nicht löschen.
Du darfst keine Dateianhänge in diesem Forum erstellen.

Suche nach:
Gehe zu:  
cron
  Powered by phpBB® Forum Software © phpBB Group
Deutsche Übersetzung durch phpBB.de
[ Time : 0.098s | 17 Queries | GZIP : On ]