Fixed compilation warnings on Mono 3.4.0
authorthefiddler <stapostol@gmail.com>
Mon, 21 Jul 2014 15:52:17 +0000 (17:52 +0200)
committerthefiddler <stapostol@gmail.com>
Mon, 21 Jul 2014 15:52:17 +0000 (17:52 +0200)
Source/Examples/OpenAL/1.1/Playback.cs
Source/Examples/OpenAL/Test/OpenALDiagnostics.cs
Source/Examples/OpenGL/1.x/FramebufferObject.cs
Source/Examples/OpenGL/1.x/TextureMatrix.cs
Source/Examples/OpenGL/2.x/GeometryShaderAdvanced.cs
Source/Examples/OpenTK/Test/MatrixTest.cs
Source/Examples/Shapes/Helpers/MengerCube.cs

index dbf995a..ea9a191 100644 (file)
@@ -10,6 +10,8 @@ using System.IO;
 using OpenTK.Audio;
 using OpenTK.Audio.OpenAL;
 
+#pragma warning disable 219 // variable assigned but never used, we do that on purpose
+
 namespace Examples
 {
     [Example("Playback", ExampleCategory.OpenAL, "1.1", Documentation="Playback")]
index eea0914..bf2d061 100644 (file)
@@ -453,7 +453,7 @@ namespace Examples
 
                 foreach (XRamExtension.XRamStorage m in storagemodes)
                 {
-                    bool result = XRam.SetBufferMode(1, ref buffer, m);
+                    XRam.SetBufferMode(1, ref buffer, m);
                     BufferModes.Add(m.ToString(), m == XRam.GetBufferMode(ref buffer));
                 }
 
index a99fb19..743fd79 100644 (file)
@@ -21,8 +21,6 @@ namespace Examples.Tutorial
         {
         }
 
-        Font sans = new Font(System.Drawing.FontFamily.GenericSansSerif, 16.0f);
-
         uint ColorTexture;
         uint DepthTexture;
         uint FBOHandle;
index 00d8fa1..6b5c6d1 100644 (file)
@@ -115,6 +115,7 @@ namespace Examples.Tutorial
             GL.Rotate(orientation.X, Vector3.UnitY);
             GL.Rotate(orientation.Y, Vector3.UnitX);
 
+            GL.BindTexture(TextureTarget.Texture2D, Texture);
             GL.CallList(list);
 
             SwapBuffers();
index 88a8d52..69d1f17 100644 (file)
@@ -83,7 +83,6 @@ namespace Examples.Tutorial
         int vboSphere;
         int vboSphereStride = BlittableValueType<VertexPositionNormalTexture>.Stride;
         int eboSphere;
-        int sphereElementCount;
 
         ViewMode mode = ViewMode.Scene;
         Vector3 eyePos = new Vector3(0, -8, 0);
@@ -551,7 +550,6 @@ namespace Examples.Tutorial
         {
             VertexPositionNormalTexture[] sphereVertices = CalculateSphereVertices(1, 1, 16, 16);
             ushort[] sphereElements = CalculateSphereElements(1, 1, 16, 16);
-            sphereElementCount = sphereElements.Length;
 
             GL.GenBuffers(1, out vboSphere);
             GL.BindBuffer(BufferTarget.ArrayBuffer, vboSphere);
index 690ae2d..e19646b 100644 (file)
@@ -19,8 +19,6 @@ namespace Examples.Tests
             float y = 1.0f;
             float z = 1.0f;
 
-            Matrix4 createdTranslation = Matrix4.CreateTranslation(new Vector3(2, 3, -1));
-
             Matrix4 translation = new Matrix4(new Vector4(1, 0, 0, 2), new Vector4(0, 1, 0, 3), new Vector4(0, 0, 1, -1), new Vector4(0, 0, 0, 1));
             Vector4 point = new Vector4(x, y, z, 1);
 
index d7360ad..763ddc4 100644 (file)
@@ -119,8 +119,6 @@ namespace Examples.Shapes
                 double _Six = 0.66666666666666; // 2/3
                 double _One = 1.0; // 3/3 
 
-                double ThirdLength = SideLength / 3f;
-
                 Vector3d C0 = Center + new Vector3d( -SideLength, -SideLength, +SideLength );
                 Vector3d C1 = Center + new Vector3d( +SideLength, -SideLength, +SideLength );
                 Vector3d C2 = Center + new Vector3d( +SideLength, +SideLength, +SideLength );