From 458e0005690ea9d579588a0a12368fc2c2c9a93a Mon Sep 17 00:00:00 2001 From: untodesu Date: Tue, 1 Jul 2025 03:08:39 +0500 Subject: I hyper-focued on refactoring again - I put a cool-sounding "we are number one" remix on repeat and straight up grinded the entire repository to a better state until 03:09 AM. I guess I have something wrong in my brain that makes me do this shit --- game/client/program.hh | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 game/client/program.hh (limited to 'game/client/program.hh') diff --git a/game/client/program.hh b/game/client/program.hh new file mode 100644 index 0000000..ce2538b --- /dev/null +++ b/game/client/program.hh @@ -0,0 +1,38 @@ +#ifndef CLIENT_PROGRAM_HH +#define CLIENT_PROGRAM_HH 1 +#pragma once + +struct GL_VariedMacro final { + std::string name; + unsigned long line; + unsigned int value; +}; + +struct GL_Uniform final { + std::string name; + GLint location; +}; + +class GL_Program final { +public: + bool setup(const char* vpath, const char* fpath); + void destroy(void); + bool update(void); + + std::size_t add_uniform(const char* name); + void set_variant_vert(unsigned int variant, unsigned int value); + void set_variant_frag(unsigned int variant, unsigned int value); + +public: + std::string vert_path; + std::string frag_path; + std::vector vert_source; + std::vector frag_source; + std::vector vert_variants; + std::vector frag_variants; + std::vector uniforms; + bool needs_update; + GLuint handle; +}; + +#endif // CLIENT_PROGRAM_HH -- cgit