Archived

This topic is now archived and is closed to further replies.

dpmodex

SGIS multitexture problem...

Recommended Posts

I have a problem using the SGIS multitexture extension, all polygons are white(non-textured).Yeah,I know ARB would be better,but I have no support for it... The following code is used for each polygon: glSelectTextureSGIS(GL_TEXTURE0_SGIS); glEnable(GL_TEXTURE_2D); glEnable(GL_BLEND); glBindTexture(GL_TEXTURE_2D,tex1); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER,GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); glSelectTextureSGIS(GL_TEXTURE1_SGIS); glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D,tex2); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER,GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); glbegin(GL_TRIANGLE_STRIP); glcolor4f(1,1,1,1); glmultitexcoord2fSGIS(GL_TEXTURE0_SGIS,0,0); glmultitexcoord2fSGIS(GL_TEXTURE1_SGIS,0,0); glvertex3f(p1.x,p1.y,p1.z); glmultitexcoord2fSGIS(GL_TEXTURE0_SGIS,1,0); glmultitexcoord2fSGIS(GL_TEXTURE1_SGIS,1,0); glvertex3f(p2.x,p2.y,p2.z); glmultitexcoord2fSGIS(GL_TEXTURE0_SGIS,1,1); glmultitexcoord2fSGIS(GL_TEXTURE1_SGIS,1,1); glvertex3f(p3.x,p3.y,p3.z); glmultitexcoord2fSGIS(GL_TEXTURE0_SGIS,0,1); glmultitexcoord2fSGIS(GL_TEXTURE1_SGIS,0,1); glvertex3f(p4.x,p4.y,p4.z); glend; Did I forgot something? Hlp...Pls...Thnx...

Share this post


Link to post
Share on other sites