Tobias Bohnen avatar Tobias Bohnen committed abc4a8a

* renames:
- CgGL.IsSupported -> CgGL.IsProfileSupported
- CgGL.Disable -> CgGL.DisableProfile
- CgGL.Enable -> CgGL.EnableProfile
- CgGL.GetGLSLVersion -> CgGL.GetGLSLVersionString
- CgD3D9.IsSupported -> CgD3D9.IsProfileSupported

Comments (0)

Files changed (20)

CgNet.OpenTK/CgGL.cs

             {
                 foreach (var profile in Cg.SupportedProfiles)
                 {
-                    if (profile.IsSupported())
+                    if (profile.IsProfileSupported())
                     {
                         yield return profile;
                     }
             return NativeMethods.cgGLDetectGLSLVersion();
         }
 
-        public static void Disable(this ProfileType profile)
+        public static void DisableProfile(this ProfileType profile)
         {
             NativeMethods.cgGLDisableProfile(profile);
         }
 
-        public static void Enable(this ProfileType profile)
+        public static void EnableProfile(this ProfileType profile)
         {
             NativeMethods.cgGLEnableProfile(profile);
         }
 
-        public static string GetGLSLVersion(GlslVersion version)
-        {
-            return NativeMethods.cgGLGetGLSLVersionString(version);
-        }
-
         public static GlslVersion GetGLSLVersion(string version)
         {
             return NativeMethods.cgGLGetGLSLVersion(version);
         }
 
+        public static string GetGLSLVersionString(GlslVersion version)
+        {
+            return NativeMethods.cgGLGetGLSLVersionString(version);
+        }
+
         /// <summary>
         /// Gets the latest profile for a profile class.
         /// </summary>
             return Utils.IntPtrToStringArray(NativeMethods.cgGLGetOptimalOptions(profile));
         }
 
-        public static bool IsSupported(this ProfileType profile)
+        public static bool IsProfileSupported(this ProfileType profile)
         {
             return NativeMethods.cgGLIsProfileSupported(profile);
         }

CgNet.SlimDX/D3D9/CgD3D9.cs

             {
                 foreach (var profile in Cg.SupportedProfiles)
                 {
-                    if (profile.IsSupported())
+                    if (profile.IsProfileSupported())
                     {
                         yield return profile;
                     }
             return Utils.IntPtrToStringArray(NativeMethods.cgD3D9GetOptimalOptions(profile));
         }
 
-        public static bool IsSupported(this ProfileType profile)
+        public static bool IsProfileSupported(this ProfileType profile)
         {
             return NativeMethods.cgD3D9IsProfileSupported(profile);
         }

ExampleBrowser/Examples/OpenTK/Advanced/GsShrinky.cs

 
             // Enable all profiles needed
             for (int i = 0; i < combinedProgram.DomainsCount - 1; i++)
-                combinedProgram.GetDomainProfile(i).Enable();
+                combinedProgram.GetDomainProfile(i).EnableProfile();
 
             DrawStars();
 
             // Disable all profiles needed
             for (int i = combinedProgram.DomainsCount - 1; i >= 0; i--)
-                combinedProgram.GetDomainProfile(i).Disable();
+                combinedProgram.GetDomainProfile(i).DisableProfile();
 
             if (myShrinkFactor > 0.8)
             {

ExampleBrowser/Examples/OpenTK/Advanced/GsSimple.cs

         {
             GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
 
-            vertexProfile.Enable();
-            geometryProfile.Enable();
-            fragmentProfile.Enable();
+            vertexProfile.EnableProfile();
+            geometryProfile.EnableProfile();
+            fragmentProfile.EnableProfile();
 
             if (combinedProgram != null)
             {
 
             DrawStars();
 
-            vertexProfile.Disable();
-            geometryProfile.Disable();
-            fragmentProfile.Disable();
+            vertexProfile.DisableProfile();
+            geometryProfile.DisableProfile();
+            fragmentProfile.DisableProfile();
             SwapBuffers();
         }
 
             geometryProfile = CgGL.GetLatestProfile(ProfileClass.Geometry);
             if (geometryProfile == ProfileType.Unknown)
             {
-                if (ProfileType.GlslG.IsSupported())
+                if (ProfileType.GlslG.IsProfileSupported())
                     geometryProfile = ProfileType.GlslG;
                 else
                 {

ExampleBrowser/Examples/OpenTK/Advanced/IncludeString.cs

             GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
 
             vertexProgram.Bind();
-            vertexProfile.Enable();
+            vertexProfile.EnableProfile();
 
             /* Rendering code verbatim from Chapter 1, Section 2.4.1 "Rendering
                a Triangle with OpenGL" (page 57). */
             GL.Vertex2(0.0f, -0.8f);
             GL.End();
 
-            vertexProfile.Disable();
+            vertexProfile.DisableProfile();
             this.SwapBuffers();
         }
 

ExampleBrowser/Examples/OpenTK/Basic/Bulge.cs

                               0, 1, 0,
                               viewMatrix);
 
-            vertexProfile.Enable();
+            vertexProfile.EnableProfile();
 
-            fragmentProfile.Enable();
+            fragmentProfile.EnableProfile();
 
             vertexProgram.Bind();
 
             vertexProgram.UpdateParameters();
             NativeMethods.glutSolidSphere(0.1, 12, 12);
 
-            vertexProfile.Disable();
+            vertexProfile.DisableProfile();
 
-            fragmentProfile.Disable();
+            fragmentProfile.DisableProfile();
 
             this.SwapBuffers();
         }

ExampleBrowser/Examples/OpenTK/Basic/BumpMapWall.cs

 
             this.vertexParamLightPosition.Set(lightPosition);
 
-            vertexProfile.Enable();
+            vertexProfile.EnableProfile();
 
             fragmentProgram.Bind();
 
             this.fragmentParamNormalMap.EnableTexture();
             this.fragmentParamNormalizeCube.EnableTexture();
 
-            fragmentProfile.Enable();
+            fragmentProfile.EnableProfile();
 
             vertexProgram.UpdateParameters();
             fragmentProgram.UpdateParameters();
             fragmentParamNormalizeCube.DisableTexture();
             fragmentParamNormalMap.DisableTexture();
             
-            vertexProfile.Disable();
-            fragmentProfile.Disable();
+            vertexProfile.DisableProfile();
+            fragmentProfile.DisableProfile();
             
             /*** Render light as white ball using fixed function pipe ***/
             GL.Translate(lightPosition[0], lightPosition[1], lightPosition[2]);

ExampleBrowser/Examples/OpenTK/Basic/FragmentLighting.cs

                               viewMatrix);
 
             vertexProgram.Bind();
-            vertexProfile.Enable();
+            vertexProfile.EnableProfile();
 
             fragmentProgram.Bind();
-            fragmentProfile.Enable();
+            fragmentProfile.EnableProfile();
 
             this.setBrassMaterial();
 
             fragmentProgram.UpdateParameters();
             NativeMethods.glutSolidSphere(0.2, 12, 12);
 
-            vertexProfile.Disable();
-            fragmentProfile.Disable();
+            vertexProfile.DisableProfile();
+            fragmentProfile.DisableProfile();
 
             this.SwapBuffers();
         }

ExampleBrowser/Examples/OpenTK/Basic/ParticleSystem.cs

 
             vertexProgram.Bind();
 
-            vertexProfile.Enable();
+            vertexProfile.EnableProfile();
 
-            fragmentProfile.Enable();
+            fragmentProfile.EnableProfile();
 
             /* Render live particles. */
             GL.Begin(BeginMode.Points);
             }
             GL.End();
 
-            vertexProfile.Disable();
+            vertexProfile.DisableProfile();
 
-            fragmentProfile.Disable();
+            fragmentProfile.DisableProfile();
 
             SwapBuffers();
         }

ExampleBrowser/Examples/OpenTK/Basic/ProjectiveTexturing.cs

                   lightViewMatrix);
 
             vertexProgram.Bind();
-            vertexProfile.Enable();
+            vertexProfile.EnableProfile();
 
             fragmentProgram.Bind();
-            fragmentProfile.Enable();
+            fragmentProfile.EnableProfile();
 
             /* modelView = rotateMatrix * translateMatrix */
             MakeRotateMatrix(70, 1, 1, 1, rotateMatrix);
 
             GL.Disable(EnableCap.CullFace);
 
-            vertexProfile.Disable();
+            vertexProfile.DisableProfile();
 
-            fragmentProfile.Disable();
+            fragmentProfile.DisableProfile();
 
             /*** Render light as white cone ***/
 

ExampleBrowser/Examples/OpenTK/Basic/SpecularBumpMap.cs

             myCgVertexParam_lightPosition.Set3(lightPosition);
             myCgVertexParam_eyePosition.Set3(eyePosition);
 
-            vertexProfile.Enable();
+            vertexProfile.EnableProfile();
             fragmentProgram.Bind();
             myCgFragmentParam_normalMap.EnableTexture();
             myCgFragmentParam_normalizeCube.EnableTexture();
 
-            fragmentProfile.Enable();
+            fragmentProfile.EnableProfile();
 
             vertexProgram.UpdateParameters();
             fragmentProgram.UpdateParameters();
             GL.TexCoord2(0f,1f); GL.Vertex2(-7f, 7f);
             GL.End();
 
-            vertexProfile.Disable();
-            fragmentProfile.Disable();
+            vertexProfile.DisableProfile();
+            fragmentProfile.DisableProfile();
             
             /*** Render light as white ball using fixed function pipe ***/
             GL.Translate(lightPosition[0], lightPosition[1], lightPosition[2]);

ExampleBrowser/Examples/OpenTK/Basic/TextureSampling.cs

             GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
 
             vertexProgram.Bind();
-            vertexProfile.Enable();
+            vertexProfile.EnableProfile();
 
             fragmentProgram.Bind();
-            fragmentProfile.Enable();
+            fragmentProfile.EnableProfile();
 
             this.fragmentParamDecal.EnableTexture();
 
             GL.Vertex2(0.0f, -0.8f);
             GL.End();
 
-            vertexProfile.Disable();
+            vertexProfile.DisableProfile();
 
-            fragmentProfile.Disable();
+            fragmentProfile.DisableProfile();
 
             this.fragmentParamDecal.DisableTexture();
 

ExampleBrowser/Examples/OpenTK/Basic/TwoTextureAccesses.cs

 
             vertexProgram.Bind();
 
-            vertexProfile.Enable();
+            vertexProfile.EnableProfile();
 
             fragmentProgram.Bind();
 
-            fragmentProfile.Enable();
+            fragmentProfile.EnableProfile();
 
             this.fragmentParamDecal.EnableTexture();
 
             GL.Vertex2(0.0f, -0.8f);
             GL.End();
 
-            vertexProfile.Enable();
+            vertexProfile.EnableProfile();
 
-            fragmentProfile.Disable();
+            fragmentProfile.DisableProfile();
 
             this.fragmentParamDecal.DisableTexture();
 

ExampleBrowser/Examples/OpenTK/Basic/UniformParameter.cs

             GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
 
             vertexProgram.Bind();
-            vertexProfile.Enable();
+            vertexProfile.EnableProfile();
 
             fragmentProgram.Bind();
-            fragmentProfile.Enable();
+            fragmentProfile.EnableProfile();
 
             DrawStars();
 
-            vertexProfile.Disable();
-            fragmentProfile.Disable();
+            vertexProfile.DisableProfile();
+            fragmentProfile.DisableProfile();
             SwapBuffers();
         }
 

ExampleBrowser/Examples/OpenTK/Basic/VaryingParameter.cs

             GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
 
             vertexProgram.Bind();
-            vertexProfile.Enable();
+            vertexProfile.EnableProfile();
 
             fragmentProgram.Bind();
-            fragmentProfile.Enable();
+            fragmentProfile.EnableProfile();
 
             GL.Begin(BeginMode.Triangles);
             GL.Color3(1f, 0f, 0f); /* Red */
             GL.Vertex2(0.0f, -0.8f);
             GL.End();
 
-            vertexProfile.Disable();
-            fragmentProfile.Disable();
+            vertexProfile.DisableProfile();
+            fragmentProfile.DisableProfile();
             this.SwapBuffers();
         }
 

ExampleBrowser/Examples/OpenTK/Basic/VertexAndFragmentProgram.cs

             GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
 
             vertexProgram.Bind();
-            vertexProfile.Enable();
+            vertexProfile.EnableProfile();
 
             fragmentProgram.Bind();
-            fragmentProfile.Enable();
+            fragmentProfile.EnableProfile();
 
             DrawStars();
 
-            vertexProfile.Disable();
-            fragmentProfile.Disable();
+            vertexProfile.DisableProfile();
+            fragmentProfile.DisableProfile();
             SwapBuffers();
         }
 

ExampleBrowser/Examples/OpenTK/Basic/VertexLighting.cs

                               viewMatrix);
 
             vertexProgram.Bind();
-            vertexProfile.Enable();
+            vertexProfile.EnableProfile();
 
             fragmentProgram.Bind();
-            fragmentProfile.Enable();
+            fragmentProfile.EnableProfile();
 
             setBrassMaterial();
 
             vertexProgram.UpdateParameters();
             NativeMethods.glutSolidSphere(0.2, 12, 12);
 
-            vertexProfile.Disable();
-            fragmentProfile.Disable();
+            vertexProfile.DisableProfile();
+            fragmentProfile.DisableProfile();
 
             this.SwapBuffers();
         }

ExampleBrowser/Examples/OpenTK/Basic/VertexProgram.cs

             GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
 
             vertexProgram.Bind();
-            vertexProfile.Enable();
+            vertexProfile.EnableProfile();
 
             /* Rendering code verbatim from Chapter 1, Section 2.4.1 "Rendering
                a Triangle with OpenGL" (page 57). */
             GL.Vertex2(0.0f, -0.8f);
             GL.End();
 
-            vertexProfile.Disable();
+            vertexProfile.DisableProfile();
             this.SwapBuffers();
         }
 

ExampleBrowser/Examples/OpenTK/Basic/VertexTransform.cs

             GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
 
             vertexProgram.Bind();
-            vertexProfile.Enable();
+            vertexProfile.EnableProfile();
 
             fragmentProgram.Bind();
-            fragmentProfile.Enable();
+            fragmentProfile.EnableProfile();
 
             /* modelView = rotateMatrix * translateMatrix */
             float[] rotateMatrix = new float[16];
             fragmentProgram.UpdateParameters();
             NativeMethods.glutWireCone(1.5, 3.5, 20, 20);
 
-            vertexProfile.Disable();
-            fragmentProfile.Disable();
+            vertexProfile.DisableProfile();
+            fragmentProfile.DisableProfile();
 
             this.SwapBuffers();
         }

ExampleBrowser/Examples/OpenTK/Basic/VertexTwisting.cs

             vertexParam_twisting.Set(myTwisting);
 
             vertexProgram.Bind();
-            vertexProfile.Enable();
+            vertexProfile.EnableProfile();
 
             fragmentProgram.Bind();
-            fragmentProfile.Enable();
+            fragmentProfile.EnableProfile();
 
             DrawSubDividedTriangle(5);
 
-            vertexProfile.Disable();
-            fragmentProfile.Disable();
+            vertexProfile.DisableProfile();
+            fragmentProfile.DisableProfile();
 
             this.SwapBuffers();
         }
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.