I have big problems with the function gluBuild2DMipmaps, I don’t think anyone will be able to solve this, well let’s try :
glBindTexture(GL_TEXTURE_2D, texture[1]);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
glTexImage2D(GL_TEXTURE_2D, 0, 3, TexImg[0]->sizeX, TextImg[0]->sizeY, 0, GL_RGB, GL_UNSIGNED_BYTE, TexImg[0]->data);
// /w MipMaping the texture…
glBindTexture(GL_TEXTURE_2D, texture[2]);
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, TexImg[0]->sizeX, TexImg[0]->sizeY, GL_RGB, GL_UNSIGNED_BYTE, TexImg[0]->data);
//////////////////////////////////////
That works in C… as you see it’s nearly the same as non-mipmaping. Now HERE is my prob in VB6 : (you will recognise a bit NeHe)
//////////////////////////////////////
//THIS WORKS :
glTexParameteri glTexture2D, tpnTextureMagFilter, GL_LINEAR
glTexParameteri glTexture2D, tpnTextureMinFilter, GL_LINEAR_MIPMAP_LINEAR
glTexImage2D glTexture2D, 0, 3, wx, hx, 0, GL_RGB, GL_UNSIGNED_BYTE, TexImg(0, 0, 0)
// /w MipMaping it DOESN’T WORK :
glTexParameteri glTexture2D, tpnTextureMagFilter, GL_LINEAR
glTexParameteri glTexture2D, tpnTextureMinFilter, GL_LINEAR_MIPMAP_LINEAR
gluBuild2DMipmaps glTexture2D, 3, wx, hx, tiRGB, pxlBitmap, TexImg(0, 0, 0)
///////////////////////////////////////////
Arghhh ! It stucks here ! A critical GLU32.dll error raises !
TexImg(0) is a GLuInt pointer. I don’t think it’s something to do with the RGB map…
Tell me why ! It’s exactly the same as in C code, maybe :
1- Dll entries are messed up ?
2- OGL TLB has limits or wrong enum ?
3- or… tell me !
Help will be greatly appreciated because my project is stucked here… and please say if I will have more of theese using a derived language such as VB instead of natural C… thanks
Dave
[This message has been edited by Crusader (edited 09-17-2000).]