Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: GLSL Multiple Textures  (Read 2907 times)

0 Members and 1 Guest are viewing this topic.

ninjamint

  • Newbie
  • *
  • Posts: 15
    • View Profile
GLSL Multiple Textures
« 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 =|

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
GLSL Multiple Textures
« Reply #1 on: January 27, 2010, 07:58:02 pm »
SFML doesn't allow this, as the texture may internally have white borders.
Laurent Gomila - SFML developer

ninjamint

  • Newbie
  • *
  • Posts: 15
    • View Profile
GLSL Multiple Textures
« Reply #2 on: January 28, 2010, 11:26:52 pm »
any idea about multi-textures & GLSL laurent?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
GLSL Multiple Textures
« Reply #3 on: January 28, 2010, 11:52:45 pm »
Hum? Have you completely changed your first post??
Laurent Gomila - SFML developer

ninjamint

  • Newbie
  • *
  • Posts: 15
    • View Profile
GLSL Multiple Textures
« Reply #4 on: January 28, 2010, 11:57:58 pm »
maaaybeh

** nevermind tho, fixed it **

 

anything