wxDev + opengl support

If you are using wxDev-C++ for your wxWidgets design, please ask your questions here instead of in IDE Related.
Post Reply
wojtek
In need of some credit
In need of some credit
Posts: 5
Joined: Sat Nov 12, 2011 10:35 am

wxDev + opengl support

Post by wojtek »

i just installed wxDev in order to create opengl program. there is a problem, when linking: undefined references to wxOpenGl functions. wxmsw28_gl and wxmsw28_ogl are linked, but i checked the second library and it is almost empty. i read forums and i think that i have to download wxWidgets sources, and recompile it with OGL support. am i right?

is there over the internet any tutorial how to do it, step-by-step? or maybe there is simpler solution?

i need that library to write my BSc thesis program - 3d paths editor
campa
Knows some wx things
Knows some wx things
Posts: 25
Joined: Tue Nov 25, 2008 5:58 pm

Re: wxDev + opengl support

Post by campa »

You don't need just download wxwidgets 2.8.7 pack from one of update servers, I cant remember but check Sof.T's devpack server or the main. I think the latest wxwidgets library was not build with opengl support.

Regards

Andrej
jgrzybowski
Earned some good credits
Earned some good credits
Posts: 113
Joined: Sat Sep 24, 2011 9:32 pm
Location: Poland

Re: wxDev + opengl support

Post by jgrzybowski »

I do not have any experience in openGL, but I have downloaded pdf-book: Cross-Platform GUI Programing with wxWidgets (known also as: wxwidgets-book):
http://ptgmedia.pearsoncmg.com/images/0 ... 6_book.pdf

There is a chapter: 3D GRAPHICS WITH WXGLCANVAS with following introduction:
“It’s worth mentioning that wxWidgets comes with the capability of drawing
3D graphics, thanks to OpenGL and wxGLCanvas. (...)
To enable wxGLCanvas support under Windows, edit include/wx/msw/
setup.h, set wxUSE_GLCANVAS to 1, and compile with USE_OPENGL=1 on the command
line. You may also need to add opengl32.lib to the list of libraries your
program is linked with.”


That could be useful key words for searching information you need: wxUSE_GLCANVAS, USE_OPENGL=1.

And some tutorial:
http://wxdsgn.sourceforge.net/?q=node/14

I am sorry I can not help you more, maybe somebody else... regards
Jarek
peteh
Earned a small fee
Earned a small fee
Posts: 16
Joined: Fri Jan 29, 2010 4:37 pm

Re: wxDev + opengl support

Post by peteh »

You'll need to download and compile wxWidgets 2.8.12 sources with support for OpenGL.

Follow the tutorial here:

http://wxdsgn.sourceforge.net/?q=node/9

Before compiling:

Edit setup.h and ensure that: #define wxUSE_GLCANVAS 1

After compiling:

If you don't wish to make a dev pak, copy the contents of the include folder to your Dev-Cpp\include\common folder
then copy the contents of the lib\gcc_lib folder to your Dev-Cpp\lib folder
tbreina
Moderator
Moderator
Posts: 1289
Joined: Thu Nov 25, 2004 7:38 pm
Location: Coronado, CA

Re: wxDev + opengl support

Post by tbreina »

Weird. I thought our gcc devpak for wxWidgets 2.8.12 had openGL compiled in it.

I went ahead and rebuilt the devpak. It looks like the openGL support is now included. Please do a WebUpdate and grab the 2.8.12.2 package for gcc and common devpaks.

Let me know if this fixes the issue.

-Tony
Everybody's got something to hide except for me and my monkey.
wojtek
In need of some credit
In need of some credit
Posts: 5
Joined: Sat Nov 12, 2011 10:35 am

Re: wxDev + opengl support

Post by wojtek »

i have downloaded previous version of wxDev - 6.10.2 and it works
maybe in future i'll upgrade. thanks for help!
Post Reply