#include /** SEPARATOR */ #include /** SEPARATOR */ #include #include #include namespace PD { namespace LI { class PD_BKND_DESKTOP_API Backend_GL2 : public PD::LI::Backend { public: Backend_GL2() : LI::Backend("OpenGL2") {} ~Backend_GL2() {} PD_SMART_CTOR(Backend_GL2) void Init() override; void Deinit() override; void NewFrame() override; void BindTexture(PD::LI::TexAddress addr) override; void RenderDrawData(const PD::Vec& Commands) override; PD::LI::Texture::Ref LoadTexture( const std::vector& pixels, int w, int h, PD::LI::Texture::Type type = PD::LI::Texture::Type::RGBA32, PD::LI::Texture::Filter filter = PD::LI::Texture::Filter::LINEAR) override; private: PD::Vec VertexBuffer; PD::Vec IndexBuffer; size_t CurrentVertex = 0; size_t CurrentIndex = 0; GLuint Shader; GLuint pLocProjection; GLuint pLocTex; Mat4 Projection; GLuint VBO, IBO; // For Stats PD::u32 num_vtx = 0; PD::u32 num_idx = 0; }; } // namespace LI } // namespace PD