Jump to content
  • Advertisement
Sign in to follow this  
giugio

wxwidgets or mfc mdi opengl

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

Hy. I create a program in c++ and i would draw some polygon on the screen. I have arleady a c++ class for draw poly ,but i must integrate it with gui. Now i write some code for windows , but i ask for a good method for draw in a canvas in wxwidget in opengl. I think that i'm create an array of poly and draw it(call poly.draw()),but the render code must be in the widget form class ? but this list must be shared in the application,how? Thanks. [Edited by - giugio on August 1, 2008 6:44:03 AM]

Share this post


Link to post
Share on other sites
Advertisement
Nowadays MFC is obsolete.

wxWidgets has a good opengl support, the only problem I see (6 mothns ago) was that antialiasing is not implemented. However, I so a patch out there to do it.

Are you going to draw only one image or are you going to draw something animated?


"the render code must be in the widget form class ?"
Not neccesarialy.
it is easy to draw something in opengl and wxwidgets, visit their forums, good examples are available. There are 2 classes available to use opengl with forms, I dont remember them.


By the way, I used MFC to create and opengl colladaloader and I am not going to use MFC in all my life.

See you.

Share this post


Link to post
Share on other sites
MFC isn't obsolete. There are regular updates and it is still in wide use in the commercial world.

Both approaches are going to give you headaches. wxWidgets is cross platform, but you can quickly get started with MFC because the Visual Studio class wizards will add the code hooks when you add controls onto forms (at least with visual studio 2005).

Unless you *really* need an elaborate GUI, I'd forgo both MFC and wxWidgets and use GLUT. That will give you enough functionality for buttons and controls. I'd only go with wxWidgets if you must have cross-platform functionality. If you are only shooting for Windows boxes MFC would be my suggestion.

Share this post


Link to post
Share on other sites
Thanks .
I create the application whit an mdi style in wxwidget.
But an array that contains the data to be rendered by the opengl canvas of wxwidget must be shared in all the application because i can add and remove polys from the view.
How shared this array?
Thanks for the reply.

ps.wxWIdget works very very fine and is free!!!!!

Share this post


Link to post
Share on other sites
I don't believe you need to pay anything additional for MFC so long as you've got Visual Studio. I had headaches installing wxWidgets and getting their OpenGL examples to run without crashing.

Developing elaborate GUIs with *either* is going to give you massive headaches, I promise you that. Like I said, unless you *really* need to have an elaborate GUI I'd just go with GLUT.

Heck, when I've developed applications that only need limited interaction I just use pure Win32.

Share this post


Link to post
Share on other sites
thanks isenthalpic53 , but why opengl causes those problems?
And why GLut not?
Glut is created for work with GUI windows?

Share this post


Link to post
Share on other sites
GLut is not for GUI-Apps, its more a framework for quick OpenGL-Examples or Games which don't need full control of the Window GLut creates.
I already have programmed a ShaderDesigner with wxWidgets and OpenGL. Its not that hard. Just create a Canvas and draw your stuff... there is no difference.
Small advice: I recommend using GLew. Its a manager for all the extensions and is much more better than the incomplete OpenGL Headers in WinSDK. Just replace all includes in wxWidgets of OpenGL.h to Glew.h and link to glew32.lib.
I use Glew in my GameDLL and did it this way to write my ShaderDesigner.
regards.

Share this post


Link to post
Share on other sites
Quote:
Heck, when I've developed applications that only need limited interaction I just use pure Win32.


Does the limitation comes from not having COM/OLE? what would this mean in practice - copy/paste in dialog fields or something more ?

I am a bit stuck on this as well, since the win32 api looks nice (much nicer than mfc) but i dont have the experience to determince how much functionality i could expect to get.

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!