Jump to content
  • Advertisement
Sign in to follow this  
Runicode

Using SDL with OpenGL or DirectX

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

Right now I'm working on a small project and most of the interface, hud, menus, etc... are written in SDL. The event handling, window, input, and sound are also using SDL. Is it possible to just use SDL for simple 2d thigns like menus, maps, mouseovers, etc... and let directx or opengl handle all of the 3d goodies and particle effects? I havent tried this and wasn't sure if it was possible. I would hate to have to rewrite everything into another API. Thanks.

Share this post


Link to post
Share on other sites
Advertisement
It depends on what you use SDL for. You certainly aren't able to mix drawing with SDL and OpenGL (or you might be able to, with great difficulty). SDL provides cross-platform interfaces for audio, input devices, and rendering windows.

So yes, you can let OpenGL or DirectX handle the rendering, while using the SDL API to handle input and events. However, I'm not sure you can mix SDL (software) rendering with DirectX/OpenGL (hardware) rendering ...

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!