mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-02-03 08:11:04 +00:00
Merged fix for issue [#1089]: "TextPrinter is affected by TextureGen* and TextureEnvMode" from 0.9.8 branch.
This commit is contained in:
parent
5edfb98d03
commit
fbab14bb7a
|
@ -17,7 +17,6 @@ using System.Diagnostics;
|
||||||
using System.Reflection.Emit;
|
using System.Reflection.Emit;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
// Add a dummy namespace to keep old code compiling.
|
// Add a dummy namespace to keep old code compiling.
|
||||||
|
@ -968,8 +967,7 @@ namespace OpenTK.Graphics
|
||||||
unsafe
|
unsafe
|
||||||
{
|
{
|
||||||
int length;
|
int length;
|
||||||
GL.GetProgram(program, OpenTK.Graphics.ProgramParameter.InfoLogLength, out length);
|
GL.GetProgram(program, OpenTK.Graphics.ProgramParameter.InfoLogLength, out length); if (length == 0)
|
||||||
if (length == 0)
|
|
||||||
{
|
{
|
||||||
info = String.Empty;
|
info = String.Empty;
|
||||||
return;
|
return;
|
||||||
|
@ -1274,6 +1272,27 @@ namespace OpenTK.Graphics
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region TexEnv
|
||||||
|
|
||||||
|
public static void TexEnv(TextureEnvTarget target, TextureEnvParameter pname, System.Drawing.Color color)
|
||||||
|
{
|
||||||
|
Color4 c = new Color4(color);
|
||||||
|
unsafe
|
||||||
|
{
|
||||||
|
TexEnv(target, pname, &c.R);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void TexEnv(TextureEnvTarget target, TextureEnvParameter pname, Color4 color)
|
||||||
|
{
|
||||||
|
unsafe
|
||||||
|
{
|
||||||
|
TexEnv(target, pname, &color.R);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
#pragma warning restore 3019
|
#pragma warning restore 3019
|
||||||
#pragma warning restore 1591
|
#pragma warning restore 1591
|
||||||
#pragma warning restore 1572
|
#pragma warning restore 1572
|
||||||
|
|
|
@ -86,6 +86,14 @@ namespace OpenTK.Graphics.Text
|
||||||
|
|
||||||
GL.Disable(EnableCap.DepthTest);
|
GL.Disable(EnableCap.DepthTest);
|
||||||
|
|
||||||
|
GL.TexEnv(TextureEnvTarget.TextureEnv, TextureEnvParameter.TextureEnvMode, (int)All.Modulate);
|
||||||
|
GL.TexEnv(TextureEnvTarget.TextureEnv, TextureEnvParameter.TextureEnvColor, new Color4(0, 0, 0, 0));
|
||||||
|
|
||||||
|
GL.Disable(EnableCap.TextureGenQ);
|
||||||
|
GL.Disable(EnableCap.TextureGenR);
|
||||||
|
GL.Disable(EnableCap.TextureGenS);
|
||||||
|
GL.Disable(EnableCap.TextureGenT);
|
||||||
|
|
||||||
RectangleF position;
|
RectangleF position;
|
||||||
|
|
||||||
SetColor(color);
|
SetColor(color);
|
||||||
|
|
Loading…
Reference in a new issue