GLuint EmptyTexture()
{
GLuint txtnumber;
unsigned int* data; // unnecessary line
data = (unsigned int*)new GLuint[((128 * 128)* 4 * sizeof(unsigned int))]; // unnecessary line
ZeroMemory(data,((128 * 128)* 4 * sizeof(unsigned int))); // unnecessary line
glGenTextures(1, &txtnumber);
glBindTexture(GL_TEXTURE_2D, txtnumber);
glTexImage2D(GL_TEXTURE_2D, 0, 4, 128, 128, 0, // unnecessary line
GL_RGBA, GL_UNSIGNED_BYTE, data); // unnecessary line
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
delete [] data; // unnecessary line
return txtnumber;
}
try to delete unnecessary lines and that should still work :-) however, i liked this tutorial much :-)
error in tutorial 36
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement