Home » Extra libraries, Code snippets, applications etc. » U++ users applications in progress and useful code snippets, including reference examples! » An OpenGL ctrl for Linux / X11
An OpenGL ctrl for Linux / X11 [message #3578] |
Fri, 02 June 2006 18:40 |
|
cyrion
Messages: 15 Registered: May 2006 Location: Grenoble, France
|
Promising Member |
|
|
Hi,
I have just finished (the first version of) an opengl ctrl for X11.
It works well but I had to make modifications to U++ core, and I would like to know if there is a best way to proceed.
The modifications I have made are:
1/ in CtrlCore.h, class Ctrl :
* I put the static ArrayMap<> Xwindow() in protected section.
I had to do so because the Create() method does not allow to use another X visual than the top window one. So I had to put my new X (sub)window "by hand" into the static ArrayMap of windows.
* I added a 'bool UseGLXVisual' (in protected section), defaulting to false except in my new Ctrl.
2/ in X11Wnd.h
* in Ctrl::DoPaint(), I 'return' without creating a GC if UseGLXVisual is true (just before XCreateGC).
I had to do so to prevent the Ctrl::Draw() method to be called with a GC context that is not compatible with my X window.
Finally, all seems to work fine : resizing, moving, hide/show, multiple gl ctrls, etc...
I hope that the source code will be more comprehensible than my english.
Btw, _many_many_ thanks for this wonderful library !
Damien
(Linux 2.6, debian, Xorg, U++ 605)
|
|
|
|
|
An OpenGL ctrl for Linux / X11
By: cyrion on Fri, 02 June 2006 18:40
|
|
|
[EDIT] An OpenGL ctrl for Linux / X11
By: cyrion on Sat, 03 June 2006 12:36
|
|
|
Re: [EDIT] An OpenGL ctrl for Linux / X11
By: mirek on Mon, 05 June 2006 10:57
|
|
|
Re: An OpenGL ctrl for Linux / X11
By: cyrion on Tue, 06 June 2006 16:02
|
|
|
Re: An OpenGL ctrl for Linux / X11
By: mirek on Tue, 06 June 2006 17:59
|
|
|
Re: An OpenGL ctrl for Linux / X11
By: cyrion on Tue, 06 June 2006 19:48
|
|
|
Re: An OpenGL ctrl for Linux / X11
By: mirek on Tue, 06 June 2006 22:46
|
|
|
Re: An OpenGL ctrl for Linux / X11
By: cyrion on Thu, 08 June 2006 07:00
|
|
|
Re: An OpenGL ctrl for Linux / X11
By: mirek on Fri, 09 June 2006 14:39
|
|
|
Re: An OpenGL ctrl for Linux / X11
By: cyrion on Fri, 09 June 2006 18:01
|
|
|
Re: An OpenGL ctrl for Linux / X11
By: h3l1 on Mon, 02 October 2006 18:14
|
|
|
Re: An OpenGL ctrl for Linux / X11
By: mirek on Mon, 02 October 2006 19:35
|
|
|
Re: An OpenGL ctrl for Linux / X11
By: cyrion on Mon, 02 October 2006 20:08
|
|
|
Re: An OpenGL ctrl for Linux / X11
By: h3l1 on Fri, 06 October 2006 15:47
|
|
|
Re: An OpenGL ctrl for Linux / X11
By: cyrion on Fri, 17 November 2006 01:46
|
|
|
Re: An OpenGL ctrl for Linux / X11
By: h3l1 on Mon, 20 November 2006 14:18
|
|
|
Re: An OpenGL ctrl for Linux / X11
By: cyrion on Mon, 20 November 2006 21:56
|
Goto Forum:
Current Time: Thu Apr 25 21:36:38 CEST 2024
Total time taken to generate the page: 0.03794 seconds
|