mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-24 16:25:26 +00:00
Fixed capitalization of Texture2D.
This commit is contained in:
parent
e088f62096
commit
0a06757331
|
@ -259,7 +259,7 @@ namespace OpenTK.Fonts
|
|||
/// <param name="handle">The TextHandle to the cached text.</param>
|
||||
public void Draw(TextHandle handle)
|
||||
{
|
||||
GL.BindTexture(TextureTarget.Texture2d, handle.font.Texture);
|
||||
GL.BindTexture(TextureTarget.Texture2D, handle.font.Texture);
|
||||
|
||||
printer.Draw(handle);
|
||||
}
|
||||
|
@ -305,7 +305,7 @@ namespace OpenTK.Fonts
|
|||
GL.PushAttrib(AttribMask.TextureBit);
|
||||
GL.PushAttrib(AttribMask.EnableBit);
|
||||
|
||||
GL.Enable(EnableCap.Texture2d);
|
||||
GL.Enable(EnableCap.Texture2D);
|
||||
GL.Enable(EnableCap.Blend);
|
||||
GL.BlendFunc(BlendingFactorSrc.SrcAlpha, BlendingFactorDest.OneMinusSrcAlpha);
|
||||
|
||||
|
|
|
@ -91,11 +91,11 @@ namespace OpenTK.Fonts
|
|||
pack = new TexturePacker<Glyph>(texture_width, texture_height);
|
||||
|
||||
GL.GenTextures(1, out texture);
|
||||
GL.BindTexture(TextureTarget.Texture2d, texture);
|
||||
GL.TexParameter(TextureTarget.Texture2d, TextureParameterName.TextureMinFilter, (int)All.Linear);
|
||||
GL.TexParameter(TextureTarget.Texture2d, TextureParameterName.TextureMagFilter, (int)All.Linear);
|
||||
GL.BindTexture(TextureTarget.Texture2D, texture);
|
||||
GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMinFilter, (int)All.Linear);
|
||||
GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMagFilter, (int)All.Linear);
|
||||
|
||||
GL.TexImage2D(TextureTarget.Texture2d, 0, PixelInternalFormat.Alpha, texture_width, texture_height, 0,
|
||||
GL.TexImage2D(TextureTarget.Texture2D, 0, PixelInternalFormat.Alpha, texture_width, texture_height, 0,
|
||||
OpenTK.OpenGL.Enums.PixelFormat.Rgba, PixelType.UnsignedByte, IntPtr.Zero);
|
||||
}
|
||||
|
||||
|
@ -160,14 +160,14 @@ namespace OpenTK.Fonts
|
|||
throw;
|
||||
}
|
||||
|
||||
GL.BindTexture(TextureTarget.Texture2d, texture);
|
||||
GL.BindTexture(TextureTarget.Texture2D, texture);
|
||||
|
||||
gfx.Clear(System.Drawing.Color.Transparent);
|
||||
gfx.DrawString(g.Character.ToString(), g.Font, System.Drawing.Brushes.White, 0.0f, 0.0f);
|
||||
|
||||
//BitmapData bitmap_data = bitmap.LockBits(new Rectangle(0, 0, rect.Width, rect.Height), ImageLockMode.ReadOnly,
|
||||
// System.Drawing.Imaging.PixelFormat.Format32bppArgb);
|
||||
//GL.TexSubImage2D(TextureTarget.Texture2d, 0, rect.Left, rect.Top, rect.Width, rect.Height,
|
||||
//GL.TexSubImage2D(TextureTarget.Texture2D, 0, rect.Left, rect.Top, rect.Width, rect.Height,
|
||||
// OpenTK.OpenGL.Enums.PixelFormat.Rgba, PixelType.UnsignedByte, bitmap_data.Scan0);
|
||||
//bitmap.UnlockBits(bitmap_data);
|
||||
|
||||
|
@ -189,7 +189,7 @@ namespace OpenTK.Fonts
|
|||
}
|
||||
|
||||
fixed (int* data_ptr = data)
|
||||
GL.TexSubImage2D(TextureTarget.Texture2d, 0, rect.Left, rect.Top, rect.Width, rect.Height,
|
||||
GL.TexSubImage2D(TextureTarget.Texture2D, 0, rect.Left, rect.Top, rect.Width, rect.Height,
|
||||
OpenTK.OpenGL.Enums.PixelFormat.Rgba, PixelType.UnsignedByte, (IntPtr)data_ptr);
|
||||
}
|
||||
bmp.UnlockBits(bitmap_data);
|
||||
|
|
Loading…
Reference in a new issue