SLProject  4.2.000
A platform independent 3D computer graphics framework for desktop OS, Android, iOS and online in web browsers
ImGuiRendererOpenGL Class Reference

#include <ImGuiWrapper.h>

Inheritance diagram for ImGuiRendererOpenGL:
[legend]

Public Member Functions

 ImGuiRendererOpenGL (ImGuiContext *context)
 
 ~ImGuiRendererOpenGL ()
 
void render (const SLRecti &viewportRect) override
 
- Public Member Functions inherited from ImGuiRenderer
 ImGuiRenderer (ImGuiContext *context)
 
virtual ~ImGuiRenderer ()
 

Private Member Functions

void printCompileErrors (SLint shaderHandle, const SLchar *src)
 Prints the compile errors in case of a GLSL compile failure. More...
 
void createOpenGLObjects ()
 Creates all OpenGL objects for drawing the imGui. More...
 
void deleteOpenGLObjects ()
 Deletes all OpenGL objects for drawing the imGui. More...
 

Private Attributes

unsigned int _fontTexture {0}
 OpenGL texture id for font. More...
 
int _progHandle {0}
 OpenGL handle for shader program. More...
 
int _vertHandle {0}
 OpenGL handle for vertex shader. More...
 
int _fragHandle {0}
 OpenGL handle for fragment shader. More...
 
int _attribLocTex {0}
 OpenGL attribute location for texture. More...
 
int _attribLocProjMtx {0}
 OpenGL attribute location for ??? More...
 
int _attribLocPosition {0}
 OpenGL attribute location for vertex pos. More...
 
int _attribLocUV {0}
 OpenGL attribute location for texture coords. More...
 
int _attribLocColor {0}
 OpenGL attribute location for color. More...
 
unsigned int _vboHandle {0}
 OpenGL handle for vertex buffer object. More...
 
unsigned int _vaoHandle {0}
 OpenGL vertex array object handle. More...
 
unsigned int _elementsHandle {0}
 OpenGL handle for vertex indexes. More...
 

Additional Inherited Members

- Protected Attributes inherited from ImGuiRenderer
ImGuiContext * _context
 

Detailed Description

Definition at line 50 of file ImGuiWrapper.h.

Constructor & Destructor Documentation

◆ ImGuiRendererOpenGL()

ImGuiRendererOpenGL::ImGuiRendererOpenGL ( ImGuiContext *  context)
inline

Definition at line 53 of file ImGuiWrapper.h.

54  : ImGuiRenderer(context)
55  {
56  // Attention: define your fonts before calling this function!
58  }
ImGuiRenderer(ImGuiContext *context)
Definition: ImGuiWrapper.h:34
void createOpenGLObjects()
Creates all OpenGL objects for drawing the imGui.

◆ ~ImGuiRendererOpenGL()

ImGuiRendererOpenGL::~ImGuiRendererOpenGL ( )
inline

Definition at line 60 of file ImGuiWrapper.h.

61  {
63  }
void deleteOpenGLObjects()
Deletes all OpenGL objects for drawing the imGui.

Member Function Documentation

◆ createOpenGLObjects()

void ImGuiRendererOpenGL::createOpenGLObjects ( )
private

Creates all OpenGL objects for drawing the imGui.

Definition at line 40 of file ImGuiWrapper.cpp.

41 {
42  // Backup GL state
43  GLint last_texture, last_array_buffer, last_vertex_array;
44  glGetIntegerv(GL_TEXTURE_BINDING_2D, &last_texture);
45  glGetIntegerv(GL_ARRAY_BUFFER_BINDING, &last_array_buffer);
46  glGetIntegerv(GL_VERTEX_ARRAY_BINDING, &last_vertex_array);
47 
48  // Build version string as the first statement
49  SLGLState* state = SLGLState::instance();
50  SLstring verGLSL = state->glSLVersionNO();
51  SLstring vertex_shader = "#version " + verGLSL;
52  if (state->glIsES3()) vertex_shader += " es";
53  vertex_shader +=
54  "\n"
55  "#ifdef GL_ES\n"
56  "precision mediump float;\n"
57  "#endif\n"
58  "\n"
59  "uniform mat4 ProjMtx;\n"
60  "in vec2 Position;\n"
61  "in vec2 UV;\n"
62  "in vec4 Color;\n"
63  "out vec2 Frag_UV;\n"
64  "out vec4 Frag_Color;\n"
65  "void main()\n"
66  "{\n"
67  " Frag_UV = UV;\n"
68  " Frag_Color = Color;\n"
69  " gl_Position = ProjMtx * vec4(Position.xy,0,1);\n"
70  "}\n";
71 
72  SLstring fragment_shader = "#version " + verGLSL;
73  if (state->glIsES3()) fragment_shader += " es";
74  fragment_shader +=
75  "\n"
76  "#ifdef GL_ES\n"
77  "precision mediump float;\n"
78  "#endif\n"
79  "\n"
80  "uniform sampler2D Texture;\n"
81  "in vec2 Frag_UV;\n"
82  "in vec4 Frag_Color;\n"
83  "out vec4 Out_Color;\n"
84  "void main()\n"
85  "{\n"
86  " Out_Color = Frag_Color * texture( Texture, Frag_UV.st);\n"
87  "}\n";
88 
89  _vertHandle = (SLint)glCreateShader(GL_VERTEX_SHADER);
90  _fragHandle = (SLint)glCreateShader(GL_FRAGMENT_SHADER);
91  const char* srcVert = vertex_shader.c_str();
92  const char* srcFrag = fragment_shader.c_str();
93  glShaderSource((SLuint)_vertHandle, 1, &srcVert, nullptr);
94  glShaderSource((SLuint)_fragHandle, 1, &srcFrag, nullptr);
95  glCompileShader((SLuint)_vertHandle);
97  glCompileShader((SLuint)_fragHandle);
99 
100  _progHandle = (SLint)glCreateProgram();
101  glAttachShader((SLuint)_progHandle, (SLuint)_vertHandle);
102  glAttachShader((SLuint)_progHandle, (SLuint)_fragHandle);
103  glLinkProgram((SLuint)_progHandle);
104 
105  GET_GL_ERROR;
106 
107  _attribLocTex = glGetUniformLocation((SLuint)_progHandle, "Texture");
108  _attribLocProjMtx = glGetUniformLocation((SLuint)_progHandle, "ProjMtx");
109  _attribLocPosition = glGetAttribLocation((SLuint)_progHandle, "Position");
110  _attribLocUV = glGetAttribLocation((SLuint)_progHandle, "UV");
111  _attribLocColor = glGetAttribLocation((SLuint)_progHandle, "Color");
112 
113  GET_GL_ERROR;
114 
115  glGenBuffers(1, &_vboHandle);
116  glGenBuffers(1, &_elementsHandle);
117 
118  glGenVertexArrays(1, &_vaoHandle);
119  glBindVertexArray(_vaoHandle);
120  glBindBuffer(GL_ARRAY_BUFFER, _vboHandle);
121  glEnableVertexAttribArray((SLuint)_attribLocPosition);
122  glEnableVertexAttribArray((SLuint)_attribLocUV);
123  glEnableVertexAttribArray((SLuint)_attribLocColor);
124 
125  GET_GL_ERROR;
126 
127 #define OFFSETOF(TYPE, ELEMENT) ((size_t) & (((TYPE*)nullptr)->ELEMENT))
128  glVertexAttribPointer((SLuint)_attribLocPosition,
129  2,
130  GL_FLOAT,
131  GL_FALSE,
132  sizeof(ImDrawVert),
133  (GLvoid*)OFFSETOF(ImDrawVert, pos));
134  glVertexAttribPointer((SLuint)_attribLocUV,
135  2,
136  GL_FLOAT,
137  GL_FALSE,
138  sizeof(ImDrawVert),
139  (GLvoid*)OFFSETOF(ImDrawVert, uv));
140  glVertexAttribPointer((SLuint)_attribLocColor,
141  4,
142  GL_UNSIGNED_BYTE,
143  GL_TRUE,
144  sizeof(ImDrawVert),
145  (GLvoid*)OFFSETOF(ImDrawVert, col));
146 #undef OFFSETOF
147 
148  GET_GL_ERROR;
149 
150  // Build texture atlas
151  ImGuiIO& io = _context->IO;
152  SLuchar* pixels;
153  int width, height;
154 
155  // Load as RGBA 32-bits (75% of the memory is wasted, but default font is
156  // so small) because it is more likely to be compatible with user's
157  // existing shaders. If your ImTextureId represent a higher-level concept
158  // than just a GL texture id, consider calling GetTexDataAsAlpha8()
159  // instead to save on GPU memory.
160  io.Fonts->GetTexDataAsRGBA32(&pixels, &width, &height);
161 
162  // Upload texture to graphics system
163  glGetIntegerv(GL_TEXTURE_BINDING_2D, &last_texture);
164  glGenTextures(1, &_fontTexture);
165  glBindTexture(GL_TEXTURE_2D, _fontTexture);
166  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
167  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
168  glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, pixels);
169 
170  GET_GL_ERROR;
171 
172  // Store our identifier
173  io.Fonts->TexID = (void*)(intptr_t)_fontTexture;
174 
175  // Restore state
176  glBindTexture(GL_TEXTURE_2D, (SLuint)last_texture);
177 
178  // Restore modified GL state
179  glBindTexture(GL_TEXTURE_2D, (SLuint)last_texture);
180  glBindBuffer(GL_ARRAY_BUFFER, (SLuint)last_array_buffer);
181  glBindVertexArray((SLuint)last_vertex_array);
182 
183  GET_GL_ERROR;
184 }
#define OFFSETOF(TYPE, ELEMENT)
unsigned int SLuint
Definition: SL.h:171
unsigned char SLuchar
Definition: SL.h:163
string SLstring
Definition: SL.h:158
int SLint
Definition: SL.h:170
#define GET_GL_ERROR
Definition: SLGLState.h:56
ImGuiContext * _context
Definition: ImGuiWrapper.h:43
int _fragHandle
OpenGL handle for fragment shader.
Definition: ImGuiWrapper.h:75
int _attribLocPosition
OpenGL attribute location for vertex pos.
Definition: ImGuiWrapper.h:78
void printCompileErrors(SLint shaderHandle, const SLchar *src)
Prints the compile errors in case of a GLSL compile failure.
int _vertHandle
OpenGL handle for vertex shader.
Definition: ImGuiWrapper.h:74
int _attribLocColor
OpenGL attribute location for color.
Definition: ImGuiWrapper.h:80
int _attribLocUV
OpenGL attribute location for texture coords.
Definition: ImGuiWrapper.h:79
int _attribLocTex
OpenGL attribute location for texture.
Definition: ImGuiWrapper.h:76
unsigned int _elementsHandle
OpenGL handle for vertex indexes.
Definition: ImGuiWrapper.h:83
int _attribLocProjMtx
OpenGL attribute location for ???
Definition: ImGuiWrapper.h:77
unsigned int _fontTexture
OpenGL texture id for font.
Definition: ImGuiWrapper.h:72
int _progHandle
OpenGL handle for shader program.
Definition: ImGuiWrapper.h:73
unsigned int _vboHandle
OpenGL handle for vertex buffer object.
Definition: ImGuiWrapper.h:81
unsigned int _vaoHandle
OpenGL vertex array object handle.
Definition: ImGuiWrapper.h:82
Singleton class holding all OpenGL states.
Definition: SLGLState.h:71
static SLGLState * instance()
Public static instance getter for singleton pattern.
Definition: SLGLState.h:74
SLbool glIsES3() const
Definition: SLGLState.h:136
SLstring glSLVersionNO()
Definition: SLGLState.h:133

◆ deleteOpenGLObjects()

void ImGuiRendererOpenGL::deleteOpenGLObjects ( )
private

Deletes all OpenGL objects for drawing the imGui.

Definition at line 187 of file ImGuiWrapper.cpp.

188 {
189  if (_vaoHandle) glDeleteVertexArrays(1, &_vaoHandle);
190  if (_vboHandle) glDeleteBuffers(1, &_vboHandle);
191  if (_elementsHandle) glDeleteBuffers(1, &_elementsHandle);
193 
194  if (_progHandle && _vertHandle) glDetachShader((SLuint)_progHandle,
196  if (_vertHandle) glDeleteShader((SLuint)_vertHandle);
197  _vertHandle = 0;
198 
199  if (_progHandle && _fragHandle) glDetachShader((SLuint)_progHandle,
201  if (_fragHandle) glDeleteShader((SLuint)_fragHandle);
202  _fragHandle = 0;
203 
204  if (_progHandle) glDeleteProgram((SLuint)_progHandle);
205  _progHandle = 0;
206 
207  if (_fontTexture)
208  {
209  glDeleteTextures(1, &_fontTexture);
210  _context->IO.Fonts->TexID = nullptr;
211  _fontTexture = 0;
212  }
213 }

◆ printCompileErrors()

void ImGuiRendererOpenGL::printCompileErrors ( SLint  shaderHandle,
const SLchar src 
)
private

Prints the compile errors in case of a GLSL compile failure.

Definition at line 21 of file ImGuiWrapper.cpp.

22 {
23  // Check compiler log
24  SLint compileSuccess = 0;
25  glGetShaderiv((SLuint)shaderHandle, GL_COMPILE_STATUS, &compileSuccess);
26  if (compileSuccess == GL_FALSE)
27  {
28  GLchar log[512];
29  glGetShaderInfoLog((SLuint)shaderHandle,
30  sizeof(log),
31  nullptr,
32  &log[0]);
33  SL_LOG("*** COMPILER ERROR ***");
34  SL_LOG("%s\n---", log);
35  SL_LOG("%s", src);
36  }
37 }
#define SL_LOG(...)
Definition: SL.h:233
void log(const char *tag, const char *format,...)
logs a formatted string platform independently
Definition: Utils.cpp:1103

◆ render()

void ImGuiRendererOpenGL::render ( const SLRecti viewportRect)
overridevirtual

Reimplemented from ImGuiRenderer.

Definition at line 215 of file ImGuiWrapper.cpp.

216 {
217  ImGui::SetCurrentContext(_context);
218  ImGui::Render();
219  ImDrawData* draw_data = ImGui::GetDrawData();
220 
221  ImGuiIO& io = _context->IO;
222 
223  // Avoid rendering when minimized, scale coordinates for retina displays
224  // (screen coordinates != framebuffer coordinates)
225  int fbWidth = (int)(io.DisplaySize.x * io.DisplayFramebufferScale.x);
226  int fbHeight = (int)(io.DisplaySize.y * io.DisplayFramebufferScale.y);
227  if (fbWidth == 0 || fbHeight == 0)
228  return;
229  draw_data->ScaleClipRects(io.DisplayFramebufferScale);
230 
231  // Backup GL state
232  GLint last_active_texture;
233  glGetIntegerv(GL_ACTIVE_TEXTURE, &last_active_texture);
234  glActiveTexture(GL_TEXTURE0);
235 
236  GLint last_program;
237  glGetIntegerv(GL_CURRENT_PROGRAM, &last_program);
238  GLint last_texture;
239  glGetIntegerv(GL_TEXTURE_BINDING_2D, &last_texture);
240  GLint last_array_buffer;
241  glGetIntegerv(GL_ARRAY_BUFFER_BINDING, &last_array_buffer);
242  GLint last_element_array_buffer;
243  glGetIntegerv(GL_ELEMENT_ARRAY_BUFFER_BINDING, &last_element_array_buffer);
244  GLint last_vertex_array;
245  glGetIntegerv(GL_VERTEX_ARRAY_BINDING, &last_vertex_array);
246  GLint last_blend_src_rgb;
247  glGetIntegerv(GL_BLEND_SRC_RGB, &last_blend_src_rgb);
248  GLint last_blend_dst_rgb;
249  glGetIntegerv(GL_BLEND_DST_RGB, &last_blend_dst_rgb);
250  GLint last_blend_src_alpha;
251  glGetIntegerv(GL_BLEND_SRC_ALPHA, &last_blend_src_alpha);
252  GLint last_blend_dst_alpha;
253  glGetIntegerv(GL_BLEND_DST_ALPHA, &last_blend_dst_alpha);
254  GLint last_blend_equation_rgb;
255  glGetIntegerv(GL_BLEND_EQUATION_RGB, &last_blend_equation_rgb);
256  GLint last_blend_equation_alpha;
257  glGetIntegerv(GL_BLEND_EQUATION_ALPHA, &last_blend_equation_alpha);
258  GLint last_viewport[4];
259  glGetIntegerv(GL_VIEWPORT, last_viewport);
260  GLint last_scissor_box[4];
261  glGetIntegerv(GL_SCISSOR_BOX, last_scissor_box);
262 
263  GLboolean last_enable_blend = glIsEnabled(GL_BLEND);
264  GLboolean last_enable_cull_face = glIsEnabled(GL_CULL_FACE);
265  GLboolean last_enable_depth_test = glIsEnabled(GL_DEPTH_TEST);
266  GLboolean last_enable_scissor_test = glIsEnabled(GL_SCISSOR_TEST);
267 
268  // Setup render state: alpha-blending enabled, no face culling, no depth testing, scissor enabled
269  glEnable(GL_BLEND);
270  glBlendEquation(GL_FUNC_ADD);
271  glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
272  glDisable(GL_CULL_FACE);
273  glDisable(GL_DEPTH_TEST);
274  glEnable(GL_SCISSOR_TEST);
275 
276  // Setup viewport
277  if (viewportRect.isEmpty())
278  glViewport(0,
279  0,
280  (GLsizei)fbWidth,
281  (GLsizei)fbHeight);
282  else
283  glViewport((GLsizei)(viewportRect.x * io.DisplayFramebufferScale.x),
284  (GLsizei)(viewportRect.y * io.DisplayFramebufferScale.y),
285  (GLsizei)(viewportRect.width * io.DisplayFramebufferScale.x),
286  (GLsizei)(viewportRect.height * io.DisplayFramebufferScale.y));
287 
288  // Setup orthographic projection matrix
289  // clang-format off
290  const float ortho_projection[4][4] =
291  {
292  {2.0f / io.DisplaySize.x, 0.0f, 0.0f, 0.0f},
293  {0.0f, 2.0f / -io.DisplaySize.y, 0.0f, 0.0f},
294  {0.0f, 0.0f, -1.0f, 0.0f},
295  {-1.0f, 1.0f, 0.0f, 1.0f},
296  };
297  // clang-format on
298 
299  glUseProgram((SLuint)_progHandle);
300  glUniform1i(_attribLocTex, 0);
301  glUniformMatrix4fv(_attribLocProjMtx, 1, GL_FALSE, &ortho_projection[0][0]);
302  glBindVertexArray((SLuint)_vaoHandle);
303 
304  for (int n = 0; n < draw_data->CmdListsCount; n++)
305  {
306  const ImDrawList* cmd_list = draw_data->CmdLists[n];
307  const ImDrawIdx* idx_buffer_offset = nullptr;
308 
309  glBindBuffer(GL_ARRAY_BUFFER, _vboHandle);
310  glBufferData(GL_ARRAY_BUFFER,
311  (GLsizeiptr)cmd_list->VtxBuffer.Size * (GLsizeiptr)sizeof(ImDrawVert),
312  (const GLvoid*)cmd_list->VtxBuffer.Data,
313  GL_STREAM_DRAW);
314 
315  glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _elementsHandle);
316  glBufferData(GL_ELEMENT_ARRAY_BUFFER,
317  (GLsizeiptr)cmd_list->IdxBuffer.Size * (GLsizeiptr)sizeof(ImDrawIdx),
318  (const GLvoid*)cmd_list->IdxBuffer.Data,
319  GL_STREAM_DRAW);
320 
321  for (int cmd_i = 0; cmd_i < cmd_list->CmdBuffer.Size; cmd_i++)
322  {
323  const ImDrawCmd* pcmd = &cmd_list->CmdBuffer[cmd_i];
324  if (pcmd->UserCallback)
325  {
326  pcmd->UserCallback(cmd_list, pcmd);
327  }
328  else
329  {
330  glBindTexture(GL_TEXTURE_2D, (GLuint)(intptr_t)pcmd->TextureId);
331 
332  if (viewportRect.isEmpty())
333  glScissor((int)pcmd->ClipRect.x,
334  (int)(fbHeight - pcmd->ClipRect.w),
335  (int)(pcmd->ClipRect.z - pcmd->ClipRect.x),
336  (int)(pcmd->ClipRect.w - pcmd->ClipRect.y));
337  else
338  glScissor((GLsizei)(viewportRect.x * io.DisplayFramebufferScale.x),
339  (GLsizei)(viewportRect.y * io.DisplayFramebufferScale.y),
340  (GLsizei)(viewportRect.width * io.DisplayFramebufferScale.x),
341  (GLsizei)(viewportRect.height * io.DisplayFramebufferScale.y));
342 
343  glDrawElements(GL_TRIANGLES,
344  (GLsizei)pcmd->ElemCount,
345  sizeof(ImDrawIdx) == 2 ? GL_UNSIGNED_SHORT : GL_UNSIGNED_INT,
346  idx_buffer_offset);
347  }
348  idx_buffer_offset += pcmd->ElemCount;
349  }
350  }
351 
352  // Restore modified GL state
353  glUseProgram((SLuint)last_program);
354  glBindTexture(GL_TEXTURE_2D, (SLuint)last_texture);
355  glActiveTexture((SLuint)last_active_texture);
356  glBindVertexArray((SLuint)last_vertex_array);
357  glBindBuffer(GL_ARRAY_BUFFER, (SLuint)last_array_buffer);
358  glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, (SLuint)last_element_array_buffer);
359  glBlendEquationSeparate((SLuint)last_blend_equation_rgb,
360  (SLuint)last_blend_equation_alpha);
361  glBlendFuncSeparate((SLuint)last_blend_src_rgb,
362  (SLuint)last_blend_dst_rgb,
363  (SLuint)last_blend_src_alpha,
364  (SLuint)last_blend_dst_alpha);
365  if (last_enable_blend)
366  glEnable(GL_BLEND);
367  else
368  glDisable(GL_BLEND);
369 
370  if (last_enable_cull_face)
371  glEnable(GL_CULL_FACE);
372  else
373  glDisable(GL_CULL_FACE);
374 
375  if (last_enable_depth_test)
376  glEnable(GL_DEPTH_TEST);
377  else
378  glDisable(GL_DEPTH_TEST);
379 
380  if (last_enable_scissor_test)
381  glEnable(GL_SCISSOR_TEST);
382  else
383  glDisable(GL_SCISSOR_TEST);
384 
385  glViewport(last_viewport[0],
386  last_viewport[1],
387  (GLsizei)last_viewport[2],
388  (GLsizei)last_viewport[3]);
389 
390  glScissor(last_scissor_box[0],
391  last_scissor_box[1],
392  (GLsizei)last_scissor_box[2],
393  (GLsizei)last_scissor_box[3]);
394 
395  ImGui::SetCurrentContext(nullptr);
396 }
T width
Definition: SLRect.h:29
T y
Definition: SLRect.h:29
SLbool isEmpty() const
Definition: SLRect.h:74
T x
Definition: SLRect.h:29
T height
Definition: SLRect.h:29

Member Data Documentation

◆ _attribLocColor

int ImGuiRendererOpenGL::_attribLocColor {0}
private

OpenGL attribute location for color.

Definition at line 80 of file ImGuiWrapper.h.

◆ _attribLocPosition

int ImGuiRendererOpenGL::_attribLocPosition {0}
private

OpenGL attribute location for vertex pos.

Definition at line 78 of file ImGuiWrapper.h.

◆ _attribLocProjMtx

int ImGuiRendererOpenGL::_attribLocProjMtx {0}
private

OpenGL attribute location for ???

Definition at line 77 of file ImGuiWrapper.h.

◆ _attribLocTex

int ImGuiRendererOpenGL::_attribLocTex {0}
private

OpenGL attribute location for texture.

Definition at line 76 of file ImGuiWrapper.h.

◆ _attribLocUV

int ImGuiRendererOpenGL::_attribLocUV {0}
private

OpenGL attribute location for texture coords.

Definition at line 79 of file ImGuiWrapper.h.

◆ _elementsHandle

unsigned int ImGuiRendererOpenGL::_elementsHandle {0}
private

OpenGL handle for vertex indexes.

Definition at line 83 of file ImGuiWrapper.h.

◆ _fontTexture

unsigned int ImGuiRendererOpenGL::_fontTexture {0}
private

OpenGL texture id for font.

Definition at line 72 of file ImGuiWrapper.h.

◆ _fragHandle

int ImGuiRendererOpenGL::_fragHandle {0}
private

OpenGL handle for fragment shader.

Definition at line 75 of file ImGuiWrapper.h.

◆ _progHandle

int ImGuiRendererOpenGL::_progHandle {0}
private

OpenGL handle for shader program.

Definition at line 73 of file ImGuiWrapper.h.

◆ _vaoHandle

unsigned int ImGuiRendererOpenGL::_vaoHandle {0}
private

OpenGL vertex array object handle.

Definition at line 82 of file ImGuiWrapper.h.

◆ _vboHandle

unsigned int ImGuiRendererOpenGL::_vboHandle {0}
private

OpenGL handle for vertex buffer object.

Definition at line 81 of file ImGuiWrapper.h.

◆ _vertHandle

int ImGuiRendererOpenGL::_vertHandle {0}
private

OpenGL handle for vertex shader.

Definition at line 74 of file ImGuiWrapper.h.


The documentation for this class was generated from the following files: