mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-02-24 18:36:54 +00:00
* 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
5208f6c9dd
commit
258f2a4e57
|
@ -22,10 +22,7 @@ namespace Examples
|
||||||
public static void PrintOpenALErrors( IntPtr device )
|
public static void PrintOpenALErrors( IntPtr device )
|
||||||
{
|
{
|
||||||
ALError AlErr = AL.GetError();
|
ALError AlErr = AL.GetError();
|
||||||
// AudioContext should throw on errors, so no need to test them manually.
|
Console.WriteLine("OpenAL error: {0}", AlErr);
|
||||||
//AlcError AlcErr = Alc.GetError(device);
|
|
||||||
AlutError AlutErr = Alut.GetError();
|
|
||||||
Console.WriteLine("Al: " + AlErr + " Alut: " + Alut.GetErrorString(AlutErr));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Main()
|
public static void Main()
|
||||||
|
|
|
@ -97,14 +97,15 @@ namespace Examples.Tutorial
|
||||||
|
|
||||||
protected override void OnResize(EventArgs e)
|
protected override void OnResize(EventArgs e)
|
||||||
{
|
{
|
||||||
GL.Viewport(0, 0, Width, Height);
|
GL.Viewport(ClientRectangle);
|
||||||
|
|
||||||
double ratio = 0.0;
|
float aspect = this.ClientSize.Width / (float)this.ClientSize.Height;
|
||||||
ratio = this.Width / (double)this.Height;
|
|
||||||
|
Matrix4 projection_matrix;
|
||||||
|
Matrix4.CreatePerspectiveFieldOfView((float)Math.PI / 4, aspect, 1, 64, out projection_matrix);
|
||||||
|
|
||||||
GL.MatrixMode(MatrixMode.Projection);
|
GL.MatrixMode(MatrixMode.Projection);
|
||||||
GL.LoadIdentity();
|
GL.LoadMatrix(ref projection_matrix);
|
||||||
Glu.Perspective(45.0, ratio, 1.0, 64.0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
@ -69,11 +69,9 @@
|
||||||
//
|
//
|
||||||
// glControl1
|
// glControl1
|
||||||
//
|
//
|
||||||
this.glControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
this.glControl1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
| System.Windows.Forms.AnchorStyles.Left)
|
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
|
||||||
this.glControl1.BackColor = System.Drawing.SystemColors.ControlDarkDark;
|
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.Name = "glControl1";
|
||||||
this.glControl1.Size = new System.Drawing.Size(629, 565);
|
this.glControl1.Size = new System.Drawing.Size(629, 565);
|
||||||
this.glControl1.TabIndex = 0;
|
this.glControl1.TabIndex = 0;
|
||||||
|
|
Loading…
Reference in a new issue