User forums > Using Code::Blocks

OpenGL wxSmith wxAui

<< < (2/3) > >>

D_A_P:


--- Quote from: seb_seb0 on January 06, 2011, 09:27:51 pm ---You forgot to tell us one major thing: which version of wxWidgets you are using (2.8.11 or 2.9.x).

--- End quote ---
I using version 2.8.11, but I will compile the version 2.9.1.


--- Quote from: seb_seb0 on January 06, 2011, 09:27:51 pm ---You forgot also to tell us what went wrong.

--- End quote ---
I can compile the code, but I can't see anny opengl-window (the pane is white).

Thanks for the NeHe sample, I will test it with the compiled 2.9.1. version of wxwidgets.

Thanks for the wxSmith plugin to.

Holger

MortenMacFly:

--- Quote from: seb_seb0 on January 06, 2011, 09:27:51 pm ---I am also using a patched version of the wxGLCanvas in wxSmith [...]

--- End quote ---
What does this patch? Is that relevant generally for C::B?

D_A_P:
The Nehe Sample works with wxWidgets 2.9.1 very well, thanks.


--- Quote from: seb_seb0 on January 06, 2011, 09:27:51 pm ---
I am also using a patched version of the wxGLCanvas in wxSmith (due to the aboved mentioned changes in the API). I attach the Code::Blocks plugin to it. It works for me on Windows Vista, with the last nightly.


--- End quote ---

How can I install the plugin wxGLCanvas to wxSmith?  :D

Can you post me a compiled dll?

Holger

seb_seb0:

--- Quote from: MortenMacFly on January 07, 2011, 06:24:53 am ---
--- Quote from: seb_seb0 on January 06, 2011, 09:27:51 pm ---I am also using a patched version of the wxGLCanvas in wxSmith [...]

--- End quote ---
What does this patch? Is that relevant generally for C::B?

--- End quote ---

There is a difference in constructors for wxGLCanvas, between wx2.8.11 and wx2.9.1

The patch create a  "#if wxCHECK_VERSION"
example:

--- Code: ---#if wxCHECK_VERSION(2, 9, 0)
    GLCanvas1 = new wxGLCanvas(Panel1, ID_GLCANVAS1, GLCanvasAttributes2_1, wxDefaultPosition, wxDefaultSize, 0, _T("ID_GLCANVAS1"));
    #else
    GLCanvas1 = new wxGLCanvas(Panel1, ID_GLCANVAS1, wxDefaultPosition, wxDefaultSize, 0, _T("ID_GLCANVAS1"), GLCanvasAttributes2_1);
    #endif

--- End code ---

That's all.
If you do not have the wxCHECK_VERSION, then compilation will fail with wxWidgets 2.9.1
I have posted here a plugin, not a patch: it is a wxSmith component, with the same name "wxGLCanvas"

I discourage to include it yet in the main source tree: it is not fully tested. It was a quick fix I have made for my personal usage. However, there are not a lot of risks to apply a patch: this plugin is mainly a copy of wxSmith files, with a few lines added.

Sebastien

gd_on:
Hi,
I'm trying to use NeHe and NeHeAUI projects (in the zip files above given by seb_seb0) but I meet some problems with wxwidgets.
I have wxWidgets 2.8.11 version and I work with Win XP SP3. My compiler is gcc 4.5.1, TDM version sjlj. I use a self compiled C::B, svn 6820.
I need some adaptations in the cbp projects but they compile and link.
Problems happens at execution :
The File/Quit menu does nothing, a click on the cross at the right top of the window does nothing too. The only way to stop the program is to kill it with the task manager (or within Code::Blocks with the taskbar stop button). An other (bad) solution, is to add exit(0); after the Close() instruction in onQuit : this works for the Quit menu but not for the standard cross exit icon.
If I click on the menu Help/About, I ear a beep but the message box is not displayed. It appears if I press the Alt key.

So, I tried to install and use wxWidgets 2.9.1, but first I had problems when building the library : I have found through this forum and some others that it seems necessary to add a USE_STC=0 on the make line, and set explicitly wxUSE_STC = 0 in setup.h. But is it all I need to do ?
Obviously not, because the problems are not all solved.
With this new lib, the Quit menu and the cross icon to stop the program now work (without this ugly exit(0);). Nevertheless, the help/About has always the same reaction : program seems to hang (waiting an event ?) unless I press the Alt key.

With NeHeAUI version (but not with NeHe version), I obtain also an error message at Quit, telling me that "GetEventHandler() == this" failed because some event handlers have not been removed.

Probably, my wxWidgets build command is not the right one (for 2.9.1 but may be also for 2.8.11).
I use for 2.8.11 :
mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release USE_OPENGL=1
I have tried SHARED=0 to obtain only static libs, (now in gcc_lib sub folders instead of gcc_dll) but this does not really change the behavior of the programs.
for 2.9.1, as told before, I add USE_STC=0.

I can also add that the different samples or wxWidgets examples work normally, and particularly the opengl penguin example, which I want to use as a start base for a future work. So, is it also a problem with wxsmith ?

If someone can give me some more information... (if someone as already adapted the opengl penguin sample to wxsmith ...  :P)

thanks

gd_on

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version