Remove regions
Fix MatrixUsage for rectReflection in OGL
This commit is contained in:
1 parent
4e17745be0
commit
719c73e6d3
2 files changed
+1
-25
No files matched your search
@@ -68,7 +68,6 @@ namespace Vocaluxe.Lib.Draw
|
|||||||
|
|
||||||
class CDirect3D : CDrawBaseWindows<CD3DTexture>, IDraw
|
class CDirect3D : CDrawBaseWindows<CD3DTexture>, IDraw
|
||||||
{
|
{
|
||||||
#region private vars
|
|
||||||
private readonly Direct3D _D3D;
|
private readonly Direct3D _D3D;
|
||||||
private readonly Device _Device;
|
private readonly Device _Device;
|
||||||
private readonly PresentParameters _PresentParameters;
|
private readonly PresentParameters _PresentParameters;
|
||||||
@@ -81,7 +80,6 @@ namespace Vocaluxe.Lib.Draw
|
|||||||
private readonly Queue<STexturedColoredVertex> _Vertices = new Queue<STexturedColoredVertex>();
|
private readonly Queue<STexturedColoredVertex> _Vertices = new Queue<STexturedColoredVertex>();
|
||||||
private readonly Queue<Texture> _VerticesTextures = new Queue<Texture>();
|
private readonly Queue<Texture> _VerticesTextures = new Queue<Texture>();
|
||||||
private readonly Queue<Matrix> _VerticesRotationMatrices = new Queue<Matrix>();
|
private readonly Queue<Matrix> _VerticesRotationMatrices = new Queue<Matrix>();
|
||||||
#endregion private vars
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates a new Instance of the CDirect3D Class
|
/// Creates a new Instance of the CDirect3D Class
|
||||||
@@ -505,7 +503,6 @@ namespace Vocaluxe.Lib.Draw
|
|||||||
}
|
}
|
||||||
#endregion main stuff
|
#endregion main stuff
|
||||||
|
|
||||||
#region Basic Draw Methods
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Removes all textures from the screen
|
/// Removes all textures from the screen
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -588,9 +585,7 @@ namespace Vocaluxe.Lib.Draw
|
|||||||
{
|
{
|
||||||
DrawTextureReflection(_BlankTexture, rect, color, rect, space, height);
|
DrawTextureReflection(_BlankTexture, rect, color, rect, space, height);
|
||||||
}
|
}
|
||||||
#endregion Basic Draw Methods
|
|
||||||
|
|
||||||
#region Textures
|
|
||||||
protected override CD3DTexture _CreateTexture(Size dataSize)
|
protected override CD3DTexture _CreateTexture(Size dataSize)
|
||||||
{
|
{
|
||||||
if (dataSize.Width < 0)
|
if (dataSize.Width < 0)
|
||||||
@@ -616,7 +611,6 @@ namespace Vocaluxe.Lib.Draw
|
|||||||
}
|
}
|
||||||
texture.D3DTexture.UnlockRectangle(0);
|
texture.D3DTexture.UnlockRectangle(0);
|
||||||
}
|
}
|
||||||
#endregion Textures
|
|
||||||
|
|
||||||
private static Matrix _CalculateRotationMatrix(float rot, float rx1, float rx2, float ry1, float ry2)
|
private static Matrix _CalculateRotationMatrix(float rot, float rx1, float rx2, float ry1, float ry2)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -93,9 +93,7 @@ namespace Vocaluxe.Lib.Draw
|
|||||||
|
|
||||||
class COpenGL : CDrawBaseWindows<COGLTexture>, IDraw
|
class COpenGL : CDrawBaseWindows<COGLTexture>, IDraw
|
||||||
{
|
{
|
||||||
#region private vars
|
|
||||||
private readonly GLControl _Control;
|
private readonly GLControl _Control;
|
||||||
#endregion private vars
|
|
||||||
|
|
||||||
public COpenGL()
|
public COpenGL()
|
||||||
{
|
{
|
||||||
@@ -142,7 +140,6 @@ namespace Vocaluxe.Lib.Draw
|
|||||||
_NonPowerOf2TextureSupported = false;
|
_NonPowerOf2TextureSupported = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Helpers
|
|
||||||
private static int _CheckAntiAliasingMode(int setValue)
|
private static int _CheckAntiAliasingMode(int setValue)
|
||||||
{
|
{
|
||||||
int samples = 0;
|
int samples = 0;
|
||||||
@@ -202,15 +199,12 @@ namespace Vocaluxe.Lib.Draw
|
|||||||
return result - 8;
|
return result - 8;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
#endregion Helpers
|
|
||||||
|
|
||||||
#region form events
|
|
||||||
protected override void _OnResize(object sender, EventArgs e)
|
protected override void _OnResize(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
_Control.ClientSize = _Form.ClientSize;
|
_Control.ClientSize = _Form.ClientSize;
|
||||||
base._OnResize(sender, e);
|
base._OnResize(sender, e);
|
||||||
}
|
}
|
||||||
#endregion form events
|
|
||||||
|
|
||||||
protected override void _DoResize()
|
protected override void _DoResize()
|
||||||
{
|
{
|
||||||
@@ -223,9 +217,6 @@ namespace Vocaluxe.Lib.Draw
|
|||||||
GL.Viewport(_X, _Y, _W, _H);
|
GL.Viewport(_X, _Y, _W, _H);
|
||||||
}
|
}
|
||||||
|
|
||||||
#region implementation
|
|
||||||
|
|
||||||
#region main stuff
|
|
||||||
public override bool Init()
|
public override bool Init()
|
||||||
{
|
{
|
||||||
if (!base.Init())
|
if (!base.Init())
|
||||||
@@ -296,9 +287,7 @@ namespace Vocaluxe.Lib.Draw
|
|||||||
screen.Save(file, ImageFormat.Bmp);
|
screen.Save(file, ImageFormat.Bmp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion main stuff
|
|
||||||
|
|
||||||
#region Basic Draw Methods
|
|
||||||
public CTextureRef CopyScreen()
|
public CTextureRef CopyScreen()
|
||||||
{
|
{
|
||||||
//TODO: Check if _W,_H needs to be used or not
|
//TODO: Check if _W,_H needs to be used or not
|
||||||
@@ -376,7 +365,7 @@ namespace Vocaluxe.Lib.Draw
|
|||||||
|
|
||||||
|
|
||||||
GL.Enable(EnableCap.Blend);
|
GL.Enable(EnableCap.Blend);
|
||||||
GL.MatrixMode(MatrixMode.Texture);
|
GL.MatrixMode(MatrixMode.Color);
|
||||||
GL.PushMatrix();
|
GL.PushMatrix();
|
||||||
if (Math.Abs(rect.Rotation) > 0.001)
|
if (Math.Abs(rect.Rotation) > 0.001)
|
||||||
{
|
{
|
||||||
@@ -392,8 +381,6 @@ namespace Vocaluxe.Lib.Draw
|
|||||||
|
|
||||||
GL.Color4(color.R, color.G, color.B, 0f);
|
GL.Color4(color.R, color.G, color.B, 0f);
|
||||||
GL.Vertex3(rx2, ry2, rect.Z + CGraphics.ZOffset);
|
GL.Vertex3(rx2, ry2, rect.Z + CGraphics.ZOffset);
|
||||||
|
|
||||||
GL.Color4(color.R, color.G, color.B, 0f);
|
|
||||||
GL.Vertex3(rx1, ry2, rect.Z + CGraphics.ZOffset);
|
GL.Vertex3(rx1, ry2, rect.Z + CGraphics.ZOffset);
|
||||||
|
|
||||||
GL.Color4(color.R, color.G, color.B, color.A * CGraphics.GlobalAlpha);
|
GL.Color4(color.R, color.G, color.B, color.A * CGraphics.GlobalAlpha);
|
||||||
@@ -403,9 +390,7 @@ namespace Vocaluxe.Lib.Draw
|
|||||||
GL.PopMatrix();
|
GL.PopMatrix();
|
||||||
GL.Disable(EnableCap.Blend);
|
GL.Disable(EnableCap.Blend);
|
||||||
}
|
}
|
||||||
#endregion Basic Draw Methods
|
|
||||||
|
|
||||||
#region Textures
|
|
||||||
protected override COGLTexture _CreateTexture(Size dataSize)
|
protected override COGLTexture _CreateTexture(Size dataSize)
|
||||||
{
|
{
|
||||||
if (dataSize.Width < 0)
|
if (dataSize.Width < 0)
|
||||||
@@ -483,8 +468,5 @@ namespace Vocaluxe.Lib.Draw
|
|||||||
GL.Disable(EnableCap.Blend);
|
GL.Disable(EnableCap.Blend);
|
||||||
GL.BindTexture(TextureTarget.Texture2D, 0);
|
GL.BindTexture(TextureTarget.Texture2D, 0);
|
||||||
}
|
}
|
||||||
#endregion Textures
|
|
||||||
|
|
||||||
#endregion implementation
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user