23 RendererData(
const char *vertex_path,
const char *fragment_path,
unsigned int vertex_size);
51 void StartEditorScene(
Editor *editor);
63 void Clear(
bool ambient_light=
false)
const;
174 void Render(
bool post_processing=
false);
234 std::pair<Vec2,float>
GetIntersection(
const std::pair<Vec2,Vec2>&ray,
const std::pair<Vec2,Vec2>&seg);
256 m_ViewProj=view_proj;
275 unsigned int m_TextureIndex,m_PointIndex,m_LineIndex,m_TriangleIndex;
290 unsigned int m_PostProcessingIndex;
296 int m_MaxTextureSlots;
309 glm::mat4 m_ViewProj;
311 std::vector<std::pair<Vec2,Vec2>>segments;
320 static bool cmpgeneral(
const T &v1,
const T &v2){
321 return v1.layer<v2.layer;
324 inline int GetTexturesMinLayer(){
return m_Textures.
NumVertices>0?m_BufferT[m_TextureIndex].
layer:std::numeric_limits<int>::max(); }
325 inline int GetPointsMinLayer(){
return m_Points.
NumVertices>0?m_BufferP[m_PointIndex].
layer:std::numeric_limits<int>::max(); }
326 inline int GetLinesMinLayer(){
return m_Lines.
NumVertices>0?m_BufferL[m_LineIndex].
layer:std::numeric_limits<int>::max(); }
327 inline int GetTrianglesMinLayer(){
return m_Triangles.
NumVertices>0?m_BufferTR[m_TriangleIndex].
layer:std::numeric_limits<int>::max(); }
329 inline void AddLayout(
VertexBufferLayout &VBL,
unsigned int type,
unsigned int count,
bool normalized){
330 VBL.
Push(type,count,normalized);
unsigned int GetColorbufferID()
static void ImGui_End_Frame()
void SetClearColor(Vec3 color)
void SetPointSize(float new_size)
void Clear(bool ambient_light=false) const
static void ImGui_Close()
void RenderPoints(float max_layer)
void RenderTextures(bool post_processing, float max_layer)
void RenderTriangles(float max_layer)
void SetPostProcessing(const char *uniform_name)
void SetViewProjMat(glm::mat4 view_proj)
std::pair< Vec2, float > GetIntersection(const std::pair< Vec2, Vec2 > &ray, const std::pair< Vec2, Vec2 > &seg)
void DrawSolidQuad(Vec2 pos, Vec2 size, Vec4 color, int layer)
void DrawCircle(Vec2 pos, Vec4 color, float border, int layer)
std::vector< std::pair< Vec2, Vec2 > > & GetSegments()
void DrawTexture(Vec2 pos, Vec2 size, int layer, float texID)
void UpdateScreenSegments()
TonemapType GetTonemapType()
void DrawSpriteSheet(Vec2 pos, Vec2 size, float row, float col, int layer, SpriteSheet &s)
void KeepCircle(Vec2 pos, float radius, float blurAmount)
void SetLineWidth(float new_size)
void SetProjMat(glm::mat4 proj)
void SetGamma(float gamma)
void SetAmbientLight(Vec3 color)
void SetExposure(float exposure)
void AddSegment(Vec2 start_point, Vec2 end_point)
void DrawLight(Vec2 pos, Vec4 color, LightType light_type, float radius=0.0f, float blurAmount=0.0f)
void DrawPoint(Vec2 pos, Vec4 color, int layer)
void DrawTriangle(Vec2 pos1, Vec2 pos2, Vec2 pos3, Vec4 color, int layer)
static void ImGui_Theme()
void SetTonemapType(TonemapType type)
void DrawLine(Vec2 pos1, Vec2 pos2, Vec4 color, int layer)
void DrawAnimatedTexture(Vec2 pos, Vec2 size, int layer, SpriteSheet &s, bool &play_animation, bool loop_animation, float animation_delay, float &last_animation_time, int &animation_index)
static void ImGui_Start_Frame()
RendererData * GetLightsData()
void SetViewMat(glm::mat4 view)
static void ImGui_Content()
void RenderLines(float max_layer)
void Render(bool post_processing=false)
unsigned int GetFramebufferID()
void Push(unsigned int type, unsigned int count, bool normalized)
std::string TonemapTypeToString(TonemapType type)
TonemapType StringToTonemapType(const std::string &type)
RendererData(const char *vertex_path, const char *fragment_path, unsigned int vertex_size)