apocalexiz
08-07-2003, 09:27 PM
hy there
i read the nehe tut no. 6 for understanding texture loading...but there is something i dont understood completely
he is loading the texture data in the function
int LoadGLTextures()
after this he was calling the standardfunctions for creating a texture...but then...he free's the allocated memory completely
now to my questions...
if ive done the following...
glGenTextures(1, &texture[0]);
glBindTexture(GL_TEXTURE_2D, texture[0]);
glTexImage2D(GL_TEXTURE_2D, 0, 3, TextureImage[0]->sizeX, TextureImage[0]->sizeY, 0, GL_RGB, GL_UNSIGNED_BYTE, TextureImage[0]->data);
...filtering func's...
what happens to opengl... cause nehe is deleting the image data... so i guess opengl does a copy of the data and assigning it to the texture[0] array value... is the value in the texture array an adress to a memory location???
i only want a detailed explanation what opengl does if i try to generate a texture http://www.opengl.org/discussion_boards/ubb/smile.gif
hope someone can help
bye
apo
i read the nehe tut no. 6 for understanding texture loading...but there is something i dont understood completely
he is loading the texture data in the function
int LoadGLTextures()
after this he was calling the standardfunctions for creating a texture...but then...he free's the allocated memory completely
now to my questions...
if ive done the following...
glGenTextures(1, &texture[0]);
glBindTexture(GL_TEXTURE_2D, texture[0]);
glTexImage2D(GL_TEXTURE_2D, 0, 3, TextureImage[0]->sizeX, TextureImage[0]->sizeY, 0, GL_RGB, GL_UNSIGNED_BYTE, TextureImage[0]->data);
...filtering func's...
what happens to opengl... cause nehe is deleting the image data... so i guess opengl does a copy of the data and assigning it to the texture[0] array value... is the value in the texture array an adress to a memory location???
i only want a detailed explanation what opengl does if i try to generate a texture http://www.opengl.org/discussion_boards/ubb/smile.gif
hope someone can help
bye
apo