Removed unused variables and relevant warnings.

This commit is contained in:
the_fiddler 2008-09-19 20:57:35 +00:00
parent fb86950099
commit 573622bf0b
8 changed files with 31 additions and 20 deletions

View file

@ -25,7 +25,7 @@ namespace Examples.OpenAL
const int buffer_size = (int)(0.5*44100); const int buffer_size = (int)(0.5*44100);
const int buffer_count = 4; const int buffer_count = 4;
static object openal_lock = new object(); // Should be global in your app. //static object openal_lock = new object(); // Should be global in your app.
public static void Main() public static void Main()
{ {

View file

@ -17,6 +17,7 @@ namespace Examples.Tests
{ {
public static void Main() public static void Main()
{ {
/*
Stopwatch watch = new Stopwatch(); Stopwatch watch = new Stopwatch();
Vector3 a = new Vector3(0.0f, 0.0f, 0.0f); Vector3 a = new Vector3(0.0f, 0.0f, 0.0f);
@ -31,7 +32,7 @@ namespace Examples.Tests
Vector3.Add(ref a, ref b, out res); Vector3.Add(ref a, ref b, out res);
res = a + b; res = a + b;
res = Vector3.Zero; res = Vector3.Zero;
/*
watch.Reset(); watch.Reset();
watch.Start(); watch.Start();
for (int i = 100000000; --i != 0; ) for (int i = 100000000; --i != 0; )
@ -82,12 +83,12 @@ namespace Examples.Tests
*/ */
} }
static Vector3 pos = new Vector3(); //static Vector3 pos = new Vector3();
static Vector3 Pos //static Vector3 Pos
{ //{
get { return pos; } // get { return pos; }
set { pos = value; } // set { pos = value; }
} //}
} }
} }

View file

@ -175,10 +175,11 @@ namespace Examples.Tutorial
} }
// Move to the right, and print using the second font. // Move to the right, and print using the second font.
float width, height; //float width, height;
fonts[handles.Length / 2 - 1].MeasureString(text, out width, out height); //fonts[handles.Length / 2 - 1].MeasureString(text, out width, out height);
RectangleF rect = fonts[handles.Length / 2 - 1].MeasureText(text);
GL.LoadIdentity(); GL.LoadIdentity();
GL.Translate(width + 32.0f, 0, 0); GL.Translate(rect.Width + 32.0f, 0, 0);
for (int i = handles.Length / 2; i < handles.Length; i++) for (int i = handles.Length / 2; i < handles.Length; i++)
{ {
printer.Draw(handles[i]); printer.Draw(handles[i]);

View file

@ -30,8 +30,8 @@ namespace Examples.Tutorial
float angle = 0.0f; float angle = 0.0f;
Shapes.Shape shape = new Examples.Shapes.Plane(16, 16, 2.0f, 2.0f); Shapes.Shape shape = new Examples.Shapes.Plane(16, 16, 2.0f, 2.0f);
TextureFont sans = new TextureFont(new Font(FontFamily.GenericSansSerif, 32, FontStyle.Regular, //TextureFont sans = new TextureFont(new Font(FontFamily.GenericSansSerif, 32, FontStyle.Regular,
GraphicsUnit.Pixel)); // GraphicsUnit.Pixel));
#region Constructor #region Constructor

View file

@ -27,7 +27,7 @@ namespace Examples.Tutorial
#region --- Private Fields --- #region --- Private Fields ---
Shapes.Shape cube = new Examples.Shapes.Cube(); Shapes.Shape cube = new Examples.Shapes.Cube();
Shapes.Shape plane = new Examples.Shapes.Plane(16, 16, 2.0f, 2.0f); //Shapes.Shape plane = new Examples.Shapes.Plane(16, 16, 2.0f, 2.0f);
struct Vbo struct Vbo
{ {

View file

@ -15,6 +15,11 @@ namespace Examples.WinForms
{ {
Color clearColor; Color clearColor;
public DerivedGLControl()
{
this.InitializeComponent();
}
public Color ClearColor public Color ClearColor
{ {
get { return clearColor; } get { return clearColor; }

View file

@ -27,7 +27,7 @@ namespace Examples.WinForms
GLControl glControl = new GLControl(GraphicsMode.Default); GLControl glControl = new GLControl(GraphicsMode.Default);
Type glClass; Type glClass;
Type delegatesClass; Type delegatesClass;
Type importsClass; //Type importsClass;
int supported, all; // Number of supported extensions. int supported, all; // Number of supported extensions.
string driver; string driver;
@ -37,7 +37,7 @@ namespace Examples.WinForms
glClass = typeof(GL); glClass = typeof(GL);
delegatesClass = glClass.GetNestedType("Delegates", BindingFlags.Static | BindingFlags.NonPublic); delegatesClass = glClass.GetNestedType("Delegates", BindingFlags.Static | BindingFlags.NonPublic);
importsClass = glClass.GetNestedType("Imports", BindingFlags.Static | BindingFlags.NonPublic); //importsClass = glClass.GetNestedType("Imports", BindingFlags.Static | BindingFlags.NonPublic);
glControl.CreateControl(); glControl.CreateControl();
Application.Idle += StartAsync; Application.Idle += StartAsync;

View file

@ -1434,6 +1434,8 @@ namespace OpenTK.Platform.Windows
#region PixelFormatDescriptor #region PixelFormatDescriptor
#pragma warning disable 0169
/// <summary> /// <summary>
/// Describes a pixel format. It is used when interfacing with the WINAPI to create a new Context. /// Describes a pixel format. It is used when interfacing with the WINAPI to create a new Context.
/// Found in WinGDI.h /// Found in WinGDI.h
@ -1469,6 +1471,8 @@ namespace OpenTK.Platform.Windows
internal int DamageMask; internal int DamageMask;
} }
#pragma warning restore 0169
#endregion #endregion
#region internal class LayerPlaneDescriptor #region internal class LayerPlaneDescriptor