when I build a 1D texture like this
glBindTexture(GL_TEXTURE_1D, 1);
glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
glTexImage1D(GL_TEXTURE_1D,
0,
GL_RGBA,
256,
0,
GL_RGBA,
GL_UNSIGNED_BYTE,
table);
I found the first color of the texture is the same as the final one.In another word, Index “0” Color is the same as Index “255”. Why? And How to deal with this?