Original Post
Hi, this is my first post here. Hopefully I won't cry too often. I'm going through the nehe lessons using the Linux/SDL code base and trying it out in both Linux and XP to ensure I understand the gotchas with porting. I've modified the Linux/SDL code base from http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=06 so that it is OOP based (i.e. wrapped the state and drawing functions of the drawn object into a class). The basic idea is to take a spinning cube and add a texture to it then display it. This works fine until I try to resize the window, at that point the texture disappears and the box becomes plain white. I've tried adding the Tut6::LoadGLTextures() method to the front of the draw() method but that doesn't bring the texture back. The class definition is below class Tut6 : public OGLObject { public: Tut6(); int draw(); int init(); private: GLfloat xrot; GLfloat yrot; GLfloat zrot; GLuint texture[1]; int LoadGLTextures(); }; The draw and LoadGLTextures methods are pretty much ripped directly from the original code base. draw() comes from the drawGLScene(void) method. glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); object.draw(); // Draw it to the screen SDL_GL_SwapBuffers(); basically all the code between the top and bottom lines has been moved into draw(). Is this resize/move texture disappearing problem something that generally occurs in Windows that needs to be coded around. The code works fine under Linux. Another issue I'm having is that I can't get the program to go full screen in Windows. //edit - it seems this has something to do with the window getting larger than my monitor. I tried the original code and because it was limited to 640*480 the texture stayed in place. When I expanded the window to a size comparative to the size of my LCD it went blank. I modified my own code and found the same, at low res it stays fine but at high the same problem returns.//