From 5304af3d285e1dd09596bf383e0a6fedbeff2585 Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Wed, 4 Apr 2012 11:10:28 +0000 Subject: [PATCH] Use singular form for single-object overloads, because plural looks weird when generating a single name. --- Source/OpenTK/Graphics/OpenGL/GLHelper.cs | 125 +++++++++------------- 1 file changed, 48 insertions(+), 77 deletions(-) diff --git a/Source/OpenTK/Graphics/OpenGL/GLHelper.cs b/Source/OpenTK/Graphics/OpenGL/GLHelper.cs index 8be21ce6..6e071871 100644 --- a/Source/OpenTK/Graphics/OpenGL/GLHelper.cs +++ b/Source/OpenTK/Graphics/OpenGL/GLHelper.cs @@ -747,13 +747,13 @@ namespace OpenTK.Graphics.OpenGL #endregion - #region GenBuffers + #region GenBuffer /// [requires: v1.5] /// Generates a single buffer object name /// /// The generated buffer object name - public static int GenBuffers() + public static int GenBuffer() { int id; GenBuffers(1, out id); @@ -762,13 +762,13 @@ namespace OpenTK.Graphics.OpenGL #endregion - #region DeleteBuffers + #region DeleteBuffer /// [requires: v1.5] /// Deletes a single buffer object /// /// The buffer object to be deleted - public static void DeleteBuffers(int id) + public static void DeleteBuffer(int id) { DeleteBuffers(1, ref id); } @@ -778,20 +778,20 @@ namespace OpenTK.Graphics.OpenGL /// /// The buffer object to be deleted [CLSCompliant(false)] - public static void DeleteBuffers(uint id) + public static void DeleteBuffer(uint id) { DeleteBuffers(1, ref id); } #endregion - #region GenFramebuffers + #region GenFramebuffer /// [requires: v3.0 and ARB_framebuffer_object] /// Generates a single framebuffer object name /// /// The generated framebuffer object name - public static int GenFramebuffers() + public static int GenFramebuffer() { int id; GenFramebuffers(1, out id); @@ -800,13 +800,13 @@ namespace OpenTK.Graphics.OpenGL #endregion - #region DeleteFramebuffers + #region DeleteFramebuffer /// [requires: v3.0 and ARB_framebuffer_object] /// Deletes a single framebuffer object /// /// The framebuffer object to be deleted - public static void DeleteFramebuffers(int id) + public static void DeleteFramebuffer(int id) { DeleteFramebuffers(1, ref id); } @@ -816,20 +816,20 @@ namespace OpenTK.Graphics.OpenGL /// /// The framebuffer object to be deleted [CLSCompliant(false)] - public static void DeleteFramebuffers(uint id) + public static void DeleteFramebuffer(uint id) { DeleteFramebuffers(1, ref id); } #endregion - #region GenProgramPipelines + #region GenProgramPipeline /// [requires: v4.1 and ARB_separate_shader_objects] /// Generates a single single pipeline object name /// /// The generated single pipeline object name - public static int GenProgramPipelines() + public static int GenProgramPipeline() { int id; GenProgramPipelines(1, out id); @@ -838,13 +838,13 @@ namespace OpenTK.Graphics.OpenGL #endregion - #region DeleteProgramPipelines + #region DeleteProgramPipeline /// [requires: v4.1 and ARB_separate_shader_objects] /// Deletes a single program pipeline object /// /// The program pipeline object to be deleted - public static void DeleteProgramPipelines(int id) + public static void DeleteProgramPipeline(int id) { DeleteProgramPipelines(1, ref id); } @@ -854,20 +854,20 @@ namespace OpenTK.Graphics.OpenGL /// /// The program pipeline object to be deleted [CLSCompliant(false)] - public static void DeleteProgramPipelines(uint id) + public static void DeleteProgramPipeline(uint id) { DeleteProgramPipelines(1, ref id); } #endregion - #region GenQueries + #region GenQuery /// [requires: v1.5] /// Generates a single query object name /// /// The generated query object name - public static int GenQueries() + public static int GenQuery() { int id; GenQueries(1, out id); @@ -876,13 +876,13 @@ namespace OpenTK.Graphics.OpenGL #endregion - #region DeleteQueries + #region DeleteQuery /// [requires: v1.5] /// Deletes a single query object /// /// The query object to be deleted - public static void DeleteQueries(int id) + public static void DeleteQuery(int id) { DeleteQueries(1, ref id); } @@ -892,20 +892,20 @@ namespace OpenTK.Graphics.OpenGL /// /// The query object to be deleted [CLSCompliant(false)] - public static void DeleteQueries(uint id) + public static void DeleteQuery(uint id) { DeleteQueries(1, ref id); } #endregion - #region GenRenderbuffers + #region GenRenderbuffer /// [requires: v3.0 and ARB_framebuffer_object] /// Generates a single renderbuffer object name /// /// The generated renderbuffer object name - public static int GenRenderbuffers() + public static int GenRenderbuffer() { int id; GenRenderbuffers(1, out id); @@ -914,13 +914,13 @@ namespace OpenTK.Graphics.OpenGL #endregion - #region DeleteRenderbuffers + #region DeleteRenderbuffer /// [requires: v3.0 and ARB_framebuffer_object] /// Deletes a single renderbuffer object /// /// The renderbuffer object to be deleted - public static void DeleteRenderbuffers(int id) + public static void DeleteRenderbuffer(int id) { DeleteRenderbuffers(1, ref id); } @@ -930,20 +930,20 @@ namespace OpenTK.Graphics.OpenGL /// /// The renderbuffer object to be deleted [CLSCompliant(false)] - public static void DeleteRenderbuffers(uint id) + public static void DeleteRenderbuffer(uint id) { DeleteRenderbuffers(1, ref id); } #endregion - #region GenSamplers + #region GenSampler /// /// Generates a single sampler object name /// /// The generated sampler object name - public static int GenSamplers() + public static int GenSampler() { int id; GenSamplers(1, out id); @@ -952,13 +952,13 @@ namespace OpenTK.Graphics.OpenGL #endregion - #region DeleteSamplers + #region DeleteSampler /// /// Deletes a single sampler object /// /// The sampler object to be deleted - public static void DeleteSamplers(int id) + public static void DeleteSampler(int id) { DeleteSamplers(1, ref id); } @@ -968,16 +968,19 @@ namespace OpenTK.Graphics.OpenGL /// /// The sampler object to be deleted [CLSCompliant(false)] - public static void DeleteSamplers(uint id) + public static void DeleteSampler(uint id) { DeleteSamplers(1, ref id); } #endregion - #region public static int GenTexture() + #region GenTexture - [Obsolete("Use GenTextures instead.")] + /// [requires: v1.1] + /// Generate a single texture name + /// + /// The generated texture name public static int GenTexture() { int id; @@ -989,13 +992,19 @@ namespace OpenTK.Graphics.OpenGL #region DeleteTexture - [Obsolete("Use DeleteTextures instead.")] + /// [requires: v1.1] + /// Delete a single texture name + /// + /// The texture to be deleted public static void DeleteTexture(int id) { DeleteTextures(1, ref id); } - [Obsolete("Use DeleteTextures instead.")] + /// [requires: v1.1] + /// Delete a single texture name + /// + /// The texture to be deleted [CLSCompliant(false)] public static void DeleteTexture(uint id) { @@ -1004,44 +1013,6 @@ namespace OpenTK.Graphics.OpenGL #endregion - #region GenTextures - - /// [requires: v1.1] - /// Generate a single texture name - /// - /// The generated texture name - public static int GenTextures() - { - int id; - GenTextures(1, out id); - return id; - } - - #endregion - - #region DeleteTextures - - /// [requires: v1.1] - /// Delete a single texture name - /// - /// The texture to be deleted - public static void DeleteTextures(int id) - { - DeleteTextures(1, ref id); - } - - /// [requires: v1.1] - /// Delete a single texture name - /// - /// The texture to be deleted - [CLSCompliant(false)] - public static void DeleteTextures(uint id) - { - DeleteTextures(1, ref id); - } - - #endregion - #region GenTransformFeedback /// [requires: v1.2 and ARB_transform_feedback2] @@ -1080,13 +1051,13 @@ namespace OpenTK.Graphics.OpenGL #endregion - #region GenVertexArrays + #region GenVertexArray /// [requires: v3.0 and ARB_vertex_array_object] /// Generates a single vertex array object name /// /// The generated vertex array object name - public static int GenVertexArrays() + public static int GenVertexArray() { int id; GenVertexArrays(1, out id); @@ -1095,13 +1066,13 @@ namespace OpenTK.Graphics.OpenGL #endregion - #region DeleteVertexArrays + #region DeleteVertexArray /// [requires: v3.0 and ARB_vertex_array_object] /// Deletes a single vertex array object /// /// The vertex array object to be deleted - public static void DeleteVertexArrays(int id) + public static void DeleteVertexArray(int id) { DeleteVertexArrays(1, ref id); } @@ -1111,7 +1082,7 @@ namespace OpenTK.Graphics.OpenGL /// /// The vertex array object to be deleted [CLSCompliant(false)] - public static void DeleteVertexArrays(uint id) + public static void DeleteVertexArray(uint id) { DeleteVertexArrays(1, ref id); }