Jump to content
  • Advertisement
Sign in to follow this  
wijesijp

OpenGL Adding another Form to opengl app

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

I have written an opengl app based on NeHe sample code. Now I needed to add another form to the application to control some of the features. I have written the app in VS .NET 2005 When I tried to add a windows form I got large number of errors. Anybody has any suggestions how to proceed.

Share this post


Link to post
Share on other sites
Advertisement
Do you intend to render opengl in the second window? Or put in buttons and such?

I can't tell you what the problem is based on what you've said, but one suggestion I could make is that you run opengl inside a panel control in your main form. Then you can add buttons and such to that form as well.

Anyways, telling us what the error(s) are would be helpfull.

Share this post


Link to post
Share on other sites
Second window has buttons, menus etc. only
Only the first window is rendered with opengl.

I used NeHe sample code as the basis, now I need to add second form to control the first window opengl graphics.

Share this post


Link to post
Share on other sites
To quote myself:

Quote:
Original post by gharen2
telling us what the error(s) are would be helpfull.


Plus, I'm not sure nehe's code is the best choice for an application with multiple windows. It's designed to be very minimalistic. ie, create a single game window, display it, and do the minimum event handling. You might be better off writing your own windowing system using nehe's code as a guide.

It would be helpfull to know what language you're using too. Something like this would be a million times easier to do with the .net framework than c++, for example.

Share this post


Link to post
Share on other sites
On Windows, OpenGL windows have the WS_CLIPCHILDREN style. In other words, if you have an OpenGL view window within your main frame window, you can't make your window a child of the view - it has to be a child of the main frame.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!