-
Recent Posts
Recent Comments
- phylyp on Discover Python and Patterns (17): 2D arrays
- Małgorzata Serżysko-Sosnowksa on Discover Python and Patterns (17): 2D arrays
Archives
Categories
Tags
Meta
Category Archives: Tutorial
OpenGL 2D Facade (11): View and Keyboard
With the previous program, the size of the window depends on the size of the level, which is problematic when the level is large. In this post, I update the shader programs to get a fast translation of the display. … Continue reading
OpenGL 2D Facade (10): Layers
In this post, we extend the facade to handle several layers. We also see how to draw with transparency.
OpenGL 2D Facade (9): Load a level
Before handling the rendering of several layers, we need data to build them. Rather than copy and paste many ids from a Tiled map file, I propose to read them using the TMX library.
OpenGL 2D Facade (8): Facade
I have enough content to start a facade: I refactorize all the code to satisfy the properties of the Facade pattern and get a more robust and extensible implementation.
OpenGL 2D Facade (7): Draw a level
In this post, I show how to draw many tiles from a single-layer level created with Tiled. I also show how to take a screen capture with OpenGL.
OpenGL 2D Facade (6): Draw a tile
Textures in the previous post allow the drawing of tiles, but the aspect ratio is not correct. In this post, I show how to draw a tile on a grid location correctly.
OpenGL 2D Facade (5): Textures
In this post, I introduce OpenGL textures and use them to draw tiles from tilesets.
OpenGL 2D Facade (4): Shaders
Shaders are one of the powerful features of OpenGL. I introduce them in this post and show how to color vertices using vertex and fragment shaders.
OpenGL 2D Facade (3): Vertex Array Objects
Vertex Arrays Objects allow us to send large meshes to the GPU. It is a bit technical, but this is something we only have to do once.
OpenGL 2D Facade (2): Mesh data
We get the best performance when sending mesh data to the GPU in a single operation. In this post, I present the numpy library that can create such data.