Use std::min to fix Linux compile
Refactor struct texture_t -> class Texture, struct framebuffer_t -> class Framebuffer