It could be the pixel alignment. I think by default the driver expects texel data to be aligned on word (4 byte) boundaries. Your data is RGB, so you’d need to specify byte alignment with something like:
How are you assigning texture coordinates? Are you clamping them to the texture edge? The man page for glTexImage1D indicates that the OpenGL specification guarantees no textures with dimension less than 64. You might try replicating each color 16 times.
const GLvoid * data
Specifies the width of the texture image including the border if any. If the GL version does not support non-power-of-two sizes, this value must be 2^n+2 (border) for some integer n. All implementations support texture images that are at least 64 texels wide. The height of the 1D texture image is 1.
Thanks I just read that in the man page, but this is talking about texels not pixels.
I don’t think this means that my 1D texture (line) has to be 64 pixels wide, but I’m going to try that anyhow as nothing else seems to be working.
I might end up having to use a 2D image texture after all, which I was hoping not to as it complicated everything