PDA

View Full Version : C++ Wrapper class for GLX



arjenw
03-02-2004, 05:03 AM
Hi all,

Does anyone know of any C++ wrapper classes for GLX? I tried looking in the forums, but the search is not very effective when it comes to +'s http://www.opengl.org/discussion_boards/ubb/wink.gif

kindest regards,

Arjen

shinpaughp
03-02-2004, 04:14 PM
I have never heard of a C++ wrapper class for GLX nor would I want one. GLX functions are IMO easy to use and I incorporate their functionality into other classes (i.e. font class, display class, etc), but not all of GLX into one class. It would just add overhead. Also this should probably be posted in the Linux forum as you would get more responses being GLX is UNIX/Linux specific.

arjenw
03-02-2004, 10:59 PM
Hi,

I am sorry, my question was badly formulated and I was not thinking at all... not a good way to start in a new (to me) forum ... http://www.opengl.org/discussion_boards/ubb/smile.gif

What I wanted was a set of wrapper classes that allow the usage of GLX in an Object Orientated manner. I had already tried creating a wrapper class but somewhere it segfaulted and froze my X (not a good thing when you want to debug it http://www.opengl.org/discussion_boards/ubb/smile.gif.

Yesterday in the train home my brain actually started working and I now have what I wanted. I created a GLXApplication object which does all the initialisation, GLXScreen which handles screen input/output and a GLXScene abstract class which gets passed around from the application thread to GLXApplication and it's Render() method is called when the screen needs updating.

Now I just create a derivative of the GLXScene class to create a new OpenGL Scene which knows what keys/mouse actions are needed for itself and how to render itself.

So, forgive my stupidity and thank you for your reply when the stupidity showed http://www.opengl.org/discussion_boards/ubb/wink.gif

kindest regards,

Arjen