problem with 'initialization failed'
I cannot run some Nehe''s applications. In some cases I received
ERROR ''initialization failed'' after message: Would You Like to Run in Fullscreen mode YES/NO. I have Win 2000, Visual C++. What to do? May be someone will help me?
Debug the application and find the point where InitGL (or whatever) returns error.
PM
Times change...
Excuse my poor english!
PM
Times change...
Excuse my poor english!
PM Times change...
Excuse my poor english!
-----------------------------------------------------------------
int WINAPI WinMain(.....) .....
......
if (MessageBox(NULL,"Would You Like To Run In Fullscreen Mode?", "Start FullScreen?",MB_YESNO|MB_ICONQUESTION)==IDNO)
{
fullscreen=FALSE;
}
// Create Our OpenGL Window
-----------------------------------------------------------------
APPLICATION RETURNS ERROR IN THIS PLACE:
-----------------------------------------------------------------
if (!CreateGLWindow("Lionel Brits & NeHe''s 3D World Tutorial",640,480,16,fullscreen))
{
return 0; // Quit If Window Was Not Created
}
while(!done)
............
-----------------------------------------------------------------
There''s lots of places CreateGLWindow can fail. Start the app from the debugger, choose to run it in windowed mode so it doesn''t overlap with your debugger, and set a breakpoint at the top of CreateGLWindow and step through it, and identify the line in that function that fails.
It is in:
----------------------------------------------------------------
BOOL CreateGLWindow(char* title, int width, int height, int bits, bool fullscreenflag)
........
in:
if (!InitGL()) {
KillGLWindow(); MessageBox(NULL,"Initialization Failed.","ERROR",MB_OK|MB_ICONEXCLAMATION);
return FALSE;
}
return TRUE;
where in int InitGL(GLvoid) the (!LoadGLTextures()) returns 0
after that there is message "Initialization Failed."
----------------------------------------------------------------
BOOL CreateGLWindow(char* title, int width, int height, int bits, bool fullscreenflag)
........
in:
if (!InitGL()) {
KillGLWindow(); MessageBox(NULL,"Initialization Failed.","ERROR",MB_OK|MB_ICONEXCLAMATION);
return FALSE;
}
return TRUE;
where in int InitGL(GLvoid) the (!LoadGLTextures()) returns 0
after that there is message "Initialization Failed."
''lo,
if not, you should put the texture in a subdirectory "Data" in the directory where your .exe is.
./lessonXX.exe
./data/texture.bmp
scuse my english too.
if not, you should put the texture in a subdirectory "Data" in the directory where your .exe is.
./lessonXX.exe
./data/texture.bmp
scuse my english too.
It seems your LoadGLTextures function returns FALSE. So check the path of the texture(s) and check the LoadGLTextures function. The error also could be that u have only the exe (or the program) and you doesnt have the textures.
PM
Times change...
Excuse my poor english!
PM
Times change...
Excuse my poor english!
PM Times change...
Excuse my poor english!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement