From a333532d694a1ae22eaf757a2865a1f9292ef9f1 Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Tue, 3 Nov 2009 10:22:50 +0000 Subject: [PATCH] Added type-safe parameters to FramebufferTexture (fixes issue [#1303]: "[GL] fix FramebufferTexture parameters"). --- Source/Bind/Specifications/GL2/gloverrides.xml | 7 ++++++- Source/OpenTK/Graphics/OpenGL/GL.cs | 8 ++++---- Source/OpenTK/Graphics/OpenGL/GLCore.cs | 2 +- Source/OpenTK/Graphics/OpenGL/GLDelegates.cs | 2 +- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/Source/Bind/Specifications/GL2/gloverrides.xml b/Source/Bind/Specifications/GL2/gloverrides.xml index decc78d1..e9321d3d 100644 --- a/Source/Bind/Specifications/GL2/gloverrides.xml +++ b/Source/Bind/Specifications/GL2/gloverrides.xml @@ -304,7 +304,12 @@ BeginMode - + + + FramebufferTarget + FramebufferAttachment + + diff --git a/Source/OpenTK/Graphics/OpenGL/GL.cs b/Source/OpenTK/Graphics/OpenGL/GL.cs index 7f4143cf..7e2b18d5 100644 --- a/Source/OpenTK/Graphics/OpenGL/GL.cs +++ b/Source/OpenTK/Graphics/OpenGL/GL.cs @@ -40134,13 +40134,13 @@ namespace OpenTK.Graphics.OpenGL [AutoGenerated(Category = "Version32", Version = "1.2", EntryPoint = "glFramebufferTexture")] public static - void FramebufferTexture(OpenTK.Graphics.OpenGL.Version32 target, OpenTK.Graphics.OpenGL.Version32 attachment, Int32 texture, Int32 level) + void FramebufferTexture(OpenTK.Graphics.OpenGL.FramebufferTarget target, OpenTK.Graphics.OpenGL.FramebufferAttachment attachment, Int32 texture, Int32 level) { #if DEBUG using (new ErrorHelper(GraphicsContext.CurrentContext)) { #endif - Delegates.glFramebufferTexture((OpenTK.Graphics.OpenGL.Version32)target, (OpenTK.Graphics.OpenGL.Version32)attachment, (UInt32)texture, (Int32)level); + Delegates.glFramebufferTexture((OpenTK.Graphics.OpenGL.FramebufferTarget)target, (OpenTK.Graphics.OpenGL.FramebufferAttachment)attachment, (UInt32)texture, (Int32)level); #if DEBUG } #endif @@ -40149,13 +40149,13 @@ namespace OpenTK.Graphics.OpenGL [System.CLSCompliant(false)] [AutoGenerated(Category = "Version32", Version = "1.2", EntryPoint = "glFramebufferTexture")] public static - void FramebufferTexture(OpenTK.Graphics.OpenGL.Version32 target, OpenTK.Graphics.OpenGL.Version32 attachment, UInt32 texture, Int32 level) + void FramebufferTexture(OpenTK.Graphics.OpenGL.FramebufferTarget target, OpenTK.Graphics.OpenGL.FramebufferAttachment attachment, UInt32 texture, Int32 level) { #if DEBUG using (new ErrorHelper(GraphicsContext.CurrentContext)) { #endif - Delegates.glFramebufferTexture((OpenTK.Graphics.OpenGL.Version32)target, (OpenTK.Graphics.OpenGL.Version32)attachment, (UInt32)texture, (Int32)level); + Delegates.glFramebufferTexture((OpenTK.Graphics.OpenGL.FramebufferTarget)target, (OpenTK.Graphics.OpenGL.FramebufferAttachment)attachment, (UInt32)texture, (Int32)level); #if DEBUG } #endif diff --git a/Source/OpenTK/Graphics/OpenGL/GLCore.cs b/Source/OpenTK/Graphics/OpenGL/GLCore.cs index 0edf6d1a..98bd9f26 100644 --- a/Source/OpenTK/Graphics/OpenGL/GLCore.cs +++ b/Source/OpenTK/Graphics/OpenGL/GLCore.cs @@ -1370,7 +1370,7 @@ namespace OpenTK.Graphics.OpenGL internal extern static void FramebufferRenderbufferEXT(OpenTK.Graphics.OpenGL.FramebufferTarget target, OpenTK.Graphics.OpenGL.FramebufferAttachment attachment, OpenTK.Graphics.OpenGL.RenderbufferTarget renderbuffertarget, UInt32 renderbuffer); [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glFramebufferTexture", ExactSpelling = true)] - internal extern static void FramebufferTexture(OpenTK.Graphics.OpenGL.Version32 target, OpenTK.Graphics.OpenGL.Version32 attachment, UInt32 texture, Int32 level); + internal extern static void FramebufferTexture(OpenTK.Graphics.OpenGL.FramebufferTarget target, OpenTK.Graphics.OpenGL.FramebufferAttachment attachment, UInt32 texture, Int32 level); [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(GL.Library, EntryPoint = "glFramebufferTexture1D", ExactSpelling = true)] internal extern static void FramebufferTexture1D(OpenTK.Graphics.OpenGL.FramebufferTarget target, OpenTK.Graphics.OpenGL.FramebufferAttachment attachment, OpenTK.Graphics.OpenGL.TextureTarget textarget, UInt32 texture, Int32 level); diff --git a/Source/OpenTK/Graphics/OpenGL/GLDelegates.cs b/Source/OpenTK/Graphics/OpenGL/GLDelegates.cs index 253e966c..e41d10b9 100644 --- a/Source/OpenTK/Graphics/OpenGL/GLDelegates.cs +++ b/Source/OpenTK/Graphics/OpenGL/GLDelegates.cs @@ -1368,7 +1368,7 @@ namespace OpenTK.Graphics.OpenGL internal delegate void FramebufferRenderbufferEXT(OpenTK.Graphics.OpenGL.FramebufferTarget target, OpenTK.Graphics.OpenGL.FramebufferAttachment attachment, OpenTK.Graphics.OpenGL.RenderbufferTarget renderbuffertarget, UInt32 renderbuffer); internal static FramebufferRenderbufferEXT glFramebufferRenderbufferEXT; [System.Security.SuppressUnmanagedCodeSecurity()] - internal delegate void FramebufferTexture(OpenTK.Graphics.OpenGL.Version32 target, OpenTK.Graphics.OpenGL.Version32 attachment, UInt32 texture, Int32 level); + internal delegate void FramebufferTexture(OpenTK.Graphics.OpenGL.FramebufferTarget target, OpenTK.Graphics.OpenGL.FramebufferAttachment attachment, UInt32 texture, Int32 level); internal static FramebufferTexture glFramebufferTexture; [System.Security.SuppressUnmanagedCodeSecurity()] internal delegate void FramebufferTexture1D(OpenTK.Graphics.OpenGL.FramebufferTarget target, OpenTK.Graphics.OpenGL.FramebufferAttachment attachment, OpenTK.Graphics.OpenGL.TextureTarget textarget, UInt32 texture, Int32 level);