Author Topic: wxGLCanvas  (Read 5036 times)

Offline rcoll

  • Almost regular
  • **
  • Posts: 150
wxGLCanvas
« on: August 31, 2008, 12:08:07 pm »
I am developing on MS Windows, using CB 5190 from SVN sources.

I am trying to add a new widget (wxGLCanvas and wxGLContext) to the wxSmith palette, by adding to the "wxSmithContribItems" source code tree.  All works fine, until I add the include file <ws/glcanvas.h> to my source code, then building a new "wxSmithContribItems.dll".  When I run CB, the contrib items plugin does not load.  I have traced the problem down to the "PluginManager", and specifically the call to wxDynamicLibrary::Load("wxSmithContribItems.dll").  It just does not load.  I made sure I was linking with "opengl32" and "glu32" ... but still a no-go.

Is there any way to find out why it is not loading?  I have no undefined refs when I build the DLL.

Any ideas?

Ringo

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: wxGLCanvas
« Reply #1 on: September 03, 2008, 10:37:48 pm »
Note that you need wxWidgets library compiled with OpenGL support which is disabled by default (for example with USE_OPENGL=1 switch when compiling on MinGW). That may produce another dll / so so make sure it's also accessible when opening codeblocks

Regards
   BYO

Offline rcoll

  • Almost regular
  • **
  • Posts: 150
Re: wxGLCanvas
« Reply #2 on: September 03, 2008, 11:25:57 pm »
My wxWidgets was compiled with USE_OPENGL=1; the problem came in when the "wxSmithContribItems.dll" was trying to load the "wxmsw28u_gl_gcc.dll".

I never did get it to work properly (there seems to be a confusion in some of the OpenGL code between the "USINGDLL" and "CREATEDLL" macro definitions).

But I found a good work-around.  When cleverness fails, brute force prevails.

Ringo