GLUT is very simple but takes control of the main loop which can be annoying.
Win32 is the WRONG solution to this. It gives you all the power but you lose all the portability.
SDL is the RIGHT solution to this. It''s as easy (or easier!) than GLUT and as powerful as Win32. I cannot recommend it enough.
--oberon
Win32 vs GLUT
I have go to with SDL on this one, though I myself find some limitations with it that someone could perhaps lend a hand with ...
For example, a good GUI that''s interwoven with OpenGL. Those I''ve see usually take the form of GLUT, in that they take over the message loop, etc. I don''t to spend a month coming up with my own GUI ... what do you guys use?
- Ben
For example, a good GUI that''s interwoven with OpenGL. Those I''ve see usually take the form of GLUT, in that they take over the message loop, etc. I don''t to spend a month coming up with my own GUI ... what do you guys use?
- Ben
- Ben
heheh http://www.libsdl.org/
Also wxWindows is worth mentioning as another alternative
(PS: I don''t like GLUT or Win32, GLUT is limiting, and Win32 is scary and not portable)
Also wxWindows is worth mentioning as another alternative
(PS: I don''t like GLUT or Win32, GLUT is limiting, and Win32 is scary and not portable)
I''ve been searching if GLUT supports a dialog control box that I can control parameters of my openGL program. Does anyone know if this is possible? I know GLUT has support for a right click cascading menu, but what about a control dialog that is always open?
regarding the best way to port it:
this depends on how you wrote your code.
I always write mine so the windows (I use win32 now - I started with GLUT when learning OpenGL as it''s what redbook used then switched) and VCL setup is seperate from the opengl and the physics code.
Bascially this lets you just replace your input handling functions and your opengl loading and window creation with any other platforms code that you may already have.
then you can just use the exact same rendering, mechanics/maths and file handling code behind it.
Basically, stick the opengl code in seperate functions from the glut functions. after it is all running perfectly, just swap the glut functions with win32 ones (or more appropriately, move the other functions into a win32 project).
BTW - I use VCL for my win32 apps. That way if I want to port to Solaris I can use Borland stuff for it. And when they release the MacOSX version it will hopefully be pretty easy aswell.
this depends on how you wrote your code.
I always write mine so the windows (I use win32 now - I started with GLUT when learning OpenGL as it''s what redbook used then switched) and VCL setup is seperate from the opengl and the physics code.
Bascially this lets you just replace your input handling functions and your opengl loading and window creation with any other platforms code that you may already have.
then you can just use the exact same rendering, mechanics/maths and file handling code behind it.
Basically, stick the opengl code in seperate functions from the glut functions. after it is all running perfectly, just swap the glut functions with win32 ones (or more appropriately, move the other functions into a win32 project).
BTW - I use VCL for my win32 apps. That way if I want to port to Solaris I can use Borland stuff for it. And when they release the MacOSX version it will hopefully be pretty easy aswell.
Beer - the love catalystgood ol' homepage
quote:
Original post by pnaxighn
SDL is the RIGHT solution to this. It''s as easy (or easier!) than GLUT and as powerful as Win32.
I disagree with that. SDL is much better than GLUT but nothing as powerful as pure win32. I think SDL should really replace GLUT right now.
In case you don`t need the additional win32-specific things, then SDL really rocks however, there are cases in which you`re buying portability by going to the lowest common denominator, and this may not be acceptable on some circumstances.
Also, I don`t like the extension wrappers (a necessary evil) and I still wonder how to use WGL or GLX with it.
There won`t be so much problems in the near future (uberbuffers) however, my app still needs a WGL-specific (also avaiable to GLX) functionality and won`t work with SDL.
By the way, GLUT can be used for real things. Looks like TuxRacer has been coded using it.
Previously "Krohm"
GLUT is depreciated. Don''t use it.
Use SDL if you must. Definatly use it if you''re going cross platform.
I personaly find that having the power of Win32 is pretty good if you know what you''re doing.
Free Game: Yet Another Falling Block Game
Use SDL if you must. Definatly use it if you''re going cross platform.
I personaly find that having the power of Win32 is pretty good if you know what you''re doing.

This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement