Looking for something

Started by
4 comments, last by Rob Loach 18 years, 3 months ago
I'm looking for something to work with OpenGL. My current project needs access to the keyboard and Window Message Pump isn't helping right now. I have been looking around and this this is what I've found. SDL, AllegroGL, or DirectInput. |I'm very familliar with Allegro, but I don't know if AllegroGL is stable enough. I think it was at version 0.24 or something like that. How does SDL compare to Allegro? I've done very little DX stuff. What's better for a game engine? I like to code in VC++ 6.0 and Windows. Brain21
Advertisement
Quote:Original post by brain21
I'm looking for something to work with OpenGL. My current project needs access to the keyboard and Window Message Pump isn't helping right now. I have been looking around and this this is what I've found. SDL, AllegroGL, or DirectInput. |I'm very familliar with Allegro, but I don't know if AllegroGL is stable enough. I think it was at version 0.24 or something like that. How does SDL compare to Allegro? I've done very little DX stuff. What's better for a game engine?

I like to code in VC++ 6.0 and Windows.

Brain21


SDL is pretty nice in my opinion. Using DirectInput beats the fact that openGL is cross-platform. SDL is cross-platform, and it has many interesting things such as window management, input, sound, and everything other than graphics. Also, it's very EASY to set up SDL with openGL.
Here's another vote for SDL. The only thing you'll be changing in a simple SDL example to render using OpenGL are the following lines:

SDL_GL_SetAttribute( SDL_GL_RED_SIZE, 5 );SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, 5 );SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, 5 );SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, 16 );SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 );flags |= SDL_OPENGL;


This of course is assuming you have a simple SDL example up and running. After that you just render anything in OpenGL and it will display in your SDL window. All event processing is done the same way as it's usually done with SDL.
Rob Loach [Website] [Projects] [Contact]
Thanks for the replies. I've looked at SDL and some tutorials and examples and it looks a bit confusing. I think I will hold off on switching to SDL for now. Maybe I'll try it out later. Plus there's something in the liscence that says I have to release my code if I ever sell/distribute it. I think I found a work-a-round for my project for now. Anyways, Thanks.

Brain21
Quote:Original post by brain21
Thanks for the replies. I've looked at SDL and some tutorials and examples and it looks a bit confusing. I think I will hold off on switching to SDL for now. Maybe I'll try it out later. Plus there's something in the liscence that says I have to release my code if I ever sell/distribute it. I think I found a work-a-round for my project for now. Anyways, Thanks.

Brain21


IMHO, it's not all that hard, but that's just me.

As for the releasing of the code, no. It's only if you statically link with SDL. As long as SDL.dll can easily be replaced with a different version and make changes, you don't have you release your code.
If you think SDL is confusing, then you'll most definately have troubles with OpenGL. Is the trouble that you haven't learned C++ yet, because that should definately be top priority. Aaron Cox's SDL Tutorails are a great series to learn SDL targeted towards game programming. He goes through the library one step at a time leading up towards the development of some simple arcade games. [wink]

Another viable solution would be to use GLFW. It's very nice to work with and gives you just the functionality you need to get an OpenGL application running.
Rob Loach [Website] [Projects] [Contact]

This topic is closed to new replies.

Advertisement