In this diploma thesis, we explored various methods for 2D drawing using OpenGL. The purpose of the research was to implement and compare various approaches for rendering sprites and determine the most suitable method for a given situation. We began with a description of OpenGL and the graphics pipeline, as well as an introduction to mathematical concepts for computer graphics. We implemented naive drawing, where each OpenGL call represents the rendering of a single sprite. Then, we enhanced this approach by grouping sprites into batches. Additionally, we implemented instanced drawing and drawing with vertex assembly in the shader program. Finally, we compared all implementations using the Bunnymark benchmark.
|