LWJGL Forum

Programming => OpenGL => Topic started by: blue_tomato on July 24, 2006, 11:43:36

Title: texture2D lookup in GLSL?
Post by: blue_tomato on July 24, 2006, 11:43:36
I need to look up a color sample from a texture in GLSL, something like


uniform sampler2D texture;

main()
{
  vec4 col=texture2D(texture,coord);
  ...
}


But, how do I make a loaded texture with a given textureID accessible to the uniform texture in the above example?

Thanks :)