From 8bafa218e640d69ba2c9a7a91423c13888bf5bc8 Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Fri, 29 May 2009 16:52:48 +0000 Subject: [PATCH] Updated tokens for DrawBuffer() method. Fixes issue [#851]: "[OpenGL] DrawBuffer and DrawBuffers tokens" (http://www.opentk.com/node/851). --- Source/Bind/Specifications/GL2/enumext.spec | 22 ++++++++++++++++++++- Source/OpenTK/Graphics/GL/GLEnums.cs | 16 +++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/Source/Bind/Specifications/GL2/enumext.spec b/Source/Bind/Specifications/GL2/enumext.spec index 2f8473fb..866ddfb0 100644 --- a/Source/Bind/Specifications/GL2/enumext.spec +++ b/Source/Bind/Specifications/GL2/enumext.spec @@ -6777,6 +6777,26 @@ DrawBuffersEnum enum: use ARB_framebuffer_object COLOR_ATTACHMENT14 use ARB_framebuffer_object COLOR_ATTACHMENT15 +# These tokens are only valid when the current FramebufferBinding is non-zero +# See page 182 of the 3.1 specs. +DrawBufferMode enum: + use ARB_framebuffer_object COLOR_ATTACHMENT0 + use ARB_framebuffer_object COLOR_ATTACHMENT1 + use ARB_framebuffer_object COLOR_ATTACHMENT2 + use ARB_framebuffer_object COLOR_ATTACHMENT3 + use ARB_framebuffer_object COLOR_ATTACHMENT4 + use ARB_framebuffer_object COLOR_ATTACHMENT5 + use ARB_framebuffer_object COLOR_ATTACHMENT6 + use ARB_framebuffer_object COLOR_ATTACHMENT7 + use ARB_framebuffer_object COLOR_ATTACHMENT8 + use ARB_framebuffer_object COLOR_ATTACHMENT9 + use ARB_framebuffer_object COLOR_ATTACHMENT10 + use ARB_framebuffer_object COLOR_ATTACHMENT11 + use ARB_framebuffer_object COLOR_ATTACHMENT12 + use ARB_framebuffer_object COLOR_ATTACHMENT13 + use ARB_framebuffer_object COLOR_ATTACHMENT14 + use ARB_framebuffer_object COLOR_ATTACHMENT15 + FramebufferAttachmentObjectType enum: NONE = 0 use ARB_framebuffer_object FRAMEBUFFER_DEFAULT @@ -6917,7 +6937,7 @@ GetTextureParameter enum: use ARB_framebuffer_object TEXTURE_LUMINANCE_TYPE use ARB_framebuffer_object TEXTURE_INTENSITY_TYPE use ARB_framebuffer_object TEXTURE_DEPTH_TYPE - + # Promoted from ARB_depth_buffer_float PixelType enum: use ARB_depth_buffer_float FLOAT_32_UNSIGNED_INT_24_8_REV diff --git a/Source/OpenTK/Graphics/GL/GLEnums.cs b/Source/OpenTK/Graphics/GL/GLEnums.cs index 93e71416..1b296c30 100644 --- a/Source/OpenTK/Graphics/GL/GLEnums.cs +++ b/Source/OpenTK/Graphics/GL/GLEnums.cs @@ -5213,6 +5213,22 @@ namespace OpenTK.Graphics Aux1 = ((int)0X040a), Aux2 = ((int)0X040b), Aux3 = ((int)0X040c), + ColorAttachment0 = ((int)0X8ce0), + ColorAttachment1 = ((int)0X8ce1), + ColorAttachment2 = ((int)0X8ce2), + ColorAttachment3 = ((int)0X8ce3), + ColorAttachment4 = ((int)0X8ce4), + ColorAttachment5 = ((int)0X8ce5), + ColorAttachment6 = ((int)0X8ce6), + ColorAttachment7 = ((int)0X8ce7), + ColorAttachment8 = ((int)0X8ce8), + ColorAttachment9 = ((int)0X8ce9), + ColorAttachment10 = ((int)0X8cea), + ColorAttachment11 = ((int)0X8ceb), + ColorAttachment12 = ((int)0X8cec), + ColorAttachment13 = ((int)0X8ced), + ColorAttachment14 = ((int)0X8cee), + ColorAttachment15 = ((int)0X8cef), } public enum DrawBuffersEnum