I know what you mean and I already checked this.
In addition to this I also compiled and ran the example you posted and both worked without any problems. So the OpenGL files cant be the problem,
Use OpenGL like wxDC? Topic is solved
I'm sorry for this double post, but I noticed something strange:
I installed VisualC++ Express just to test if it runs with this program and its compiler and it does. I had to reinstall the wxPack but now everything runs fine with VC++.
Unfortunately I dont like VC++, therefore I use Code::Blocks with MinGW. And now I'm questioning myself why it works with VC++ but not with Code::Blocks / MinGW!
I installed VisualC++ Express just to test if it runs with this program and its compiler and it does. I had to reinstall the wxPack but now everything runs fine with VC++.
Unfortunately I dont like VC++, therefore I use Code::Blocks with MinGW. And now I'm questioning myself why it works with VC++ but not with Code::Blocks / MinGW!
I thought about that, but the forum says it would be in: http://sourceforge.net/forum/forum.php? ... _id=595652 (okay they are talking about 2.7, but I think this hadn't change between 2.7 and 2.8 )
I also tried to build them on my own and the build process was successful (which makes me happy on my windows ) but I couldn't compile anything. Think I missed something there..
Maybe someone here could post some of her/his working libraries so that I can check if this is the problem? If it is so, then I can start to fully rebuild all the things I need (but momently I would just like to run this program)
I also tried to build them on my own and the build process was successful (which makes me happy on my windows ) but I couldn't compile anything. Think I missed something there..
Maybe someone here could post some of her/his working libraries so that I can check if this is the problem? If it is so, then I can start to fully rebuild all the things I need (but momently I would just like to run this program)
Again I have to make a double post, but still there is no answer in view.
In addition to my post above, I tested the samples with wxDevCpp, which worked out of the box -.-
Looks like CB makes something really strange here.
What I noticed:
In the CB wxWidget Project Wizard is a term called "use wxWidget DLL" , which sounds a bit odd to me, because I always had to link the libraries manually.
But unchecking this leads me into a linker error, even if all libraries are linked
Maybe you know what to do with this:
In addition to my post above, I tested the samples with wxDevCpp, which worked out of the box -.-
Looks like CB makes something really strange here.
What I noticed:
In the CB wxWidget Project Wizard is a term called "use wxWidget DLL" , which sounds a bit odd to me, because I always had to link the libraries manually.
But unchecking this leads me into a linker error, even if all libraries are linked
Maybe you know what to do with this:
Code: Select all
C:\Programmieren\C++\Compiler\wxWidgets2.8\lib\gcc_lib\libwxmsw28ud.a(monolib_gdicmn.o)||In function `~wxResourceCache':../../src/common/gdicmn.cpp:871: undefined reference to `_Unwind_Resume'|
:..\..\src\common\gdicmn.cpp|871|undefined reference to `_Unwind_Resume'|
:..\..\src\common\gdicmn.cpp|871|undefined reference to `_Unwind_Resume'|
C:\Programmieren\C++\Compiler\wxWidgets2.8\lib\gcc_lib\libwxmsw28ud.a(monolib_gdicmn.o)||In function `~wxGDIObjListBase':../../src/common/gdicmn.cpp:714: undefined reference to `_Unwind_Resume'|
:..\..\src\common\gdicmn.cpp|714|undefined reference to `_Unwind_Resume'|
//etc..
Re:
Is it really necesary to do this code for every OnPaint event?Disch wrote: ↑Sun Oct 19, 2008 4:45 pm
You could do that. Rather than derive classes like I indicated in my post, you could do something like:
There's no rule that says the GL drawing code HAS to be in a wxGLCanvas derived class. OpenGL is all a series of global functions, so it's all available anywhere -- and as long as you tie the context to the desired canvas -- all GL drawing functions will draw to that canvas, no matter where the code is in your program.Code: Select all
wxGLCanvas* myCanvas = new wxGLCanvas( ... ); wxGLContext* myContext = new wxGLContext( ... ); // then in OnPaint of some dialog/window/whatever myContext->SetCanvas(myCanvas); // do GL drawing stuff here
Code: Select all
myContext->SetCanvas(myCanvas);
Re: Use OpenGL like wxDC?
Hi,
This thread is 10-years old.
Please create a new thread with the specific question.
Also, lok at the OpenGL samples and try to follow their code.
Thank you.
This thread is 10-years old.
Please create a new thread with the specific question.
Also, lok at the OpenGL samples and try to follow their code.
Thank you.
Re: Use OpenGL like wxDC?
The example here is at least 1000 times beter than OpenGL samples, which in my opinion complete useles for learning something. My question was about this exsample, so starting new thread seems to make no much sence for me, even I know this thread is really old.