Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


OpenGL OpenGL and GUI's

This topic is 5528 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

Is it possible (in performance or just technically) to write a 3d engine that can be used both in-game and in a 3d gui editor written with a toolkit such as wxWindows or FLTK? If so, what are the things/techniques to look in to?

Share this post

Link to post
Share on other sites
Yes. You can embed an opengl window in just about any modern GUI toolkit. FLTK makes it easy and powerful - you can use gl drawing code in any widget and customise the look how you want.

The only difference between this and in a game is that the 3d scene is probably rendered to a smaller buffer and you are in windowed mode, which will slow things a bit.

Other things to look out for are:

- input: chances are you won''t accept input in the same ways
- event based timing: GUI toolkits run on an event model so your engine will have to do what it needs to when told to by an event and then release control back to the event driven framework.
- selection: you''ll want some kind of picking. this will take some planning to integrate with your engine in a non-hacky way.
- project organisation: it''ll be really handy to have the renderer (for instance) in a dynamic lib so that you don''t have to recompile the tools evertime you change the engine and vise versa.

theres probably a few more, but these are what I''ve come across myself.


Share this post

Link to post
Share on other sites
So events will require parts of the engine to be made in two versions?
Well, I think I''ll just stick to writing a GUI version, as long as both engine (mine or someone else) can use the same file format everything will be fine...

Thanks for the replies

Share this post

Link to post
Share on other sites
I use GLUI for an application I''m currently developing for Windows and Mac OS X. It''s working great so far. I had to make one small modification to add password masking to the edittext field, but since it''s open source I was able to do this in a few minutes.


The one thing about it is that it requires you to use GLUT for window management, which isn''t a big deal as GLUT is pretty nice to use on its own. An open source version of GLUT exists here if you''re interested:



Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!