Jump to content
  • Advertisement
Sign in to follow this  
kekk0

Using Win32 Controls and OpenGL

This topic is 3531 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 trying to put external toolbars to an opengl application that atm just draws .3ds objects loaded from disk. I'd like to put buttons, slders and such nice things on them in order to control the output of the opengl window. I managed to make standalone applications that use windows controls, but I can't figure out how to integrate more windows and controls in the same app. Can you point me to a *cough* very dumb *cough* tutorial that allows this or, if it's not too much, could anyone explain briefly how to do it? Thank you in advance! :) -kekk0

Share this post


Link to post
Share on other sites
Advertisement
It might be possible to get the framebuffer in a GDI compatible form and then draw controls that way, but even if you can, it will limit performance. The two basic approaches are:

1 - Use a GUI library which renders directly to OpenGL. Plenty of libraries exist for this.
2 - Have OpenGL only draw to a specific portion of the window, and use controls as usual on the rest of the window.

Share this post


Link to post
Share on other sites
Thanks for replying. i'm not sure I understand what you're saying, anyway to better explain what I'd like to do, just think of photoshop, where there is an editing window and many floating around windows with buttons, lists and other controls...

Share this post


Link to post
Share on other sites
Right, Photoshop is, I think, an MDI interface -- which is the many windows-type interface.

That should be just as easy, just make additional windows with the controls on them.

Share this post


Link to post
Share on other sites
thank you all. I'd like to make this without external libraries, if possible.
To make an example, I started from NeHe Lesson 7, added .3ds loading and removed the glaux lib. Then I added a simple resource file, a window with a menu and a button and I tried to show it along with the opengl window then I tried to show the window adding a DialogBox call in Winmain, but it doesn't show anything...

Share this post


Link to post
Share on other sites
Quote:
Original post by Ravyne
Right, Photoshop is, I think, an MDI interface -- which is the many windows-type interface.

That should be just as easy, just make additional windows with the controls on them.


Could you please explain me how to do this? Once I designed a window in a resource file, how do make it show up beside the opengl window?

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!