Skip to main content
GameDev.net gamedev.net
🔒 Locked

texture mapping problem

Started by ogl Nov 23, 2001 at 9:01 AM 1 replies 350+ views
Original Post
ogl
ogl
Hi I''m trying to implement texture mapping using nehe''s tutorial and my program keeps crashing with unhandled exception glu32 how can I sort this out? cheers
ogl
ogl
I have LoadBMP(char* Filename) and LoadGLTextures() in DrawGLObjects class - where I draw all the object of my scene - I call the functions of the object in MyprojView class in OnPaint(). In initOpenGL() (in myprojView class) I have:
if (!LoadGLTextures())
{
return FALSE;
}

The program compiles fine but crashes with unhandled exception pointing to this line in LoadGLTextures():

glTexImage2D(GL_TEXTURE_2D, 0, 1, TextureImage[texnum]->sizeX, TextureImage[texnum]->sizeY,
0, GL_RGB, GL_UNSIGNED_BYTE, TextureImage[texnum]->data);

and stating error - can not access data, sizeX and sizeY

Edited by - ogl on November 26, 2001 6:26:34 AM

Topic Locked

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

Sign in to reply to this topic.