Opentk/Source/Examples/OpenTK/GLControl/GLControlSimple.rtf
thefiddler 8dcb8601a2 Normalized line endings
Hopefully this is the first and last time we have to do this.
2013-10-11 01:58:54 +02:00

27 lines
No EOL
1.7 KiB
Text
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{\rtf1\ansi\ansicpg1253\deff0{\fonttbl{\f0\fnil\fcharset0 Arial;}}
{\colortbl ;\red163\green21\blue21;}
{\*\generator Msftedit 5.41.21.2509;}\viewkind4\uc1\pard\cf1\lang1033\b\fs28 Introduction\b0\fs22\par
\par
This sample demonstrates the GLControl, a powerful, easy-to-use WinForms Control that supports OpenGL rendering. It displays a Form that consists of a GLControl and three buttons that change the OpenGL clear color.\par
\par
The GLControl is suitable to rich, event-based GUIs. It is cross-platform and integrates well with WinForms applications but can also be used with WPF applications using a WindowsFormsHost control.\par
\par
While it is possible to implement continuous rendering with GLControl (see next sample), applications that require continuous rendering can achieve better performance with GameWindow.\par
\par
\b\fs28 Controls\par
\b0\fs22\par
Click on the buttons to change the background color for the GLControl.\par
Press Esc or click the close button to exit.\par
\par
\b\fs28 Implementation\par
\b0\fs22\par
This sample was created using the WinForms designer in Visual Studio. As such, the code follows the conventions of this designer.\par
\par
1. The constructor calls InitializeComponents(). This method is generated by the designer and initializes the Form, GLControl and Buttons.\par
\par
2. The glControl1_Paint event handler is called whenever GLControl needs to be repainted. A typical Paint handler will begin by calling GL.Clear() and end with a call to GLControl.SwapBuffers().\par
\par
3. The various *Button_Click event handlers change the OpenGL clear color and invalidate the GLControl. The Invalidate() method raises the GLControl Paint event and ensures the updated clear color becomes visible immediately.\par
\par
}