SFML community forums

Help => Graphics => Topic started by: ninjamint on January 27, 2010, 06:01:44 pm

Title: GLSL Multiple Textures
Post by: ninjamint on January 27, 2010, 06:01:44 pm
Code: [Select]
// set wrapping & texture units
glActiveTexture( GL_TEXTURE0 );
glClientActiveTexture( GL_TEXTURE0 );
glEnable( GL_TEXTURE_2D );
myWater.Bind();
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
glDisable( GL_TEXTURE_2D );

glActiveTexture( GL_TEXTURE1 );
glClientActiveTexture( GL_TEXTURE1 );
glEnable( GL_TEXTURE_2D );
myCubeMap.Bind();
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
glDisable( GL_TEXTURE_2D );


this can't be correct... although it should be, right? I have 2 samplers in my GLSL only, only the first one though, is binding to "myWater", which makes since, but the second will not bind correctly =|
Title: GLSL Multiple Textures
Post by: Laurent on January 27, 2010, 07:58:02 pm
SFML doesn't allow this, as the texture may internally have white borders.
Title: GLSL Multiple Textures
Post by: ninjamint on January 28, 2010, 11:26:52 pm
any idea about multi-textures & GLSL laurent?
Title: GLSL Multiple Textures
Post by: Laurent on January 28, 2010, 11:52:45 pm
Hum? Have you completely changed your first post??
Title: GLSL Multiple Textures
Post by: ninjamint on January 28, 2010, 11:57:58 pm
maaaybeh

** nevermind tho, fixed it **