Sign in to follow this  

Using Win32 Controls and OpenGL

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

This topic is 3320 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this