Jump to content
  • Advertisement
Sign in to follow this  
brain21

Looking for something

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

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

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


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

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!