Last time I posted a new example that uses OpenTK for a 2D view with sprites. Let's go into a bit more detail about how it works:
Wednesday, March 25, 2015
Tuesday, March 10, 2015
OpenTK Sprites Example
A new example is available on the GitHub repository:
https://github.com/neokabuto/OpenTKTutorialContent/tree/master/TKSprites
This example features 2D drawing of textures, with motion and alpha blending. 30,000 sprites are added by default, but you can add more by hitting the + key. Most of the sprites are off-screen (and not drawn to help keep things running smoothly), but you can move the view with the arrow keys (and speed up with the shift key) to pan around the world. Clicking on one of the sprites will change its texture!
UPDATE 3-11-15: New feature: multiple shaders! Hit V to change which shader is used, or hit M to toggle a mode where the shader is chosen based on the texture.
https://github.com/neokabuto/OpenTKTutorialContent/tree/master/TKSprites
This example features 2D drawing of textures, with motion and alpha blending. 30,000 sprites are added by default, but you can add more by hitting the + key. Most of the sprites are off-screen (and not drawn to help keep things running smoothly), but you can move the view with the arrow keys (and speed up with the shift key) to pan around the world. Clicking on one of the sprites will change its texture!
UPDATE 3-11-15: New feature: multiple shaders! Hit V to change which shader is used, or hit M to toggle a mode where the shader is chosen based on the texture.
Subscribe to:
Posts (Atom)