Sign in to follow this  
eng

app with GUI, GLUT or .NET

Recommended Posts

Hi, I am about to start working on my final year engineering project modelling woven carbon mats. I am going to do the programming in c++ and use open gl for the graphics. Nothing too fancy, but I would like to make a GUI as the program is going to be used by other students in coming years, and needs some picking interface as well. I have used GLUT before, but never open GL on it's own in a win32 setting (but have looked at the NeHe tutorials). I also have a copy of VS.NET 2003, but really haven't used any of the microsoft stuff before, just regular c++ and a bunch of Java. My question is: What is the best way to make an application framework with all the GUI stuff in it that runs all the time, and then be able to open files into that framework that actually get operated on? An example would be AutoCAD, where the application window is all interface, and an open GL type window opens within that setting. Is it possible to open a GLUT window from within a win32 application so that it is constrained to the bounds of the "parent" application window? If not, then can I use the .NET GUI builder to make parent/child windows and just plug the NeHe Win32 stuff into the child code with minimal modifications? Sorry this was a long post, any advice would be apprecieated.

Share this post


Link to post
Share on other sites
GLUT is a completely platform independent API. It provides its own event model, so it won't work nicely side-by-side with code that works directly with the Win32 API. You can use one of the OpenGL interfaces that Microsoft provides to place an OpenGL context within your window, but not GLUT.

Some programs go to the lengths of implementing their own GUI toolkit entirely withing GLUT, and there are widget toolkits that are designed to be used in OpenGL programs. That would be another alternative.

Since you are comfortable with Java, you could use a Java 3D API such as JOGL or Java3D. You would have the AWT and Swing toolkits available (much easier than working with Win32 API directly), and you could be sure that all of your students would be able to use the program.

Share this post


Link to post
Share on other sites
Hmm, That is what I thought might be the case.
If I do go ahead and use the .NET GUI designer to put together a GUI, is it reasonable to assume that I can just use the auto generated code as a jumping off point to plug in Open GL code, or is this just asking for trouble?

Share this post


Link to post
Share on other sites
You could also change from C++ to C# and code the entire project in .NET. There is TAO.NET, which is a .NET wrapper library around OpenGL.

That way, you can code your entire project in C#, don't need to bother about different languages and how to have them operate with eachother. From what I've heard, TAO is pretty good and it's just the standard OpenGL interface in a bunch of classes.

The pro of C# is that you can aim your arrows at developing the application, and not at developing all sorts of sidekick libraries to do some tedious task. And, GUI's are so easy with it.

Good luck with your project!

Toolmaker

Share this post


Link to post
Share on other sites
HI, Thanks for the responses. After a bunch of looking around, I have learned that what I want to do is make a MDI application, easy in forms, but a pain to add open GL to.

Can you make MDI apps in pure win32 without too much hassle? (I have ordered petzold's book but it isn't here yet)

On the other response, regarding just painting to the picturebox. don't I need more than just the handle to paint to it? could you elaborate a little more on this?

thanks

Share this post


Link to post
Share on other sites

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