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

Aktuelle Zeit: Sa Dez 21, 2024 17:38

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



Ein neues Thema erstellen Auf das Thema antworten  [ 4 Beiträge ] 
Autor Nachricht
BeitragVerfasst: Di Jan 05, 2010 13:39 
Offline
DGL Member

Registriert: Do Sep 04, 2008 11:30
Beiträge: 7
Wohnort: England
I want to use OpenGL graphics on subregions of both dialog forms and child forms of a MDI application. I have a multiple rendering context version working, rendering onto TPanels on both kinds of form and calling wglMakeCurrent frequently to activate/deactivate appropriately. I use wglShareLists so that textures are common to all rendering contexts. I was very happy at getting this all working when I discovered that a number of Intel graphics drivers fail to deal with wglShareLists. :( This made me wonder if somehow I could get the results I want with a single rendering context.

Can anyone suggest how I achieve this? My idea is to render to single window positioned to match the region of the active child form (or dialog box), and bitblt this to a bitmap as each child deactivates. The non-active forms thus display a bitmap image of the rendering. Initially I tried using a Tpanel on the main form as the OGL window, which paints infront of the MDI child forms but I have to "cut" a hole in the diaglog boxes to show it. Then I used a borderless form shown SW_SHOWNOACTIVATE and setting the WMNCHitTest message result to HTTRANSPARENT to prevent mouse clicks giving it focus. Where my idea runs into difficulty is with floating toolbars etc. I need to manage the zorder of the OGL window so that it is temporarily topmost before the bitblt, then located just infront of the form it is rendering so floating toolbars etc. are painted infront of it. Managing the zorder is giving me problems. And perhaps using a form provides more funcationality than I need. Maybe a simple control, something more like a THintWindow, would be better?

Long question I know, but interesting (I hope) and a good solution would have all kinds of uses.


Nach oben
 Profil  
Mit Zitat antworten  
BeitragVerfasst: Mi Jan 06, 2010 06:39 
Offline
DGL Member
Benutzeravatar

Registriert: Mi Jul 21, 2004 22:39
Beiträge: 360
Wohnort: UK, Scotland
If you don't mind doing a bit of coding you could just create your own GUI system complete with forms, etc. That way everything would be rendered in one opengl context. But look like they are multiple windows.

I.E
http://www.youtube.com/watch?v=CUdDxJbPkN8

_________________
Free Map Editor - Game Requirements - Stucuk.Net
-Stu


Nach oben
 Profil  
Mit Zitat antworten  
BeitragVerfasst: Mi Jan 06, 2010 09:41 
Offline
DGL Member

Registriert: Do Sep 04, 2008 11:30
Beiträge: 7
Wohnort: England
Just a bit of coding.....
You know I have thought about a home-made MDI, but I like the consistency of how standard Windows controls work (especially all the keyboard control, short cuts etc.) and reproducing all that does seem rather a lot of work.

Your example looks very nice too, just how much work was that? If I needed simultaneous movement in separate windows like that then it would be the way to go. But only the active window needs rendering for animation, bitmaps would do for the rest. It is a bit like wanting OpenGL rendered labels or buttons throughout a standard GUI application, I have been looking for examples of that to borrow ideas from.

I am almost there with my approach, if only I coud control the z-order better. It seems once I have made a window topmost, I am unable to return it to the previous z-order just infront the active child form, but behind any floating toolbars or normal (non-child) forms etc. The mysteries of SetWindowPos.


Nach oben
 Profil  
Mit Zitat antworten  
BeitragVerfasst: Mi Jan 06, 2010 12:30 
Offline
DGL Member
Benutzeravatar

Registriert: Mi Jul 21, 2004 22:39
Beiträge: 360
Wohnort: UK, Scotland
The example link i posted's code was more complex than it needed to be(Instead of having everything based off of one Basic GUI element it had separate stuff which wasted alot of code on doing the same thing in another object). With the latest GUI system i made (Which has no z-order, tho z-order isnt hard to add) it proberly took about a week or so max.

_________________
Free Map Editor - Game Requirements - Stucuk.Net
-Stu


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 0 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.009s | 16 Queries | GZIP : On ]