I\'ve recently downloaded OpenTK. I\'ve created a basic game class and a quad. I\'ve tried rendering a texture in my quad but it doesn\'t work. Here\'s my code. This is the
Try replacing:
GL.TexImage2D (TextureTarget.Texture2D, 0, PixelInternalFormat.Rgba, Texture.GetWidth(), Texture.GetHeight(), 0, OpenTK.Graphics.OpenGL.PixelFormat.Rgba, PixelType.Bitmap, data.Scan0);
with:
GL.TexImage2D (TextureTarget.Texture2D, 0, PixelInternalFormat.Rgba, Texture.GetWidth(), Texture.GetHeight(), 0, OpenTK.Graphics.OpenGL.PixelFormat.Bgra, PixelType.UnsignedByte, data.Scan0);
GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureWrapS, TextureWrapMode.ClampToEdge);
GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureWrapT, TextureWrapMode.ClampToEdge);
This should solve it. In yours there are format issues where what you used is does not accurately represent how System.Drawing.Bitmap represents 32bpp Argb bitmaps.