H
halkun
Guest
Updated code and still no joy with linux. It still segfaults on the draw command.
Here's my log info on my version of OpenGL
[03:00:37] SDL init begin
[03:00:37] SDL_INIT_VIDEO initialized
[03:00:37] SDL video mode set 640x480, 16 bit SDL_OPENGLBLIT | SDL_HWSURFACE
[03:00:37] Got 32 bpp (8888), 24 depth, 8 stencil
[03:00:37] SDL init complete
[03:00:37] OGL Vendor: Tungsten Graphics, Inc
[03:00:37] OGL Renderer: Mesa DRI Intel(R) 852GM/855GM 20021115 x86/MMX+/SSE2
[03:00:37] OGL Version: 1.2 Mesa 5.0.2
Mind you I'm using the default DRI mesa, which is not thread safe. Is this an issue? What pointers can you give me to track down why (*i) is going into la-la-land after the splash screen is cleared?
Code: [Select]
What is *i pointing to? Where did it get it from? I can't trace back becuase I don't know where in the code *i was created and manipulated. Maybe some comments will help. is *I supposed to be the SDL surface? if you ++i, isn't that just moving up one memory address and not a whole structure, (object).. I don't get this.
Also, could you put the increment operater after the variable if it's not critical to have? That just looks wierd.
+++++++++++++
EDIT
+++++++++++++
On closer look it would seem that std::vector<Screen*> is going to lunch. Is there a way to test to see if this is holding a rational value (or *i for that matter) eariler on in the code?
Here's my log info on my version of OpenGL
[03:00:37] SDL init begin
[03:00:37] SDL_INIT_VIDEO initialized
[03:00:37] SDL video mode set 640x480, 16 bit SDL_OPENGLBLIT | SDL_HWSURFACE
[03:00:37] Got 32 bpp (8888), 24 depth, 8 stencil
[03:00:37] SDL init complete
[03:00:37] OGL Vendor: Tungsten Graphics, Inc
[03:00:37] OGL Renderer: Mesa DRI Intel(R) 852GM/855GM 20021115 x86/MMX+/SSE2
[03:00:37] OGL Version: 1.2 Mesa 5.0.2
Mind you I'm using the default DRI mesa, which is not thread safe. Is this an issue? What pointers can you give me to track down why (*i) is going into la-la-land after the splash screen is cleared?
Code: [Select]
Code:
void ScreenManager::Draw(){ DISPLAY->BeginFrame();/* for (int i = 0; i < mScreens.size(); ++i) { mScreens[i]->Draw(); }*/ for (std::vector<Screen*>::iterator i = mScreens.begin(); i != mScreens.end(); ++i) { (*i)->Draw(); //Segfaults here! } DISPLAY->EndFrame();}
Also, could you put the increment operater after the variable if it's not critical to have? That just looks wierd.
+++++++++++++
EDIT
+++++++++++++
On closer look it would seem that std::vector<Screen*> is going to lunch. Is there a way to test to see if this is holding a rational value (or *i for that matter) eariler on in the code?
Last edited: