   1D texture code...?
  I'm having some trouble getting a 1D texture to work.  I basically want to have a palette available in my shader.  I created a texture 128x1 (128 wide, 1 tall.  32 bit.)  I tried this (the "mainTexture" is the 2D texture that I use on the object):glActiveTexture(GL_TEXTURE0_ARB);glBindTexture(GL_TEXTURE_2D, mainTexture->texID);glActiveTexture(GL_TEXTURE1_ARB);glBindTexture(GL_TEXTURE_1D, paletteTexture->texID);Also, I assigned the sampler locations like this:uniform_loc = glGetUniformLocationARB(convection->GetProgram(), "Texture");glUniform1iARB(uniform_loc, 0);uniform_loc = glGetUniformLocationARB(convection->GetProgram(), "Palette");glUniform1iARB(uniform_loc, 1);my shader has this:uniform sampler2D Texture;uniform sampler1D Palette;and I try to sample the palette texture like this (x is a value from 0.0 to 1.0):vec4 palcol = texture1D(Palette, x);but all I get is black?   
Quote:Original post by FunkymunkyI created a texture 128x1 (128 wide, 1 tall.  32 bit.)  I tried this (the "mainTexture" is the 2D texture that I use on the object):Keep in mind that you can't create a 2D texture (a 128x1 is a 2D texture) and treat is as a 1D texture. You need to create an actual uni-dimensional texture using glTexImage1D. Otherwise you will still need to sample it with texture2D() and give it a sampler2D type, even if it has an x*1 size.;  Perhaps you should post your texture creation code as well.   