Tatooine
imgui_render_backend.h
Go to the documentation of this file.
1#ifndef TATOOINE_GL_IMGUI_RENDER_BACKEND_H
2#define TATOOINE_GL_IMGUI_RENDER_BACKEND_H
3//==============================================================================
4#include "glincludes.h"
5
7
8#include <iostream>
9
10#include "imgui_shader.h"
11#include "indexbuffer.h"
12#include "texture.h"
13#include "vertexarray.h"
14#include "vertexbuffer.h"
15//==============================================================================
16namespace tatooine::gl {
17//==============================================================================
19 //----------------------------------------------------------------------------
20 // members
21 //----------------------------------------------------------------------------
22 private:
23 GLuint m_gl_version = 0; // Extracted at runtime using GL_MAJOR_VERSION,
24 // GL_MINOR_VERSION queries.
26 ""; // Specified by user or detected based on compile time GL settings.
29 vertexbuffer<std::array<GLfloat, 2>, std::array<GLfloat, 2>,
30 std::array<std::uint8_t, 4>>
33
34 //----------------------------------------------------------------------------
35 // ctor
36 //----------------------------------------------------------------------------
37 public:
39
40 //----------------------------------------------------------------------------
41 // methods
42 //----------------------------------------------------------------------------
43 public:
44 void setup_render_state(ImDrawData* draw_data, int fb_width, int fb_height,
45 vertexarray& vertex_array_object);
46 //----------------------------------------------------------------------------
53 void render_draw_data(ImDrawData* draw_data);
54 //----------------------------------------------------------------------------
56 //----------------------------------------------------------------------------
60 bool check_shader(GLuint handle, const char* desc);
61 //----------------------------------------------------------------------------
64 bool check_program(GLuint handle, const char* desc);
65 //----------------------------------------------------------------------------
67};
68//==============================================================================
69} // namespace tatooine::gl
70//==============================================================================
71#endif
Definition: indexbuffer.h:13
Definition: texture.h:61
Definition: vertexarray.h:15
Definition: vertexbuffer.h:22
Definition: ansiformat.h:6
Definition: imgui_render_backend.h:18
void setup_render_state(ImDrawData *draw_data, int fb_width, int fb_height, vertexarray &vertex_array_object)
GLuint m_gl_version
Definition: imgui_render_backend.h:23
char m_glsl_version_string[32]
Definition: imgui_render_backend.h:25
bool check_shader(GLuint handle, const char *desc)
tex2rgba< std::uint8_t > m_font_texture
Definition: imgui_render_backend.h:27
imgui_shader m_shader
Definition: imgui_render_backend.h:28
vertexbuffer< std::array< GLfloat, 2 >, std::array< GLfloat, 2 >, std::array< std::uint8_t, 4 > > m_vbo
Definition: imgui_render_backend.h:31
void render_draw_data(ImDrawData *draw_data)
bool check_program(GLuint handle, const char *desc)
indexbuffer m_ibo
Definition: imgui_render_backend.h:32
Definition: imgui_shader.h:8
Definition: handle.h:14