My first post on the boards, and I would like to thank NeHe for his wonderful OpenGL tutorials. I am currently on lesson 6, but have hit a brick wall with the code. I am using MSVC++ 4.0 (yes, an older version, but I had it around and don't want to upgrade).
The errors deal specifically with the glGenTextures and glBindTexture, which MSVC says are undeclared and do not evaluate to a function. Here are the errors:
--------------------Configuration: 3d Cube Texture Map - Win32 Debug--------------------
Compiling...
texture_test.cpp
C:\Msdev\Projects\3d Cube Texture Map\texture_test.cpp(54) : error C2065: 'glGenTextures' : undeclared identifier
C:\Msdev\Projects\3d Cube Texture Map\texture_test.cpp(54) : error C2064: term does not evaluate to a function
C:\Msdev\Projects\3d Cube Texture Map\texture_test.cpp(57) : error C2065: 'glBindTexture' : undeclared identifier
C:\Msdev\Projects\3d Cube Texture Map\texture_test.cpp(57) : error C2064: term does not evaluate to a function
C:\Msdev\Projects\3d Cube Texture Map\texture_test.cpp(123) : error C2064: term does not evaluate to a function
Error executing cl.exe.
3d Cube Texture Map.exe - 5 error(s), 0 warning(s)
In case some of you aren't familiar with lesson 6, here is the LoadGLTextures() function:
int LoadGLTextures() // Load Bitmaps And Convert To Textures
{
int Status=FALSE; // Status Indicator
AUX_RGBImageRec *TextureImage[1]; // Create Storage Space For The Texture
memset(TextureImage,0,sizeof(void *)*1); // Set The Pointer To NULL
// Load The Bitmap, Check For Errors, If Bitmap's Not Found Quit
if (TextureImage[0]=LoadBMP("Data/NeHe.bmp"))
{
Status=TRUE; // Set The Status To TRUE
glGenTextures(1, &texture[0]); // Create The Texture
// Typical Texture Generation Using Data From The Bitmap
glBindTexture(GL_TEXTURE_2D, texture[0]);
// Generate The Texture
glTexImage2D(GL_TEXTURE_2D, 0, 3, TextureImage[0]->sizeX, TextureImage[0]->sizeY, 0, GL_RGB, GL_UNSIGNED_BYTE, TextureImage[0]->data);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR); // Linear Filtering
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); // Linear Filtering
}
if (TextureImage[0]) // If Texture Exists
{
if (TextureImage[0]->data) // If Texture Image Exists
{
free(TextureImage[0]->data); // Free The Texture Image Memory
}
free(TextureImage[0]); // Free The Image Structure
}
return Status; // Return The Status
}
Thanks for any help you can provide,
Dan
[edited by - Erunama on April 17, 2002 6:26:45 PM]