   Is GLUT a good choice?
  Hi all.I''m trying to learn a little openGL. I use GLUT as an aid to manage windows and input. What I''m more interested about is real-time real world simulation, and I think my ultimate goal will be to build a small physics engine (maybe in one decade or two) Now the question is whether I should stick to using GLUT or move to something else (like directly programming the OS). I mean does GLUT present any serious limitation for what concerns a small/medium project?I''m a total beginner and any help would be much appreciated. 
  If you''re a total beginner GLUT is perfect for you. Don''t worry about it until you start feeling the limitations in GLUT. When that time comes you can start making the more complex OS coding, like using Win32 or whatever...   "Yeah, I would''ve killed you, but I''m glad I didn''t - the paperwork is a bitch"  ;  Once you outgrow GLUT, SDL is a good choice. ;  To be honest, I feel that starting with GLUT then moving to SDL may be a waste of your time. If you are a reasonable programmer, but new to OGL, then I would recommend you start with SDL, as it is a more flexible/powerful system... and it''s easy to replicate most GLUT functionality in it. Its quite common in fact for SDL applications to look similar in structure to standard windows applications (ie a "message pump" and default render action). In short: SDL is TEH COOOL!!! ;  In fact, SDL is a bit toooo cool.  I wonder whose soul was sold I''d recommend SDL over GLUT any day.SDL daveandrews.org - a Christian Programmer''s Weblog | Dusty Engine - a task engine using Irrlicht | Computer Guys Run the WorldHow to be a Programmer;  Just as some people said that GLUT is a stepping stone for beginners before they use the ''real deal'' ie using the Windows API directly, I think SDL is also just a stepping stone, just a slightly better one. Am I wrong about this? ;  Thanks to all for your response.So SDL seems to be my next step... I''ll miss my good old glutBitmapCharacter(), that''s sooooo nice to watch variables. Happy CodingmMarco ;quote:Original post by AndreTheGiant   Just as some people said that GLUT is a stepping stone for beginners before they use the 'real deal' ie using the Windows API directly, I think SDL is also just a stepping stone, just a slightly better one. Am I wrong about this?   While I haven't used it myself, I think that is a misunderstanding. SDL is not just a better GLUT.  And GLUT shouldn't be just a stepping stone to the Win32 API.Win32 is complex.  GLUT provides an abstraction to it. It also works on Unix-like systems, providing an abstraction to the X Windows system.  SDL is also an abstraction, and yeah, I suppose you can see it as a more powerful GLUT, but SDL does more than just graphics. In fact, SDL can be used outside of OpenGL.  OpenGL is usually used with SDL to provide the 3D graphics. Think of SDL as being a competitor to DirectX.  OpenGL just happens to provide the Direct3D component, as SDL on its own provides basic 2D graphics...a better GDI maybe? But SDL provides networking, sound, input, etc.  On Windows systems, some of its functionality is provided by DirectX, so SDL is sometimes just an abstraction.Still, SDL and GLUT are portable.  You shouldn't lock yourself into an API that is proprietary.  If you code in Win32, you will find that your code won't work if you try to port it to another OS or even a console game system.  Code to an abstraction, and your code will be neater and cleaner and will most likely work better.  Encapsulating your OS dependent code in general functions makes it easier to minimize coding changes.  So if you are going to use Win32, GLUT, or even SDL to implement your program, hide that code behind generic code like OpenFile() and DrawWindow() so that if you do decide to change between the three, it won't require complete rewrites of the entire application.   [edited by - GBGames on December 8, 2003 5:02:28 PM];quote:Still, SDL and GLUT are portable.quote:So if you are going to use Win32, GLUT, or even SDL to implement your program, hide that code behind generic code like OpenFile() and DrawWindow() so that if you do decide to change between the three, it won't require complete rewrites of the entire application. If SDL is portable as you say, then why would you need to hide SDL code behind a generic function name like OpenFile() ? If its portable you shouldnt need to hide the code any, right?And thanks for the other info, helped straighten me out a bit. Ive spent a while learning OpenGL, and I wouldnt want to switch to another graphics language, but I guess I could still use OpenGL, and just use SDL for the other stuff - sound and input like you say. Am I getting this right?   [edited by - AndreTheGiant on December 8, 2003 6:10:33 PM];  You hide the code behind objects and functions, to provide a higher level interface to your underlying implementation. This makes it easier for you.. or anyone you are working with to use the code you have written. The code hiding that was being refered to, was the keeping of implementation separate from the interace. In this case however, the same underlying implementation would be allowable on any target platform (thanks to SDL). 