我正在使用以下代码来渲染一维纹理。但在某些图形卡中,它仅呈现纯白色。我注意到有时它在安装卡的驱动程序后被修复。
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);
有人可以帮忙吗?