removed display lists from COpenGL.cs

This commit is contained in:
Alexander Eckart committed 2012-03-16 19:48:23 +01:00
1 parent 86ef72f833
commit 2ca236f4dc
1 file changed
-37
-37
View File
@@ -48,7 +48,6 @@ namespace Vocaluxe.Lib.Draw
private List<STexture> _Textures; private List<STexture> _Textures;
private List<int> _IDs; private List<int> _IDs;
private List<int> _GLList;
private List<STextureQueque> _Queque; private List<STextureQueque> _Queque;
private Object MutexTexture = new Object(); private Object MutexTexture = new Object();
@@ -67,7 +66,6 @@ namespace Vocaluxe.Lib.Draw
this.Icon = new System.Drawing.Icon(Path.Combine(System.Environment.CurrentDirectory, CSettings.sIcon)); this.Icon = new System.Drawing.Icon(Path.Combine(System.Environment.CurrentDirectory, CSettings.sIcon));
_Textures = new List<STexture>(); _Textures = new List<STexture>();
_GLList = new List<int>();
_Queque = new List<STextureQueque>(); _Queque = new List<STextureQueque>();
_IDs = new List<int>(); _IDs = new List<int>();
@@ -461,13 +459,6 @@ namespace Vocaluxe.Lib.Draw
_Run = _Run && CGraphics.Draw(); _Run = _Run && CGraphics.Draw();
GL.CallLists(_GLList.Count, ListNameType.Int, _GLList.ToArray());
if (_GLList.Count > 0)
GL.DeleteLists(_GLList[0], _GLList.Count);
_GLList.Clear();
_Run = CGraphics.UpdateGameLogic(_Keys, _Mouse); _Run = CGraphics.UpdateGameLogic(_Keys, _Mouse);
control.SwapBuffers(); control.SwapBuffers();
@@ -630,11 +621,6 @@ namespace Vocaluxe.Lib.Draw
} }
public void DrawColor(SColorF color, SRectF rect) public void DrawColor(SColorF color, SRectF rect)
{
int list = GL.GenLists(1);
_GLList.Add(list);
GL.NewList(list, ListMode.Compile);
{ {
GL.Enable(EnableCap.Blend); GL.Enable(EnableCap.Blend);
GL.Color4(color.R, color.G, color.B, color.A * CGraphics.GlobalAlpha); GL.Color4(color.R, color.G, color.B, color.A * CGraphics.GlobalAlpha);
@@ -648,8 +634,6 @@ namespace Vocaluxe.Lib.Draw
GL.Disable(EnableCap.Blend); GL.Disable(EnableCap.Blend);
} }
GL.EndList();
}
#endregion Basic Draw Methods #endregion Basic Draw Methods
@@ -1124,11 +1108,6 @@ namespace Vocaluxe.Lib.Draw
return; return;
if (_TextureExists(ref Texture)) if (_TextureExists(ref Texture))
{
int list = GL.GenLists(1);
_GLList.Add(list);
GL.NewList(list, ListMode.Compile);
{ {
GL.BindTexture(TextureTarget.Texture2D, Texture.ID); GL.BindTexture(TextureTarget.Texture2D, Texture.ID);
@@ -1222,18 +1201,11 @@ namespace Vocaluxe.Lib.Draw
GL.Disable(EnableCap.Blend); GL.Disable(EnableCap.Blend);
GL.BindTexture(TextureTarget.Texture2D, 0); GL.BindTexture(TextureTarget.Texture2D, 0);
} }
GL.EndList();
}
} }
public void DrawTexture(STexture Texture, SRectF rect, SColorF color, float begin, float end) public void DrawTexture(STexture Texture, SRectF rect, SColorF color, float begin, float end)
{ {
if (_TextureExists(ref Texture)) if (_TextureExists(ref Texture))
{
int list = GL.GenLists(1);
_GLList.Add(list);
GL.NewList(list, ListMode.Compile);
{ {
GL.BindTexture(TextureTarget.Texture2D, Texture.ID); GL.BindTexture(TextureTarget.Texture2D, Texture.ID);
@@ -1261,8 +1233,6 @@ namespace Vocaluxe.Lib.Draw
GL.Disable(EnableCap.Blend); GL.Disable(EnableCap.Blend);
GL.BindTexture(TextureTarget.Texture2D, 0); GL.BindTexture(TextureTarget.Texture2D, 0);
} }
GL.EndList();
}
} }
public void DrawTextureReflection(STexture Texture, SRectF rect, SColorF color, SRectF bounds, float space, float height) public void DrawTextureReflection(STexture Texture, SRectF rect, SColorF color, SRectF bounds, float space, float height)
@@ -1280,11 +1250,6 @@ namespace Vocaluxe.Lib.Draw
height = bounds.H; height = bounds.H;
if (_TextureExists(ref Texture)) if (_TextureExists(ref Texture))
{
int list = GL.GenLists(1);
_GLList.Add(list);
GL.NewList(list, ListMode.Compile);
{ {
GL.BindTexture(TextureTarget.Texture2D, Texture.ID); GL.BindTexture(TextureTarget.Texture2D, Texture.ID);
@@ -1362,8 +1327,6 @@ namespace Vocaluxe.Lib.Draw
GL.Disable(EnableCap.Blend); GL.Disable(EnableCap.Blend);
GL.BindTexture(TextureTarget.Texture2D, 0); GL.BindTexture(TextureTarget.Texture2D, 0);
} }
GL.EndList();
}
} }
public int TextureCount() public int TextureCount()