6#include "Karma/Renderer/Scene.h"
8#define KGGUI_IMPL_OPENGL_USE_VERTEX_ARRAY
13typedef signed long long int khronos_ssize_t;
15typedef signed long int khronos_ssize_t;
18typedef unsigned int GLuint;
21typedef khronos_ssize_t GLsizeiptr;
38 char GlslVersionString[32];
41 std::vector<MesaDecalData> openglMesaDecalDataList;
43 GLint AttribLocationTex;
44 GLint AttribLocationProjMtx;
45 GLuint AttribLocationVtxPos;
46 GLuint AttribLocationVtxUV;
47 GLuint AttribLocationVtxColor;
48 unsigned int VboHandle, ElementsHandle;
49 GLsizeiptr VertexBufferSize;
50 GLsizeiptr IndexBufferSize;
52 bool UseBufferSubData;
57#ifndef KGGUI_IMPL_OPENGL_USE_VERTEX_ARRAY
58 struct ImGui_ImplOpenGL3_VtxAttribState
60 GLint Enabled, Size, Type, Normalized, Stride;
63 void GetState(GLint index)
65 glGetVertexAttribiv(index, GL_VERTEX_ATTRIB_ARRAY_ENABLED, &Enabled);
66 glGetVertexAttribiv(index, GL_VERTEX_ATTRIB_ARRAY_SIZE, &Size);
67 glGetVertexAttribiv(index, GL_VERTEX_ATTRIB_ARRAY_TYPE, &Type);
68 glGetVertexAttribiv(index, GL_VERTEX_ATTRIB_ARRAY_NORMALIZED, &Normalized);
69 glGetVertexAttribiv(index, GL_VERTEX_ATTRIB_ARRAY_STRIDE, &Stride);
70 glGetVertexAttribPointerv(index, GL_VERTEX_ATTRIB_ARRAY_POINTER, &Ptr);
72 void SetState(GLint index)
74 glVertexAttribPointer(index, Size, Type, (GLboolean)Normalized, Stride, Ptr);
75 if (Enabled) glEnableVertexAttribArray(index);
else glDisableVertexAttribArray(index);
84 static bool KarmaGui_ImplOpenGL3_Init(
const char* glsl_version = NULL);
85 static void KarmaGui_ImplOpenGL3_Shutdown();
86 static void KarmaGui_ImplOpenGL3_NewFrame();
87 static void KarmaGui_ImplOpenGL3_RenderDrawData(
KGDrawData* draw_data);
94 static void KarmaGui_ImplOpenGL3_SetupRenderState(
KGDrawData* draw_data,
int fb_width,
int fb_height, GLuint vertex_array_object);
95 static void KarmaGui_ImpOpenGL3_SetupRenderStateFor3DRendering(
Scene* sceneToDraw,
KGDrawData* drawData);
96 static bool CheckShader(GLuint handle,
const char* desc);
97 static bool CheckProgram(GLuint handle,
const char* desc);
98 static void KarmaGui_ImplOpenGL3_RenderWindow(
KarmaGuiViewport* viewport,
void*);
99 static void KarmaGui_ImplOpenGL3_InitPlatformInterface();
100 static void KarmaGui_ImplOpenGL3_ShutdownPlatformInterface();
101 static void KarmaGui_ImplOpenGL3_CreateTexture(
char const* fileName,
const std::string& label =
"");
104 static bool KarmaGui_ImplOpenGL3_CreateFontsTexture();
105 static void KarmaGui_ImplOpenGL3_DestroyFontsTexture();
106 static bool KarmaGui_ImplOpenGL3_CreateDeviceObjects();
107 static void KarmaGui_ImplOpenGL3_DestroyDeviceObjects();
Definition KarmaGuiOpenGLHandler.h:81
Definition KarmaGui.h:2647
Definition KarmaGui.h:2948
Definition KarmaGuiOpenGLHandler.h:36
Definition KarmaGuiOpenGLHandler.h:28