Jump to content
  • Advertisement
Sign in to follow this  
DTMdan

OpenGL rendering to memory?

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

Hi. I am making a DLL extension for a piece of 2D game coding software (called Fenix). My extension is a 3D eninge using opengl. At the moment I have it working by setting up opengl to take over the window. This of course disables Fenix's normal software drawing functions, which I don't want to do. However, Fenix has a buffer I could draw to (by the name of "background"). It consists of an array of 2 byte (16 bit) pixels. So, does anyone know how to setup opengl to render to this? I have heard of the possiblity of attaching a windows HBITMAP to a Device Context, but am not sure if a HBITMAP could be set up with the correct 16 bit format (without modifying the "background"), and whether that is what I need anyway... Can anyone help? Thanks :)

Share this post


Link to post
Share on other sites
Advertisement
Sorry for the late reply (I seem to have missed this one). You could always render to a texture (there's a few tutorials out there on how to do this), and then convert it from a 24-bit colour image to your 16-bit one using whatever method you find that does the job you need it to do.

Share this post


Link to post
Share on other sites
render to a bitmap. opengl can render to DIB's in windows. rude reference to google withheld, linky provided instead :P

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!