I am using following code to render a 1D texture. But in some graphic cards it renders only a solid white one. I noticed sometimes it is fixed after installing the card's driver.
byte[,] Texture8 = new byte[,]
{
{ 000, 000, 255 },
{ 000, 255, 255 },
{ 000, 255, 000 },
{ 255, 255, 000 },
{ 255, 000, 000 }
};
GL.Enable(EnableCap.Texture1D);
// Set pixel storage mode
GL.PixelStore(PixelStoreParameter.UnpackAlignment, 1);
// Generate a texture name
texture = GL.GenTexture();
// Create a texture object
GL.BindTexture(TextureTarget.ProxyTexture1D, texture);
GL.TexParameter(TextureTarget.Texture1D,
TextureParameterName.TextureMagFilter,
(int)All.Nearest);
GL.TexParameter(TextureTarget.Texture1D,
TextureParameterName.TextureMinFilter,
(int)All.Nearest);
GL.TexImage1D(TextureTarget.Texture1D, 0,
PixelInternalFormat.Three, /*with*/5, 0,
PixelFormat.Rgb,
PixelType.UnsignedByte, Texture8);
Can anybody help?