diff --git a/src/BizHawk.Bizware.BizwareGL/AttributeUsage.cs b/src/BizHawk.Bizware.BizwareGL/AttribUsage.cs similarity index 74% rename from src/BizHawk.Bizware.BizwareGL/AttributeUsage.cs rename to src/BizHawk.Bizware.BizwareGL/AttribUsage.cs index 10ad8a3cd9..4208a9d7eb 100644 --- a/src/BizHawk.Bizware.BizwareGL/AttributeUsage.cs +++ b/src/BizHawk.Bizware.BizwareGL/AttribUsage.cs @@ -1,6 +1,6 @@ namespace BizHawk.Bizware.BizwareGL { - public enum AttributeUsage + public enum AttribUsage { Unspecified, Position, diff --git a/src/BizHawk.Bizware.BizwareGL/GuiRenderer.cs b/src/BizHawk.Bizware.BizwareGL/GuiRenderer.cs index 91f569fae0..156bc49368 100644 --- a/src/BizHawk.Bizware.BizwareGL/GuiRenderer.cs +++ b/src/BizHawk.Bizware.BizwareGL/GuiRenderer.cs @@ -24,9 +24,9 @@ namespace BizHawk.Bizware.BizwareGL Owner = owner; VertexLayout = owner.CreateVertexLayout(); - VertexLayout.DefineVertexAttribute("aPosition", 0, 2, VertexAttribPointerType.Float, AttributeUsage.Position, false, 32, 0); - VertexLayout.DefineVertexAttribute("aTexcoord", 1, 2, VertexAttribPointerType.Float, AttributeUsage.Texcoord0, false, 32, 8); - VertexLayout.DefineVertexAttribute("aColor", 2, 4, VertexAttribPointerType.Float, AttributeUsage.Texcoord1, false, 32, 16); + VertexLayout.DefineVertexAttribute("aPosition", 0, 2, VertexAttribPointerType.Float, AttribUsage.Position, false, 32, 0); + VertexLayout.DefineVertexAttribute("aTexcoord", 1, 2, VertexAttribPointerType.Float, AttribUsage.Texcoord0, false, 32, 8); + VertexLayout.DefineVertexAttribute("aColor", 2, 4, VertexAttribPointerType.Float, AttribUsage.Texcoord1, false, 32, 16); VertexLayout.Close(); _Projection = new MatrixStack(); diff --git a/src/BizHawk.Bizware.BizwareGL/RetroShader.cs b/src/BizHawk.Bizware.BizwareGL/RetroShader.cs index 17ad9abdc7..b6a314cd71 100644 --- a/src/BizHawk.Bizware.BizwareGL/RetroShader.cs +++ b/src/BizHawk.Bizware.BizwareGL/RetroShader.cs @@ -18,9 +18,9 @@ namespace BizHawk.Bizware.BizwareGL Owner = owner; VertexLayout = owner.CreateVertexLayout(); - VertexLayout.DefineVertexAttribute("position", 0, 4, VertexAttribPointerType.Float, AttributeUsage.Position, false, 40, 0); - VertexLayout.DefineVertexAttribute("color", 1, 4, VertexAttribPointerType.Float, AttributeUsage.Color0, false, 40, 16); //just dead weight, i have no idea why this is here. but some old HLSL compilers (used in bizhawk for various reasons) will want it to exist here since it exists in the vertex shader - VertexLayout.DefineVertexAttribute("tex", 2, 2, VertexAttribPointerType.Float, AttributeUsage.Texcoord0, false, 40, 32); + VertexLayout.DefineVertexAttribute("position", 0, 4, VertexAttribPointerType.Float, AttribUsage.Position, false, 40, 0); + VertexLayout.DefineVertexAttribute("color", 1, 4, VertexAttribPointerType.Float, AttribUsage.Color0, false, 40, 16); //just dead weight, i have no idea why this is here. but some old HLSL compilers (used in bizhawk for various reasons) will want it to exist here since it exists in the vertex shader + VertexLayout.DefineVertexAttribute("tex", 2, 2, VertexAttribPointerType.Float, AttribUsage.Texcoord0, false, 40, 32); VertexLayout.Close(); string defines = ""; diff --git a/src/BizHawk.Bizware.BizwareGL/VertexLayout.cs b/src/BizHawk.Bizware.BizwareGL/VertexLayout.cs index 2bafa40b86..1b0ba4dbb5 100644 --- a/src/BizHawk.Bizware.BizwareGL/VertexLayout.cs +++ b/src/BizHawk.Bizware.BizwareGL/VertexLayout.cs @@ -42,7 +42,7 @@ namespace BizHawk.Bizware.BizwareGL } /// already closed (by call to ) - public void DefineVertexAttribute(string name, int index, int components, VertexAttribPointerType attribType, AttributeUsage usage, bool normalized, int stride, int offset = 0) + public void DefineVertexAttribute(string name, int index, int components, VertexAttribPointerType attribType, AttribUsage usage, bool normalized, int stride, int offset = 0) { if (Closed) throw new InvalidOperationException("Type is Closed and is now immutable."); @@ -65,7 +65,7 @@ namespace BizHawk.Bizware.BizwareGL public bool Normalized { get; internal set; } public int Stride { get; internal set; } public int Offset { get; internal set; } - public AttributeUsage Usage { get; internal set; } + public AttribUsage Usage { get; internal set; } } public class MyDictionary : WorkingDictionary diff --git a/src/BizHawk.Bizware.DirectX/IGL_SlimDX9.cs b/src/BizHawk.Bizware.DirectX/IGL_SlimDX9.cs index 80f7be5747..65446a5756 100644 --- a/src/BizHawk.Bizware.DirectX/IGL_SlimDX9.cs +++ b/src/BizHawk.Bizware.DirectX/IGL_SlimDX9.cs @@ -367,17 +367,17 @@ namespace BizHawk.Bizware.DirectX byte usageIndex = 0; switch(item.Usage) { - case AttributeUsage.Position: + case AttribUsage.Position: usage = DeclarationUsage.Position; break; - case AttributeUsage.Texcoord0: + case AttribUsage.Texcoord0: usage = DeclarationUsage.TextureCoordinate; break; - case AttributeUsage.Texcoord1: + case AttribUsage.Texcoord1: usage = DeclarationUsage.TextureCoordinate; usageIndex = 1; break; - case AttributeUsage.Color0: + case AttribUsage.Color0: usage = DeclarationUsage.Color; break; default: diff --git a/src/BizHawk.Client.EmuHawk/GraphicsImplementations/IGL_TK.cs b/src/BizHawk.Client.EmuHawk/GraphicsImplementations/IGL_TK.cs index 964bd0ab8f..a57dcdf31a 100644 --- a/src/BizHawk.Client.EmuHawk/GraphicsImplementations/IGL_TK.cs +++ b/src/BizHawk.Client.EmuHawk/GraphicsImplementations/IGL_TK.cs @@ -758,22 +758,22 @@ namespace BizHawk.Client.EmuHawk //comment SNACKPANTS switch (kvp.Value.Usage) { - case AttributeUsage.Position: + case AttribUsage.Position: GL.EnableClientState(ArrayCap.VertexArray); GL.VertexPointer(kvp.Value.Components,VertexPointerType.Float,kvp.Value.Stride,new IntPtr(pData) + kvp.Value.Offset); break; - case AttributeUsage.Texcoord0: + case AttribUsage.Texcoord0: GL.ClientActiveTexture(TextureUnit.Texture0); GL.EnableClientState(ArrayCap.TextureCoordArray); GL.TexCoordPointer(kvp.Value.Components, TexCoordPointerType.Float, kvp.Value.Stride, new IntPtr(pData) + kvp.Value.Offset); break; - case AttributeUsage.Texcoord1: + case AttribUsage.Texcoord1: GL.ClientActiveTexture(TextureUnit.Texture1); GL.EnableClientState(ArrayCap.TextureCoordArray); GL.TexCoordPointer(kvp.Value.Components, TexCoordPointerType.Float, kvp.Value.Stride, new IntPtr(pData) + kvp.Value.Offset); GL.ClientActiveTexture(TextureUnit.Texture0); break; - case AttributeUsage.Color0: + case AttribUsage.Color0: break; } }