0

次のコードを使用して 1D テクスチャをレンダリングしています。しかし、一部のグラフィック カードでは、真っ白なカードしかレンダリングされません。カードのドライバーをインストールした後、時々修正されることに気付きました。

          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);

誰でも助けることができますか?

4

1 に答える 1