Closed jfcameron closed 3 years ago
webgl1es2_texture.cpp is full of useful (but static) functions all around keeping the context in a valid state when interacting with the texture related glfunctions. I wanted to keep all this in texture's cpp file to keep it easy to read but because texture_camera needs access to this code, it needs to be moved to a shared location. glh.h makes some sense, but if I do that then I should also move a lot of other low level code (shader.cpp comes to mind, even though that code does NOT need to be accessible outside of its compilation unit). maybe splitting glh to be more specific makes sense. need to think about this
overall I want to keep code as local as possible. It turns out I didnt have to directly use opengl's texture functions, i used the texture class I made, much better solution.
while writing texture_camera, wrote redundant init code for textures. negotiating valid handles to buffers (texture buffer objects, vertex buffer objects, frame buffer objects, ....) should be moved to the helper to prevent duplication