Advertisement

Make opengl section of window

Started by March 06, 2005 10:24 PM
2 comments, last by Xiachunyi 19 years, 6 months ago
Usually, in the tutorials, they give the option of fullscreen or window mode. The window mode takes up the entire window, but I just want it to take up part of the window, leaving a section to place regular win32 API common controls and other stuff. How would you do this? I assume somewhere in CreateGLWindow that the tutorials use, but I don't know exactly what to change. Thanks.
my siteGenius is 1% inspiration and 99% perspiration
i think changing the viewport might work but the best way is to create another window and make the ogl window a child of it
Advertisement
I would take a look at the wgl extensions. They are documented in the OpenGL redbook (I personally have the 4th edition) and all the commands are prefixed with a wgl.

A fast google search returned this as a first result, and from what I can tell it may be what your looking for: http://www.nullterminator.net/opengl32.html

I'm not sure you can render to just a part of the window, but you can render to a control useing the same method above, just use the hWnd of the control rather then the window. Therefore you could create some sorta picture or image box (or what ever language your working in has) and using its hWnd property render all your opengl goodness to it leaveing the rest of the form free for buttons and stuff.

As a small experiment, I think if you do use the window's hWnd your buttons will still be rendered over top of the opengl rendering. Give it a try!
To elucidate the above poster's explaination.

This will explain it much better.

This topic is closed to new replies.

Advertisement