diff --git a/Source/Examples/OpenGL/Basic/DisplayLists/DisplayLists.cs b/Source/Examples/OpenGL/Basic/DisplayLists/DisplayLists.cs index 116f1ab0..44199358 100644 --- a/Source/Examples/OpenGL/Basic/DisplayLists/DisplayLists.cs +++ b/Source/Examples/OpenGL/Basic/DisplayLists/DisplayLists.cs @@ -15,6 +15,7 @@ using System.Text; using System.Windows.Forms; using OpenTK.OpenGL; +using Enums = OpenTK.OpenGL.Enums; #endregion --- Using Directives --- diff --git a/Source/Examples/OpenGL/Basic/Lesson01/Basic01.cs b/Source/Examples/OpenGL/Basic/Lesson01/Basic01.cs index f28f5b58..aa029b89 100644 --- a/Source/Examples/OpenGL/Basic/Lesson01/Basic01.cs +++ b/Source/Examples/OpenGL/Basic/Lesson01/Basic01.cs @@ -4,10 +4,16 @@ */ #endregion +#region --- Using Directives --- + using System; using System.Collections.Generic; using System.Windows.Forms; + using OpenTK.OpenGL; +using Enums = OpenTK.OpenGL.Enums; + +#endregion namespace Lesson01 { diff --git a/Source/Examples/OpenGL/Basic/NoFramework/QueryModesForm.cs b/Source/Examples/OpenGL/Basic/NoFramework/QueryModesForm.cs index 5ddd9742..ab5453b2 100644 --- a/Source/Examples/OpenGL/Basic/NoFramework/QueryModesForm.cs +++ b/Source/Examples/OpenGL/Basic/NoFramework/QueryModesForm.cs @@ -1,10 +1,16 @@ +#region --- Using Directives --- + using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Text; using System.Windows.Forms; + using OpenTK.OpenGL; +using Enums = OpenTK.OpenGL.Enums; + +#endregion namespace NoFramework { diff --git a/Source/Examples/OpenGL/GLSL/Lesson01/Cube.cs b/Source/Examples/OpenGL/GLSL/Lesson01/Cube.cs index a7e41343..aeb0e485 100644 --- a/Source/Examples/OpenGL/GLSL/Lesson01/Cube.cs +++ b/Source/Examples/OpenGL/GLSL/Lesson01/Cube.cs @@ -15,6 +15,7 @@ using System.Windows.Forms; using System.Threading; using OpenTK.OpenGL; +using Enums = OpenTK.OpenGL.Enums; #endregion --- Using Directives --- @@ -129,18 +130,18 @@ namespace OpenTK.Examples.OpenGL.GLSL vertex_shader_object = GL.CreateShader(Enums.VERSION_2_0.VERTEX_SHADER); fragment_shader_object = GL.CreateShader(Enums.VERSION_2_0.FRAGMENT_SHADER); - GL.ShaderSource(vertex_shader_object, vertex_shader_source.Length, vertex_shader_source, IntPtr.Zero); + GL.ShaderSource(vertex_shader_object, vertex_shader_source.Length, vertex_shader_source, null); GL.CompileShader(vertex_shader_object); GL.GetShaderiv(vertex_shader_object, Enums.VERSION_2_0.COMPILE_STATUS, status); if (status[0] != (int)Enums.Boolean.TRUE) { StringBuilder info = new StringBuilder(1024); - GL.GetShaderInfoLog(vertex_shader_object, 1024, null, info); + GL.GetShaderInfoLog(vertex_shader_object, info.MaxCapacity, null, info); throw new Exception(info.ToString()); } - GL.ShaderSource(fragment_shader_object, fragment_shader_source.Length, fragment_shader_source, IntPtr.Zero); + GL.ShaderSource(fragment_shader_object, fragment_shader_source.Length, fragment_shader_source, null); GL.CompileShader(fragment_shader_object); GL.GetShaderiv(fragment_shader_object, Enums.VERSION_2_0.COMPILE_STATUS, status); if (status[0] != (int)Enums.Boolean.TRUE)