🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Lesson 6 Help.. Initialization Failure

Started by
1 comment, last by cm3rt 14 years, 8 months ago
Okay so basically my headers look the following: #include <windows.h> // Header File For Windows #include <stdio.h> // Header File For Standard Input/Output #include <gl\gl.h> // Header File For The OpenGL32 Library #include <gl\glu.h> // Header File For The GLu32 Library #include "glext.h" #include "bmp.h" // Header File For The Glaux Library There are no syntax errors to my knowledge because everything compiles fine. But when I run the app, it is giving me the boolean error saying "Initialization Failed." Does anyone know why this is happening? The code is identical to lesson 06 except for the glext.h, bmp.h, and bmp.cpp in there, so I am lost completely.
Advertisement
Probably has something to do with the bitmap loading functions.

To make sure it locates the bitmap file, you can use this function:

bool exists(const char *fileName) {    FILE *file = fopen(fileName, "r");    if (!file)        return false;    fclose(file);    return true;}


If that doesn't help, step through the program with a debugger to find where exactly the initialization is failing.
Hey thanks for the response. The 'existing file' function had been already included in the program so I went ahead and debugged... Turns out there was a logical error in a piece of my code... Thanks for helping me out! (Don't know why I didn't debug in the first place.)

This topic is closed to new replies.

Advertisement