* OpenGL/1.1/DisplayLists.cs: Avoid Glu in favor of OpenTK.Matrix4.
* OpenAL/Test/TestAudioContext.cs: Remove deprecated Alut calls. * OpenTK/GLControl/SimpleGLControl.Designer.cs: Use DockStyle.Fill instead of anchoring.
This commit is contained in:
parent
93465aed66
commit
00221ba225
3 changed files with 9 additions and 13 deletions
|
@ -22,10 +22,7 @@ namespace Examples
|
|||
public static void PrintOpenALErrors( IntPtr device )
|
||||
{
|
||||
ALError AlErr = AL.GetError();
|
||||
// AudioContext should throw on errors, so no need to test them manually.
|
||||
//AlcError AlcErr = Alc.GetError(device);
|
||||
AlutError AlutErr = Alut.GetError();
|
||||
Console.WriteLine("Al: " + AlErr + " Alut: " + Alut.GetErrorString(AlutErr));
|
||||
Console.WriteLine("OpenAL error: {0}", AlErr);
|
||||
}
|
||||
|
||||
public static void Main()
|
||||
|
|
|
@ -97,14 +97,15 @@ namespace Examples.Tutorial
|
|||
|
||||
protected override void OnResize(EventArgs e)
|
||||
{
|
||||
GL.Viewport(0, 0, Width, Height);
|
||||
GL.Viewport(ClientRectangle);
|
||||
|
||||
double ratio = 0.0;
|
||||
ratio = this.Width / (double)this.Height;
|
||||
float aspect = this.ClientSize.Width / (float)this.ClientSize.Height;
|
||||
|
||||
Matrix4 projection_matrix;
|
||||
Matrix4.CreatePerspectiveFieldOfView((float)Math.PI / 4, aspect, 1, 64, out projection_matrix);
|
||||
|
||||
GL.MatrixMode(MatrixMode.Projection);
|
||||
GL.LoadIdentity();
|
||||
Glu.Perspective(45.0, ratio, 1.0, 64.0);
|
||||
GL.LoadMatrix(ref projection_matrix);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
|
@ -69,11 +69,9 @@
|
|||
//
|
||||
// glControl1
|
||||
//
|
||||
this.glControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.glControl1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.glControl1.BackColor = System.Drawing.SystemColors.ControlDarkDark;
|
||||
this.glControl1.Location = new System.Drawing.Point(1, 0);
|
||||
this.glControl1.Location = new System.Drawing.Point(0, 0);
|
||||
this.glControl1.Name = "glControl1";
|
||||
this.glControl1.Size = new System.Drawing.Size(629, 565);
|
||||
this.glControl1.TabIndex = 0;
|
||||
|
|
Loading…
Reference in a new issue