Jump to content
  • Advertisement
Sign in to follow this  
nerd_boy

SDL and NPAPI

This topic is 3968 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've been looking into NPAPI stuff lately, and was wanting to mess around with something along the lines of game making for it(not exactly;don't ask why). I was hoping to use SDL for the graphics, but I've run into a slight problem. It seems that SDL 'makes' the window area for you and you see nothing of it. However, NPAPI gives you the window area you are to use. I've been looking around and asked on the #sdl channel over on freenode, but all to no avail. In short,is it possible to have SDL draw to a window area that is already made or am I short out of luck? Thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement
I've looked into this as well, and found no suitable solution. There doesn't seem to be any way to hand SDL an existing window handle without some hacks.

These links might help, for Windows:

http://www.doctort.org/adam/nerd-notes/sdl-child-window.html
http://www.ogre3d.org/wiki/index.php/Using_SDL_Input

For now I'm resorting to modifying the SDL window creation code so that I can pass in a window handle, instead of having SDL create one. It was the only way I could get this to work on Windows and Linux, unfortunately.

If you have any better luck, I'd love to know.

Best of luck with your NPAPI programming. It's very fun. :)

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!