Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 22 additions & 19 deletions Samples/HelloTriangle/SampleForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,26 +49,27 @@ public SampleForm()
InitializeComponent();
}

#endregion

#region Event Handling

/// <summary>
/// Allocate GL resources or GL states.
/// </summary>
/// <param name="sender">
/// The <see cref="object"/> that has rasied the event.
/// </param>
/// <param name="e">
/// The <see cref="GlControlEventArgs"/> that specifies the event arguments.
/// </param>
private void RenderControl_ContextCreated(object sender, GlControlEventArgs e)
#endregion

#region Event Handling

/// <summary>
/// Allocate GL resources or GL states.
/// </summary>
/// <param name="sender">
/// The <see cref="object"/> that has rasied the event.
/// </param>
/// <param name="e">
/// The <see cref="GlControlEventArgs"/> that specifies the event arguments.
/// </param>
private void RenderControl_ContextCreated(object sender, GlControlEventArgs e)
{
GlControl glControl = (GlControl)sender;
_debugProc = GLDebugProc;

// GL Debugging
if (Gl.CurrentExtensions != null && Gl.CurrentExtensions.DebugOutput_ARB) {
Gl.DebugMessageCallback(GLDebugProc, IntPtr.Zero);
// GL Debugging
if (Gl.CurrentExtensions != null && Gl.CurrentExtensions.DebugOutput_ARB) {
Gl.DebugMessageCallback(_debugProc, IntPtr.Zero);
Gl.DebugMessageControl(DebugSource.DontCare, DebugType.DontCare, DebugSeverity.DontCare, 0, null, true);
}

Expand Down Expand Up @@ -548,6 +549,8 @@ private void RenderControl_RenderGLES2()
0.0f, 0.0f, 1.0f
};

#endregion
}
#endregion

Gl.DebugProc _debugProc;
}
}