Tatooine
Public Member Functions | Private Attributes | List of all members
tatooine::gl::imgui_render_backend Struct Reference

#include <imgui_render_backend.h>

Collaboration diagram for tatooine::gl::imgui_render_backend:
[legend]

Public Member Functions

 imgui_render_backend ()
 
void setup_render_state (ImDrawData *draw_data, int fb_width, int fb_height, vertexarray &vertex_array_object)
 
void render_draw_data (ImDrawData *draw_data)
 
bool create_fonts_texture ()
 
bool check_shader (GLuint handle, const char *desc)
 
bool check_program (GLuint handle, const char *desc)
 
bool create_device_objects ()
 

Private Attributes

GLuint m_gl_version = 0
 
char m_glsl_version_string [32]
 
tex2rgba< std::uint8_t > m_font_texture
 
imgui_shader m_shader
 
vertexbuffer< std::array< GLfloat, 2 >, std::array< GLfloat, 2 >, std::array< std::uint8_t, 4 > > m_vbo
 
indexbuffer m_ibo
 

Constructor & Destructor Documentation

◆ imgui_render_backend()

Member Function Documentation

◆ check_program()

bool tatooine::gl::imgui_render_backend::check_program ( GLuint  handle,
const char *  desc 
)

If you get an error please report on GitHub. You may try different GL context version or GLSL version.

◆ check_shader()

bool tatooine::gl::imgui_render_backend::check_shader ( GLuint  handle,
const char *  desc 
)

If you get an error please report on github. You may try different GL context version or GLSL version. See GL<>GLSL version table at the top of this file.

◆ create_device_objects()

bool tatooine::gl::imgui_render_backend::create_device_objects ( )

◆ create_fonts_texture()

bool tatooine::gl::imgui_render_backend::create_fonts_texture ( )

◆ render_draw_data()

void tatooine::gl::imgui_render_backend::render_draw_data ( ImDrawData *  draw_data)

OpenGL3 Render function. (this used to be set in io.RenderDrawListsFn and called by ImGui::Render(), but you can now call this directly from your main loop) Note that this implementation is little overcomplicated because we are saving/setting up/restoring every OpenGL state explicitly, in order to be able to run within any OpenGL engine that doesn't do so.

◆ setup_render_state()

void tatooine::gl::imgui_render_backend::setup_render_state ( ImDrawData *  draw_data,
int  fb_width,
int  fb_height,
vertexarray vertex_array_object 
)

Member Data Documentation

◆ m_font_texture

tex2rgba<std::uint8_t> tatooine::gl::imgui_render_backend::m_font_texture
private

◆ m_gl_version

GLuint tatooine::gl::imgui_render_backend::m_gl_version = 0
private

◆ m_glsl_version_string

char tatooine::gl::imgui_render_backend::m_glsl_version_string[32]
private
Initial value:
=
""

◆ m_ibo

indexbuffer tatooine::gl::imgui_render_backend::m_ibo
private

◆ m_shader

imgui_shader tatooine::gl::imgui_render_backend::m_shader
private

◆ m_vbo

vertexbuffer<std::array<GLfloat, 2>, std::array<GLfloat, 2>, std::array<std::uint8_t, 4> > tatooine::gl::imgui_render_backend::m_vbo
private

The documentation for this struct was generated from the following file: