I get "Segmentation fault" when try to do
filename is of wxString class.
I can't understand what's wrong here, because when I do
texid is of GLint type.
I even tried to change filename to string type, not wxString class, but with no success. Even memset was done for skybox...
I'm at a loss what to do, and what can cause the error :(
Can anyone help me?
(remove ".doc" from the filename)
The sources require wxWidgets and OpenGL.
Call "Map->Skybox->OK" and you will get "Segmentation fault".
I don't have time to take a look at the code but here's a really wild guess. You need to save a string into a char array, right? Since map->skybox.back.filename is a pointer to the first character to that array, what you need to do is add a "*" to that statement:
Well, I was answered at wxWidgets forum about that already :)
the problem is in memset (&skybox, 0, sizeof (skybox))
because when it's done, wxString field is destroyed (as well as string field) and this causes the error.
If it has char* (built-in type) all works ok.
|All times are GMT -5. The time now is 04:08 PM.|