Backend
All drawing operations are done from here. By having this as an interface, this lets us have different backends, which leaves open the possibility of creating a multi-platform kotlin project with a different Backend for the js
platform for use in a browser.
NOTE. LoggingBackend doesn't draw anything, but lets us create test cases without setting up an OpenGL.
Inheritors
Functions
OpenGL is moe efficient when operations can be batched. So rather than call drawTexture multiple times (with the same texture, tint, and modelMatrix), batch them and call TextureBatch.draw instead.
Clip (scissor). The values are LogicalPixels measured from the TOP left of the window. The clipped region is the intersection of the currently clipped region and the newly requested region.
A gradient fill. Each vertex of each triangle has a color.
If you need to use OpenGL while Glok is rendering a scene, you must perform these actions within a block. This saves the OpenGL state, runs the block, and then restores the state again.