Jump to content
  • Advertisement
Sign in to follow this  
Zaris

SDL and GDI programming

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

can you mix SDL and GDI; Can you set up the window with standard windows programming and draw the images using SDL?

Share this post


Link to post
Share on other sites
Advertisement
In order to draw images with SDL you need an SDL surface. There is no way to convert a GDI handle to an SDL surface (without diving into the SDL source and hacking it in).

Share this post


Link to post
Share on other sites
The SDL documentation mentions something about the SetEnv() function. It allows you to send SDL a handle to the window you want to use, thus, you can create the window via the API, draw with SDL, flip, draw with the GDI.

here are the environment variables
The one you might want is SDL_WINDOWID

However, I think it'd be problematic drawing with both anyways.

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!