Examples Required designer variable. Clean up any resources being used. true if managed resources should be disposed; otherwise, false. Required method for Designer support - do not modify the contents of this method with the code editor. Converts a System.Drawing.Color to a System.Int32. The System.Drawing.Color to convert. A System.Int32 containing the R, G, B, A values of the given System.Drawing.Color in the Rbga32 format. Required designer variable. Clean up any resources being used. true if managed resources should be disposed; otherwise, false. Required method for Designer support - do not modify the contents of this method with the code editor. Entry point of this example. Required designer variable. Clean up any resources being used. true if managed resources should be disposed; otherwise, false. Required method for Designer support - do not modify the contents of this method with the code editor. Entry point of this example. Demonstrates simple OpenGL Texturing. Setup OpenGL and load resources here. Not used. Respond to resize events here. Contains information on the new GameWindow size. There is no need to call the base implementation. Add your game logic here. Contains timing information. There is no need to call the base implementation. Add your game rendering code here. Contains timing information. There is no need to call the base implementation. Entry point of this example. Prepares the next frame for rendering. Place your control logic here. This is the place to respond to user input, update object positions etc. Entry point of this example. Demonstrates how to load and use a simple OpenGL shader program. Example is incomplete (documentation). This is the place to load resources that change little during the lifetime of the GameWindow. In this case, we check for GLSL support, and load the shaders. Not used. Called when the user resizes the window. Contains the new width/height of the window. You want the OpenGL viewport to match the window. This is the place to do it! Prepares the next frame for rendering. Place your control logic here. This is the place to respond to user input, update object positions etc. Place your rendering code here. Entry point of this example. Required designer variable. Clean up any resources being used. true if managed resources should be disposed; otherwise, false. Required method for Designer support - do not modify the contents of this method with the code editor. The main entry point for the application. Contains the information necessary to display and launch an example thorugh the ExampleLauncer. Required designer variable. Clean up any resources being used. true if managed resources should be disposed; otherwise, false. Required method for Designer support - do not modify the contents of this method with the code editor. Demonstrates the GameWindow class. Occurs when a key is pressed. The KeyboardDevice which generated this event. The key that was pressed. Setup OpenGL and load resources here. Not used. Respond to resize events here. Contains information on the new GameWindow size. There is no need to call the base implementation. Add your game logic here. Contains timing information. There is no need to call the base implementation. Add your game rendering code here. Contains timing information. There is no need to call the base implementation. Entry point of this example. Entry point of this example. Required designer variable. Clean up any resources being used. true if managed resources should be disposed; otherwise, false. Required method for Designer support - do not modify the contents of this method with the code editor. Demonstrates Vertex Arrays (in system memory). Example is incomplete (documentation). Broken since release 0.3.12. Called when the user resizes the window. Contains the new width/height of the window. You want the OpenGL viewport to match the window. This is the place to do it! Prepares the next frame for rendering. Place your control logic here. This is the place to respond to user input, update object positions etc. Place your rendering code here. Launches this example. Provides a simple way for the example launcher to launch the examples. Tests Font loading and rendering. To maintain high rendering performance, we need to cache the text we wish to draw, for each font we want to draw it with. To achieve this, we use the TextPrinter.Prepare() method, which returns a TextHandle - i.e. a handle to the cached text. We can use these TextHandles with the TextPrinter.Draw() method to draw text with very high performance. It is important that we need to call the Dispose() methods to reclaim of each and every TextHandle and TextureFont to reclaim the unamanged (OpenGL) resources they are using. To render pixel-perfect text, we have to setup a 2d display projection with a width/height that corresponds to our current Viewport. In OpenGL this can be easily achieved using the GL.Ortho method. It is still possible to render text in a 3d projection, but it will be very hard to achieve pixel-perfect precision. To achieve the highest possible performance, render your 3d scene first. At the end of the RenderFrame call, setup a 2d projection and render all text in one go. Entry point of this example. Shows how to render and scroll large amounts of text. Entry point of this example. This interface is is used by the ExampleLauncher to identify OpenTK examples, your applications do not need to implement or use it. Entry point of this example. Entry point of this example. Required designer variable. Clean up any resources being used. true if managed resources should be disposed; otherwise, false. Required method for Designer support - do not modify the contents of this method with the code editor. Demonstrates fixed-function OpenGL lighting. Example is incomplete (documentation). Called when the user resizes the window. Contains the new width/height of the window. You want the OpenGL viewport to match the window. This is the place to do it! Prepares the next frame for rendering. Place your control logic here. This is the place to respond to user input, update object positions etc. Place your rendering code here. Launches this example. Provides a simple way for the example launcher to launch the examples. Demonstrates immediate mode rendering. Example is incomplete, and will probably go away in the future. Called when the user resizes the window. Contains the new width/height of the window. You want the OpenGL viewport to match the window. This is the place to do it! Prepares the next frame for rendering. Place your control logic here. This is the place to respond to user input, update object positions etc. Place your rendering code here. Entry point of this example.