I'm trying to create a simple 1D texture of different colours to put over a 
function plot as a countour.

So I tried to set it up like this;


   GLubyte Texture4[4][3] =
    {


      { 0x00, 0x00, 0xa0 },   // Dark Blue
      { 0x00, 0x00, 0xff },   // Blue
      { 0x00, 0xff, 0x00 },   // Green
      { 0xff, 0x00, 0x00 }   // Red


     };

(other paremeter settings in here...)

  glTexImage1D(GL_TEXTURE_1D, 0, GL_RGB, 4, 0, GL_RGB , GL_UNSIGNED_BYTE, 
Texture4);

Now this partly works the dark blue, blue and the green colour bands show up 
just fine, but for some reason the red it just black.

It's as if the red RGB component gets completely ignored, but all the others 
work just fine.

Any ideas?

Thanks all.
_______________________________________________
fltk-opengl mailing list
fltk-opengl@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-opengl

Reply via email to