Jump to content
  • Advertisement
Sign in to follow this  
Rima

OpenGL How to render graphic data of a DC on an OpenGL context?

This topic is 4572 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'm a begginer in OpenGL programming, so excuse me for asking easy questions! I use a framework that gives a function, x.Ouput(HDC hdc,...) that outputs the graphics of a ActiveX control 'x' to a DC. I wan't to use this function to output its graphics to an OpenGL context. When I give the hDC of the OpenGL contex to this function, the graphics are drawn on it, but flikker badly. So I tried another solution. Pour the graphic data using x.Output(...) to a memory DC, and read data from that memory DC using glReadPixels(). But I could not figure out how to get the pointer to graphics data of DC; that is needed in glReadPixel(). How can I get access to graphics data of the DC using hDC? Is the pixel data of a DC compatible at all with readPixels()? By the way, I can export (using the function of library) the data to various graphics formats, such as DIB, JPG, .... Can it help by doing the job indirectly? I also have access to the screen hDC of the original ActiveX control. Thanks in advance. [Edited by - Rima on May 8, 2006 2:42:07 PM]

Share this post


Link to post
Share on other sites
Advertisement
I am assuming from your question that you have already made a rendering context for the DC and made it the current context. Is this correct?

Share this post


Link to post
Share on other sites
Honestly, I don't understand your question very well! Because I'm not familiar very much with GDI programming.
But, I can say, assume that I have made a seprate memory DC, and have gained its handle (Probalby via calling createCompatibleDC or something like that). and also assume that I've made it the current DC (again via another GDI function, that I don't know its name yet!)
Excuse me for my little knowledge!

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!