mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-01-11 16:15:38 +00:00
Fixed capitalization of Texture2D etc.
This commit is contained in:
parent
f572f0e9ba
commit
1a4c5adf89
|
@ -61,7 +61,7 @@ namespace Examples.Tutorial
|
|||
|
||||
public override void OnLoad(EventArgs e)
|
||||
{
|
||||
GL.Enable(EnableCap.Texture2d);
|
||||
GL.Enable(EnableCap.Texture2D);
|
||||
|
||||
GL.ClearColor(Color.CadetBlue);
|
||||
GL.Enable(EnableCap.DepthTest);
|
||||
|
|
|
@ -40,23 +40,23 @@ namespace Examples.Tutorial
|
|||
public override void OnLoad(EventArgs e)
|
||||
{
|
||||
GL.ClearColor(Color.SteelBlue);
|
||||
GL.Enable(EnableCap.Texture2d);
|
||||
GL.Enable(EnableCap.Texture2D);
|
||||
|
||||
GL.Hint(HintTarget.PerspectiveCorrectionHint, HintMode.Nicest);
|
||||
|
||||
GL.GenTextures(1, out texture);
|
||||
GL.BindTexture(TextureTarget.Texture2d, texture);
|
||||
GL.BindTexture(TextureTarget.Texture2D, texture);
|
||||
|
||||
BitmapData data = bitmap.LockBits(new Rectangle(0, 0, bitmap.Width, bitmap.Height),
|
||||
ImageLockMode.ReadOnly, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
|
||||
|
||||
GL.TexImage2D(TextureTarget.Texture2d, 0, PixelInternalFormat.Rgba, data.Width, data.Height, 0,
|
||||
GL.TexImage2D(TextureTarget.Texture2D, 0, PixelInternalFormat.Rgba, data.Width, data.Height, 0,
|
||||
OpenTK.OpenGL.Enums.PixelFormat.Bgra, PixelType.UnsignedByte, data.Scan0);
|
||||
|
||||
bitmap.UnlockBits(data);
|
||||
|
||||
GL.TexParameter(TextureTarget.Texture2d, TextureParameterName.TextureMinFilter, (int)TextureMinFilter.Linear);
|
||||
GL.TexParameter(TextureTarget.Texture2d, TextureParameterName.TextureMagFilter, (int)TextureMagFilter.Linear);
|
||||
GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMinFilter, (int)TextureMinFilter.Linear);
|
||||
GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMagFilter, (int)TextureMagFilter.Linear);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
@ -116,7 +116,7 @@ namespace Examples.Tutorial
|
|||
|
||||
GL.MatrixMode(MatrixMode.Modelview);
|
||||
GL.LoadIdentity();
|
||||
GL.BindTexture(TextureTarget.Texture2d, texture);
|
||||
GL.BindTexture(TextureTarget.Texture2D, texture);
|
||||
|
||||
GL.Begin(BeginMode.Quads);
|
||||
|
||||
|
|
Loading…
Reference in a new issue