Hi, (under w2k with VC6) I still have a big crash on exit.
Link settings : nothing special, c++ code generation dll debug multithreaded
for every lib
Help appreciated
Iāve desactivated all the code off my app, so now here is what is executing
(and still crashing) :
void oglInitialisation()
{
glClearColor(0,0,0,1);
glClearDepth(1.0f);
glEnable(GL_DEPTH_TEST); // Indispensable !
glEnable(GL_BLEND);
glEnable(GL_ALPHA_TEST);
glDepthFunc(GL_LEQUAL);
glAlphaFunc(GL_GEQUAL,0.5f); // Je vois les flammes
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glDisable(GL_CULL_FACE);
glPolygonMode(GL_FRONT_AND_BACK,GL_FILL);
glEnable(GL_TEXTURE_2D); // Enables Texture Mapping
glMatrixMode(GL_PROJECTION); // Select The Projection Matrix
glLoadIdentity(); // Reset The Projection Matrix
gluPerspective(35.0f,(GLfloat)gWindowWidth/(GLfloat)gWindowHeight,1,
250.0f);
glEnableClientState(GL_VERTEX_ARRAY);
};
void SDLInitialisation() throw (CException)
{
if(SDL_Init(SDL_INIT_EVERYTHING)<0)
THROW("SDL Init error " + string(SDL_GetError()));
SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 ); // tell SDL that the GL
drawing is going to be double buffered
SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE,32); // size of depth
buffer
SDL_GL_SetAttribute( SDL_GL_STENCIL_SIZE, 0); // we arenāt going to
use the stencil buffer
SDL_GL_SetAttribute( SDL_GL_ACCUM_RED_SIZE, 0); // this and the next
three lines set the bits allocated per pixel -
SDL_GL_SetAttribute( SDL_GL_ACCUM_GREEN_SIZE, 0); // - for the
accumulation buffer to 0
SDL_GL_SetAttribute( SDL_GL_ACCUM_BLUE_SIZE, 0);
SDL_GL_SetAttribute( SDL_GL_ACCUM_ALPHA_SIZE, 0);
MainWindow = SDL_SetVideoMode(gWindowWidth,gWindowHeight,32,SDL_OPENGL |
SDL_HWSURFACE | SDL_DOUBLEBUF);
if(MainWindow == NULL)
THROW("SDL MainWindow is null - " + string(SDL_GetError()));
}
int main(int argc, char *argv[])
{
// Iāve removed the try catch bloc for posting in sdl mailing list
SDLInitialisation();
oglInitialisation();
SDL_Quit();
getch();
return 0;
}___________________________________________________________
Do You Yahoo!? ā Une adresse @yahoo.fr gratuite et en fran?ais !
Yahoo! Mail : http://fr.mail.yahoo.com