Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Silex

Embedding Direct3D/OpenGL in a windows form

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

Is it possible to have a region of a windows form display OpenGL or Direct3D graphics? If so, how would I go about doing it? Thanks

Share this post


Link to post
Share on other sites
Advertisement
A viewport would not work; try just putting on a picture control and giving that to DX instead. Don''t know about OGL.

Share this post


Link to post
Share on other sites
you can use any windows handle to render an opengl image to (should be the same as dx but I have only programmed in dx once or twice over the past 7 years just to see the difference between opengl and dx).

You can render to images, windows, edit boxes, buttons, checkboxes.


What you can do if you want a funny shape, is render to the form but do so using the create region functions.
I'd do it like this:
create a form
create an static image on that form
use regions to change the shape of that image
then use that image's handle for the rendering surface/context


edit - before and after shots

large context, and some text boxes etc
lots of contexts

[edited by - Dredge-Master on June 5, 2004 11:21:46 PM]

Share this post


Link to post
Share on other sites

  • 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!