Sign in to follow this  

sdl opengl gtk intigration

This topic is 4641 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi im going to make a litle level editor for my game. I want to make it as plattform independent as possebly. I am already using SDL and opengGL for my rendering, so still want to be able to use this. And I think GTK+ looks like a good api too learn. Now the question :P How hard is it to integrate a opengl window in GTK ? If anybody got some good links to give me that would have been great. Also any reasons not to use GTK for this? Thats all folk;

Share this post


Link to post
Share on other sites
Another thing I was thinking about is this:

Should I make the "3dview + 2views of the editor" its own application?
And have an other one with GTK where I use the controls, like "create new box"
and such.

The 2 seperate applications could communicate throught sockets.. (using
SDLNet to make its protable .. )

Does this sound like a viable plan?

Share this post


Link to post
Share on other sites
GTK is a good API and with gtkmm it is very convenient to use with C++ too but I've heard it suffers from some stability problems on Windows. Personally I've never run into them but many people have complained. An alternative (if you use C++) might be wxWidgets. It has a built-in OpenGL widget (wxGLCanvas).

Share this post


Link to post
Share on other sites
In fact, gtk has a widget for embedding GL in a window.

Google for gtkglarea.

Although this won't necessarily apply to you, but when I coded my editor I tried gtk first, but I didn't like it. Although this might just be me, I found its windows implementation pretty damn buggy. I then moved to wxwidgets (then wxwindows) and never looked back.

It's up to you though, and it probably depends on your codebase. One thing I miss about gtk is its nice procedural model. wxwidgets is hardcore OOP, although it's possible to work around that.

edit: I just noticed Clash Rocker's link to gtkglext. I seem to remember it being more up to date than gtkglarea so ignore my advice :)

- baldurk

Share this post


Link to post
Share on other sites
Sign in to follow this