Advertisement
Guest User

renderer.h

a guest
Sep 8th, 2018
1,065
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.69 KB | None | 0 0
  1. #pragma once
  2.  
  3. #include "ImGui/imgui.h"
  4.  
  5. class Renderer
  6. {
  7.     public:
  8.         void Initialize();
  9.  
  10.         void BeginScene();
  11.         void DrawScene();
  12.         void EndScene();
  13.  
  14.         static Renderer* GetInstance();
  15.  
  16.     private:
  17.         Renderer();
  18.         ~Renderer();
  19.  
  20.         float DrawText(ImFont* pFont, const std::string& text, const ImVec2& position, float size, uint32_t color, bool center = false);
  21.         void DrawLine(const ImVec2& from, const ImVec2& to, uint32_t color, float thickness = 1.0f);
  22.         void DrawCircle(const ImVec2& position, float radius, uint32_t color, float thickness = 1.0f);
  23.         void DrawCircleFilled(const ImVec2& position, float radius, uint32_t color);
  24.  
  25.         ImFont* m_pFont;
  26.  
  27.         static Renderer* m_pInstance;
  28. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement