Skip to main content
gamedev.net
🔒 Locked

Debug Assertion Failed

Started by Eric_003 Feb 20, 2003 at 2:11 PM 0 replies 550+ views
Original Post
Eric_003
Eric_003
After i compile my program i get the following error pop up. Debug Assertion Failed! Program C:\WINDOWS|OPEN GL PROJECT\DEBUG\OPEN GL PROJECT.EXE File: fgets.c line:60 Expression str!=NULL I was working on nehe lesson 10 when i got this error I only made a couple of modifications to it, which i have included below. Please help me fix this error or atleast tell me what it means. GLuint texture[5]; and... int LoadGLTextures() // Load Bitmaps And Convert To Textures { int Status=FALSE; // Status Indicator AUX_RGBImageRec *TextureImage[5]; // Create Storage Space For The Texture memset(TextureImage,0,sizeof(void *)*1); // Set The Pointer To NULL int i; char texName[10]; char texNum[3]; for(i=0;i<5;i++) { memset(texName, 0, 10); memset(texNum, 0, 3); itoa(i, texNum, 10); strcat(texName, "tex"); //MessageBox(0, texName, "title", 0); strcat(texName, texNum); //MessageBox(0, texNum, "title", 0); strcat(texName, ".bmp"); //MessageBox(0, texName, "title", 0); // Load The Bitmap, Check For Errors, If Bitmap''s Not Found Quit if (TextureImage=LoadBMP(texName)) { Status=TRUE; // Set The Status To TRUE glGenTextures(2, &texture[i]); // Create The Texture // Create MipMapped Texture glBindTexture(GL_TEXTURE_2D, texture[i]); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR_MIPMAP_NEAREST); gluBuild2DMipmaps(GL_TEXTURE_2D, 3, TextureImage[i]->sizeX, TextureImage[i]->sizeY, GL_RGB, GL_UNSIGNED_BYTE, TextureImage[i]->data); } if (TextureImage[i]) // If Texture Exists { if (TextureImage[i]->data) // If Texture Image Exists { free(TextureImage[i]->data); // Free The Texture Image Memory } free(TextureImage[i]); // Free The Image Structure } } return Status; // Return The Status }
Eric_003
Eric_003
I have solved this error so i dont need help anymore

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.