Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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
icon1.gif  An OpenGL ctrl for Linux / X11 [message #3578] Fri, 02 June 2006 18:40 Go to previous message
cyrion is currently offline  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)

 
Read Message icon1.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Using DOM like XML parser
Next Topic: Windows Service?
Goto Forum:
  


Current Time: Thu Apr 25 21:36:38 CEST 2024

Total time taken to generate the page: 0.03794 seconds