Skip to main content
gamedev.net
🔒 Locked

rendering to memory?

Started by DTMdan Mar 14, 2005 at 1:14 PM 1 replies 900+ views
Original Post
DTMdan
DTMdan
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 :)
Gorax
Gorax
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.
anist
anist
render to a bitmap. opengl can render to DIB's in windows. rude reference to google withheld, linky provided instead :P
As your leader, I encourage you from time to time, and always in a respectful manner, to question my logic. If you're unconvinced that a particular plan of action I've decided is the wisest, tell me so, but allow me to convince you and I promise you right here and now, no subject will ever be taboo. Except, of course, the subject that was just under discussion. The price you pay for bringing up either my Chinese or American heritage as a negative is - I collect your f***ing head.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.