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
Re: An OpenGL ctrl for Linux / X11 [message #3611 is a reply to message #3609] |
Tue, 06 June 2006 22:46 |
|
mirek
Messages: 13975 Registered: November 2005
|
Ultimate Member |
|
|
cyrion wrote on Tue, 06 June 2006 13:48 |
luzr wrote on Tue, 06 June 2006 17:59 |
BTW, IMO "UseGLXVisual" could be replaces by existing "BackPaint(EXCLUDEPAINT)".
|
I have just tested BackPaint() but it doesn't work because DoPaint() is still called with a bad X visual
I get things like that :
X Error: BadDrawable (invalid Pixmap or Window parameter), request: X_CreateGC, resource id: 136899272 = 828EAC8
X Error: BadGC (invalid GC parameter), request: X_SetClipRectangles, resource id: 48234558 = 2E0003E
X Error: BadGC (invalid GC parameter), request: X_SetClipRectangles, resource id: 48234558 = 2E0003E
X Error: BadGC (invalid GC parameter), request: X_SetClipRectangles, resource id: 48234558 = 2E0003E
X Error: BadGC (invalid GC parameter), request: X_FreeGC, resource id: 48234558 = 2E0003E
IMHO, instead of using a variable like my dirty UseGLXVisual it would probably be best to take into account the fact that some controls can require special visuals that does not require a Draw object to be created. But I don't know how ! (a kind of BackPaint(3DPAINT) ?)
In the end, I think that Ctrl::Paint() should still be called, but with a 'null/disabled' Draw object in parameter...
|
Well, I have not studied your version in detail and in fact, I never really understood concept of X11 visuals, however...
Normal U++ widgets do not have corresponding objects (handles) in neither X11 or Win32 - U++ normally uses just top-level windows. That in turn means that there is only single Draw for each top-level Ctrl.
That of course is sometimes trouble - e.g. for OpenGL which requires separate GUI object. In order to solve that, there is special DHCtrl class, so far implemented in Win32 only, which has corresponing object (HWND) in Win32 and handles WM_PAINT completely separately. BackPaint(EXCLUDEPAINT) just clips the content of DHCtrl out of normal painting procedure (which is always called for entire top-level Ctrl). I believe that Linux should, if possible, follow the path. GLCtrl is derived from DHCtrl.
Mirek
|
|
|
|
|
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: Sun May 05 16:27:37 CEST 2024
Total time taken to generate the page: 0.02690 seconds
|