Path Tracing
Loading...
Searching...
No Matches
imgui_impl_opengl3_loader.h
Go to the documentation of this file.
1//-----------------------------------------------------------------------------
2// About imgui_impl_opengl3_loader.h:
3//
4// We embed our own OpenGL loader to not require user to provide their own or to have to use ours,
5// which proved to be endless problems for users.
6// Our loader is custom-generated, based on gl3w but automatically filtered to only include
7// enums/functions that we use in our imgui_impl_opengl3.cpp source file in order to be small.
8//
9// YOU SHOULD NOT NEED TO INCLUDE/USE THIS DIRECTLY. THIS IS USED BY imgui_impl_opengl3.cpp ONLY.
10// THE REST OF YOUR APP SHOULD USE A DIFFERENT GL LOADER: ANY GL LOADER OF YOUR CHOICE.
11//
12// IF YOU GET BUILD ERRORS IN THIS FILE (commonly macro redefinitions or function redefinitions):
13// IT LIKELY MEANS THAT YOU ARE BUILDING 'imgui_impl_opengl3.cpp' OR INCLUDING 'imgui_impl_opengl3_loader.h'
14// IN THE SAME COMPILATION UNIT AS ONE OF YOUR FILE WHICH IS USING A THIRD-PARTY OPENGL LOADER.
15// (e.g. COULD HAPPEN IF YOU ARE DOING A UNITY/JUMBO BUILD, OR INCLUDING .CPP FILES FROM OTHERS)
16// YOU SHOULD NOT BUILD BOTH IN THE SAME COMPILATION UNIT.
17// BUT IF YOU REALLY WANT TO, you can '#define IMGUI_IMPL_OPENGL_LOADER_CUSTOM' and imgui_impl_opengl3.cpp
18// WILL NOT BE USING OUR LOADER, AND INSTEAD EXPECT ANOTHER/YOUR LOADER TO BE AVAILABLE IN THE COMPILATION UNIT.
19//
20// Regenerate with:
21// python3 gl3w_gen.py --output ../imgui/backends/imgui_impl_opengl3_loader.h --ref ../imgui/backends/imgui_impl_opengl3.cpp ./extra_symbols.txt
22//
23// More info:
24// https://github.com/dearimgui/gl3w_stripped
25// https://github.com/ocornut/imgui/issues/4445
26//-----------------------------------------------------------------------------
27
28/*
29 * This file was generated with gl3w_gen.py, part of imgl3w
30 * (hosted at https://github.com/dearimgui/gl3w_stripped)
31 *
32 * This is free and unencumbered software released into the public domain.
33 *
34 * Anyone is free to copy, modify, publish, use, compile, sell, or
35 * distribute this software, either in source code form or as a compiled
36 * binary, for any purpose, commercial or non-commercial, and by any
37 * means.
38 *
39 * In jurisdictions that recognize copyright laws, the author or authors
40 * of this software dedicate any and all copyright interest in the
41 * software to the public domain. We make this dedication for the benefit
42 * of the public at large and to the detriment of our heirs and
43 * successors. We intend this dedication to be an overt act of
44 * relinquishment in perpetuity of all present and future rights to this
45 * software under copyright law.
46 *
47 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
48 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
49 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
50 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
51 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
52 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
53 * OTHER DEALINGS IN THE SOFTWARE.
54 */
55
56#ifndef __gl3w_h_
57#define __gl3w_h_
58
59// Adapted from KHR/khrplatform.h to avoid including entire file.
60#ifndef __khrplatform_h_
61typedef float khronos_float_t;
62typedef signed char khronos_int8_t;
63typedef unsigned char khronos_uint8_t;
64typedef signed short int khronos_int16_t;
65typedef unsigned short int khronos_uint16_t;
66#ifdef _WIN64
67typedef signed long long int khronos_intptr_t;
68typedef signed long long int khronos_ssize_t;
69#else
70typedef signed long int khronos_intptr_t;
71typedef signed long int khronos_ssize_t;
72#endif
73
74#if defined(_MSC_VER) && !defined(__clang__)
75typedef signed __int64 khronos_int64_t;
76typedef unsigned __int64 khronos_uint64_t;
77#elif (defined(__clang__) || defined(__GNUC__)) && (__cplusplus < 201100)
78#include <stdint.h>
79typedef int64_t khronos_int64_t;
80typedef uint64_t khronos_uint64_t;
81#else
82typedef signed long long khronos_int64_t;
83typedef unsigned long long khronos_uint64_t;
84#endif
85#endif // __khrplatform_h_
86
87#ifndef __gl_glcorearb_h_
88#define __gl_glcorearb_h_ 1
89#ifdef __cplusplus
90extern "C" {
91#endif
92/*
93** Copyright 2013-2020 The Khronos Group Inc.
94** SPDX-License-Identifier: MIT
95**
96** This header is generated from the Khronos OpenGL / OpenGL ES XML
97** API Registry. The current version of the Registry, generator scripts
98** used to make the header, and the header can be found at
99** https://github.com/KhronosGroup/OpenGL-Registry
100*/
101#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
102#ifndef WIN32_LEAN_AND_MEAN
103#define WIN32_LEAN_AND_MEAN 1
104#endif
105#include <windows.h>
106#endif
107#ifndef APIENTRY
108#define APIENTRY
109#endif
110#ifndef APIENTRYP
111#define APIENTRYP APIENTRY *
112#endif
113#ifndef GLAPI
114#define GLAPI extern
115#endif
116/* glcorearb.h is for use with OpenGL core profile implementations.
117** It should should be placed in the same directory as gl.h and
118** included as <GL/glcorearb.h>.
119**
120** glcorearb.h includes only APIs in the latest OpenGL core profile
121** implementation together with APIs in newer ARB extensions which
122** can be supported by the core profile. It does not, and never will
123** include functionality removed from the core profile, such as
124** fixed-function vertex and fragment processing.
125**
126** Do not #include both <GL/glcorearb.h> and either of <GL/gl.h> or
127** <GL/glext.h> in the same source file.
128*/
129/* Generated C header for:
130 * API: gl
131 * Profile: core
132 * Versions considered: .*
133 * Versions emitted: .*
134 * Default extensions included: glcore
135 * Additional extensions included: _nomatch_^
136 * Extensions removed: _nomatch_^
137 */
138#ifndef GL_VERSION_1_0
139typedef void GLvoid;
140typedef unsigned int GLenum;
141
143typedef int GLint;
144typedef int GLsizei;
145typedef unsigned int GLbitfield;
146typedef double GLdouble;
147typedef unsigned int GLuint;
148typedef unsigned char GLboolean;
150#define GL_COLOR_BUFFER_BIT 0x00004000
151#define GL_FALSE 0
152#define GL_TRUE 1
153#define GL_TRIANGLES 0x0004
154#define GL_ONE 1
155#define GL_SRC_ALPHA 0x0302
156#define GL_ONE_MINUS_SRC_ALPHA 0x0303
157#define GL_FRONT 0x0404
158#define GL_BACK 0x0405
159#define GL_FRONT_AND_BACK 0x0408
160#define GL_POLYGON_MODE 0x0B40
161#define GL_CULL_FACE 0x0B44
162#define GL_DEPTH_TEST 0x0B71
163#define GL_STENCIL_TEST 0x0B90
164#define GL_VIEWPORT 0x0BA2
165#define GL_BLEND 0x0BE2
166#define GL_SCISSOR_BOX 0x0C10
167#define GL_SCISSOR_TEST 0x0C11
168#define GL_UNPACK_ROW_LENGTH 0x0CF2
169#define GL_UNPACK_ALIGNMENT 0x0CF5
170#define GL_PACK_ALIGNMENT 0x0D05
171#define GL_MAX_TEXTURE_SIZE 0x0D33
172#define GL_TEXTURE_2D 0x0DE1
173#define GL_UNSIGNED_BYTE 0x1401
174#define GL_UNSIGNED_SHORT 0x1403
175#define GL_UNSIGNED_INT 0x1405
176#define GL_FLOAT 0x1406
177#define GL_RGBA 0x1908
178#define GL_FILL 0x1B02
179#define GL_VENDOR 0x1F00
180#define GL_RENDERER 0x1F01
181#define GL_VERSION 0x1F02
182#define GL_EXTENSIONS 0x1F03
183#define GL_NEAREST 0x2600
184#define GL_LINEAR 0x2601
185#define GL_TEXTURE_MAG_FILTER 0x2800
186#define GL_TEXTURE_MIN_FILTER 0x2801
187#define GL_TEXTURE_WRAP_S 0x2802
188#define GL_TEXTURE_WRAP_T 0x2803
189#define GL_REPEAT 0x2901
190typedef void (APIENTRYP PFNGLPOLYGONMODEPROC) (GLenum face, GLenum mode);
191typedef void (APIENTRYP PFNGLSCISSORPROC) (GLint x, GLint y, GLsizei width, GLsizei height);
192typedef void (APIENTRYP PFNGLTEXPARAMETERIPROC) (GLenum target, GLenum pname, GLint param);
194typedef void (APIENTRYP PFNGLCLEARPROC) (GLbitfield mask);
195typedef void (APIENTRYP PFNGLCLEARCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
196typedef void (APIENTRYP PFNGLDISABLEPROC) (GLenum cap);
197typedef void (APIENTRYP PFNGLENABLEPROC) (GLenum cap);
198typedef void (APIENTRYP PFNGLFLUSHPROC) (void);
199typedef void (APIENTRYP PFNGLPIXELSTOREIPROC) (GLenum pname, GLint param);
200typedef void (APIENTRYP PFNGLREADPIXELSPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels);
201typedef GLenum (APIENTRYP PFNGLGETERRORPROC) (void);
202typedef void (APIENTRYP PFNGLGETINTEGERVPROC) (GLenum pname, GLint *data);
204typedef GLboolean (APIENTRYP PFNGLISENABLEDPROC) (GLenum cap);
205typedef void (APIENTRYP PFNGLVIEWPORTPROC) (GLint x, GLint y, GLsizei width, GLsizei height);
206#ifdef GL_GLEXT_PROTOTYPES
211GLAPI void APIENTRY glClear (GLbitfield mask);
213GLAPI void APIENTRY glDisable (GLenum cap);
214GLAPI void APIENTRY glEnable (GLenum cap);
215GLAPI void APIENTRY glFlush (void);
223#endif
224#endif /* GL_VERSION_1_0 */
225#ifndef GL_VERSION_1_1
227typedef double GLclampd;
228#define GL_TEXTURE_BINDING_2D 0x8069
229typedef void (APIENTRYP PFNGLDRAWELEMENTSPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices);
230typedef void (APIENTRYP PFNGLTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
231typedef void (APIENTRYP PFNGLBINDTEXTUREPROC) (GLenum target, GLuint texture);
232typedef void (APIENTRYP PFNGLDELETETEXTURESPROC) (GLsizei n, const GLuint *textures);
233typedef void (APIENTRYP PFNGLGENTEXTURESPROC) (GLsizei n, GLuint *textures);
234#ifdef GL_GLEXT_PROTOTYPES
240#endif
241#endif /* GL_VERSION_1_1 */
242#ifndef GL_VERSION_1_2
243#define GL_CLAMP_TO_EDGE 0x812F
244#endif /* GL_VERSION_1_2 */
245#ifndef GL_VERSION_1_3
246#define GL_TEXTURE0 0x84C0
247#define GL_ACTIVE_TEXTURE 0x84E0
248typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
249#ifdef GL_GLEXT_PROTOTYPES
251#endif
252#endif /* GL_VERSION_1_3 */
253#ifndef GL_VERSION_1_4
254#define GL_BLEND_DST_RGB 0x80C8
255#define GL_BLEND_SRC_RGB 0x80C9
256#define GL_BLEND_DST_ALPHA 0x80CA
257#define GL_BLEND_SRC_ALPHA 0x80CB
258#define GL_FUNC_ADD 0x8006
259typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
260typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
261#ifdef GL_GLEXT_PROTOTYPES
264#endif
265#endif /* GL_VERSION_1_4 */
266#ifndef GL_VERSION_1_5
269#define GL_ARRAY_BUFFER 0x8892
270#define GL_ELEMENT_ARRAY_BUFFER 0x8893
271#define GL_ARRAY_BUFFER_BINDING 0x8894
272#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
273#define GL_STREAM_DRAW 0x88E0
274typedef void (APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer);
275typedef void (APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers);
276typedef void (APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers);
277typedef void (APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const void *data, GLenum usage);
278typedef void (APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
279#ifdef GL_GLEXT_PROTOTYPES
283GLAPI void APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void *data, GLenum usage);
285#endif
286#endif /* GL_VERSION_1_5 */
287#ifndef GL_VERSION_2_0
288typedef char GLchar;
292#define GL_BLEND_EQUATION_RGB 0x8009
293#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
294#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
295#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
296#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
297#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
298#define GL_BLEND_EQUATION_ALPHA 0x883D
299#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
300#define GL_FRAGMENT_SHADER 0x8B30
301#define GL_VERTEX_SHADER 0x8B31
302#define GL_COMPILE_STATUS 0x8B81
303#define GL_LINK_STATUS 0x8B82
304#define GL_INFO_LOG_LENGTH 0x8B84
305#define GL_CURRENT_PROGRAM 0x8B8D
306#define GL_UPPER_LEFT 0x8CA2
307typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha);
308typedef void (APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader);
309typedef void (APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader);
310typedef GLuint (APIENTRYP PFNGLCREATEPROGRAMPROC) (void);
311typedef GLuint (APIENTRYP PFNGLCREATESHADERPROC) (GLenum type);
312typedef void (APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program);
313typedef void (APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader);
314typedef void (APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader);
315typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index);
316typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index);
317typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name);
318typedef void (APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params);
319typedef void (APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
320typedef void (APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params);
321typedef void (APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
322typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name);
323typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params);
324typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, void **pointer);
325typedef GLboolean (APIENTRYP PFNGLISPROGRAMPROC) (GLuint program);
326typedef void (APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program);
327typedef void (APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);
328typedef void (APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program);
329typedef void (APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0);
330typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
331typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
332#ifdef GL_GLEXT_PROTOTYPES
338GLAPI void APIENTRY glDeleteProgram (GLuint program);
352GLAPI void APIENTRY glLinkProgram (GLuint program);
353GLAPI void APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);
354GLAPI void APIENTRY glUseProgram (GLuint program);
355GLAPI void APIENTRY glUniform1i (GLint location, GLint v0);
358#endif
359#endif /* GL_VERSION_2_0 */
360#ifndef GL_VERSION_2_1
361#define GL_PIXEL_UNPACK_BUFFER 0x88EC
362#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF
363#endif /* GL_VERSION_2_1 */
364#ifndef GL_VERSION_3_0
366#define GL_MAJOR_VERSION 0x821B
367#define GL_MINOR_VERSION 0x821C
368#define GL_NUM_EXTENSIONS 0x821D
369#define GL_FRAMEBUFFER_SRGB 0x8DB9
370#define GL_VERTEX_ARRAY_BINDING 0x85B5
371typedef void (APIENTRYP PFNGLGETBOOLEANI_VPROC) (GLenum target, GLuint index, GLboolean *data);
372typedef void (APIENTRYP PFNGLGETINTEGERI_VPROC) (GLenum target, GLuint index, GLint *data);
374typedef void (APIENTRYP PFNGLBINDVERTEXARRAYPROC) (GLuint array);
375typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSPROC) (GLsizei n, const GLuint *arrays);
376typedef void (APIENTRYP PFNGLGENVERTEXARRAYSPROC) (GLsizei n, GLuint *arrays);
377#ifdef GL_GLEXT_PROTOTYPES
382#endif
383#endif /* GL_VERSION_3_0 */
384#ifndef GL_VERSION_3_1
385#define GL_VERSION_3_1 1
386#define GL_PRIMITIVE_RESTART 0x8F9D
387#endif /* GL_VERSION_3_1 */
388#ifndef GL_VERSION_3_2
389#define GL_VERSION_3_2 1
390typedef struct __GLsync *GLsync;
393#define GL_CONTEXT_COMPATIBILITY_PROFILE_BIT 0x00000002
394#define GL_CONTEXT_PROFILE_MASK 0x9126
395typedef void (APIENTRYP PFNGLDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex);
396typedef void (APIENTRYP PFNGLGETINTEGER64I_VPROC) (GLenum target, GLuint index, GLint64 *data);
397#ifdef GL_GLEXT_PROTOTYPES
399#endif
400#endif /* GL_VERSION_3_2 */
401#ifndef GL_VERSION_3_3
402#define GL_VERSION_3_3 1
403#define GL_SAMPLER_BINDING 0x8919
404typedef void (APIENTRYP PFNGLGENSAMPLERSPROC) (GLsizei count, GLuint *samplers);
405typedef void (APIENTRYP PFNGLDELETESAMPLERSPROC) (GLsizei count, const GLuint *samplers);
406typedef void (APIENTRYP PFNGLBINDSAMPLERPROC) (GLuint unit, GLuint sampler);
407typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIPROC) (GLuint sampler, GLenum pname, GLint param);
408#ifdef GL_GLEXT_PROTOTYPES
413#endif
414#endif /* GL_VERSION_3_3 */
415#ifndef GL_VERSION_4_1
416typedef void (APIENTRYP PFNGLGETFLOATI_VPROC) (GLenum target, GLuint index, GLfloat *data);
417typedef void (APIENTRYP PFNGLGETDOUBLEI_VPROC) (GLenum target, GLuint index, GLdouble *data);
418#endif /* GL_VERSION_4_1 */
419#ifndef GL_VERSION_4_3
420typedef void (APIENTRY *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
421#endif /* GL_VERSION_4_3 */
422#ifndef GL_VERSION_4_5
423#define GL_CLIP_ORIGIN 0x935C
424typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKI_VPROC) (GLuint xfb, GLenum pname, GLuint index, GLint *param);
425typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKI64_VPROC) (GLuint xfb, GLenum pname, GLuint index, GLint64 *param);
426#endif /* GL_VERSION_4_5 */
427#ifndef GL_ARB_bindless_texture
429#endif /* GL_ARB_bindless_texture */
430#ifndef GL_ARB_cl_event
431struct _cl_context;
432struct _cl_event;
433#endif /* GL_ARB_cl_event */
434#ifndef GL_ARB_clip_control
435#define GL_ARB_clip_control 1
436#endif /* GL_ARB_clip_control */
437#ifndef GL_ARB_debug_output
438typedef void (APIENTRY *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
439#endif /* GL_ARB_debug_output */
440#ifndef GL_EXT_EGL_image_storage
441typedef void *GLeglImageOES;
442#endif /* GL_EXT_EGL_image_storage */
443#ifndef GL_EXT_direct_state_access
444typedef void (APIENTRYP PFNGLGETFLOATI_VEXTPROC) (GLenum pname, GLuint index, GLfloat *params);
445typedef void (APIENTRYP PFNGLGETDOUBLEI_VEXTPROC) (GLenum pname, GLuint index, GLdouble *params);
446typedef void (APIENTRYP PFNGLGETPOINTERI_VEXTPROC) (GLenum pname, GLuint index, void **params);
447typedef void (APIENTRYP PFNGLGETVERTEXARRAYINTEGERI_VEXTPROC) (GLuint vaobj, GLuint index, GLenum pname, GLint *param);
448typedef void (APIENTRYP PFNGLGETVERTEXARRAYPOINTERI_VEXTPROC) (GLuint vaobj, GLuint index, GLenum pname, void **param);
449#endif /* GL_EXT_direct_state_access */
450#ifndef GL_NV_draw_vulkan_image
452#endif /* GL_NV_draw_vulkan_image */
453#ifndef GL_NV_gpu_shader5
455#endif /* GL_NV_gpu_shader5 */
456#ifndef GL_NV_vertex_buffer_unified_memory
457typedef void (APIENTRYP PFNGLGETINTEGERUI64I_VNVPROC) (GLenum value, GLuint index, GLuint64EXT *result);
458#endif /* GL_NV_vertex_buffer_unified_memory */
459#ifdef __cplusplus
460}
461#endif
462#endif
463
464#ifndef GL3W_API
465#define GL3W_API
466#endif
467
468#ifndef __gl_h_
469#define __gl_h_
470#endif
471
472#ifdef __cplusplus
473extern "C" {
474#endif
475
476#define GL3W_OK 0
477#define GL3W_ERROR_INIT -1
478#define GL3W_ERROR_LIBRARY_OPEN -2
479#define GL3W_ERROR_OPENGL_VERSION -3
480
481typedef void (*GL3WglProc)(void);
482typedef GL3WglProc (*GL3WGetProcAddressProc)(const char *proc);
483
484/* gl3w api */
488GL3W_API int imgl3wIsSupported(int major, int minor);
490
491/* gl3w internal state */
494 struct {
495 PFNGLACTIVETEXTUREPROC ActiveTexture;
496 PFNGLATTACHSHADERPROC AttachShader;
497 PFNGLBINDBUFFERPROC BindBuffer;
498 PFNGLBINDSAMPLERPROC BindSampler;
499 PFNGLBINDTEXTUREPROC BindTexture;
500 PFNGLBINDVERTEXARRAYPROC BindVertexArray;
501 PFNGLBLENDEQUATIONPROC BlendEquation;
502 PFNGLBLENDEQUATIONSEPARATEPROC BlendEquationSeparate;
503 PFNGLBLENDFUNCSEPARATEPROC BlendFuncSeparate;
504 PFNGLBUFFERDATAPROC BufferData;
505 PFNGLBUFFERSUBDATAPROC BufferSubData;
506 PFNGLCLEARPROC Clear;
507 PFNGLCLEARCOLORPROC ClearColor;
508 PFNGLCOMPILESHADERPROC CompileShader;
509 PFNGLCREATEPROGRAMPROC CreateProgram;
510 PFNGLCREATESHADERPROC CreateShader;
511 PFNGLDELETEBUFFERSPROC DeleteBuffers;
512 PFNGLDELETEPROGRAMPROC DeleteProgram;
513 PFNGLDELETESAMPLERSPROC DeleteSamplers;
514 PFNGLDELETESHADERPROC DeleteShader;
515 PFNGLDELETETEXTURESPROC DeleteTextures;
516 PFNGLDELETEVERTEXARRAYSPROC DeleteVertexArrays;
517 PFNGLDETACHSHADERPROC DetachShader;
518 PFNGLDISABLEPROC Disable;
519 PFNGLDISABLEVERTEXATTRIBARRAYPROC DisableVertexAttribArray;
520 PFNGLDRAWELEMENTSPROC DrawElements;
521 PFNGLDRAWELEMENTSBASEVERTEXPROC DrawElementsBaseVertex;
522 PFNGLENABLEPROC Enable;
523 PFNGLENABLEVERTEXATTRIBARRAYPROC EnableVertexAttribArray;
524 PFNGLFLUSHPROC Flush;
525 PFNGLGENBUFFERSPROC GenBuffers;
526 PFNGLGENSAMPLERSPROC GenSamplers;
527 PFNGLGENTEXTURESPROC GenTextures;
528 PFNGLGENVERTEXARRAYSPROC GenVertexArrays;
529 PFNGLGETATTRIBLOCATIONPROC GetAttribLocation;
530 PFNGLGETERRORPROC GetError;
531 PFNGLGETINTEGERVPROC GetIntegerv;
532 PFNGLGETPROGRAMINFOLOGPROC GetProgramInfoLog;
533 PFNGLGETPROGRAMIVPROC GetProgramiv;
534 PFNGLGETSHADERINFOLOGPROC GetShaderInfoLog;
535 PFNGLGETSHADERIVPROC GetShaderiv;
538 PFNGLGETUNIFORMLOCATIONPROC GetUniformLocation;
539 PFNGLGETVERTEXATTRIBPOINTERVPROC GetVertexAttribPointerv;
540 PFNGLGETVERTEXATTRIBIVPROC GetVertexAttribiv;
541 PFNGLISENABLEDPROC IsEnabled;
542 PFNGLISPROGRAMPROC IsProgram;
543 PFNGLLINKPROGRAMPROC LinkProgram;
544 PFNGLPIXELSTOREIPROC PixelStorei;
545 PFNGLPOLYGONMODEPROC PolygonMode;
546 PFNGLREADPIXELSPROC ReadPixels;
547 PFNGLSAMPLERPARAMETERIPROC SamplerParameteri;
548 PFNGLSCISSORPROC Scissor;
549 PFNGLSHADERSOURCEPROC ShaderSource;
550 PFNGLTEXIMAGE2DPROC TexImage2D;
551 PFNGLTEXPARAMETERIPROC TexParameteri;
552 PFNGLTEXSUBIMAGE2DPROC TexSubImage2D;
553 PFNGLUNIFORM1IPROC Uniform1i;
554 PFNGLUNIFORMMATRIX4FVPROC UniformMatrix4fv;
555 PFNGLUSEPROGRAMPROC UseProgram;
556 PFNGLVERTEXATTRIBPOINTERPROC VertexAttribPointer;
557 PFNGLVIEWPORTPROC Viewport;
558 } gl;
559};
560
561GL3W_API extern union ImGL3WProcs imgl3wProcs;
562
563/* OpenGL functions */
564#define glActiveTexture imgl3wProcs.gl.ActiveTexture
565#define glAttachShader imgl3wProcs.gl.AttachShader
566#define glBindBuffer imgl3wProcs.gl.BindBuffer
567#define glBindSampler imgl3wProcs.gl.BindSampler
568#define glBindTexture imgl3wProcs.gl.BindTexture
569#define glBindVertexArray imgl3wProcs.gl.BindVertexArray
570#define glBlendEquation imgl3wProcs.gl.BlendEquation
571#define glBlendEquationSeparate imgl3wProcs.gl.BlendEquationSeparate
572#define glBlendFuncSeparate imgl3wProcs.gl.BlendFuncSeparate
573#define glBufferData imgl3wProcs.gl.BufferData
574#define glBufferSubData imgl3wProcs.gl.BufferSubData
575#define glClear imgl3wProcs.gl.Clear
576#define glClearColor imgl3wProcs.gl.ClearColor
577#define glCompileShader imgl3wProcs.gl.CompileShader
578#define glCreateProgram imgl3wProcs.gl.CreateProgram
579#define glCreateShader imgl3wProcs.gl.CreateShader
580#define glDeleteBuffers imgl3wProcs.gl.DeleteBuffers
581#define glDeleteProgram imgl3wProcs.gl.DeleteProgram
582#define glDeleteSamplers imgl3wProcs.gl.DeleteSamplers
583#define glDeleteShader imgl3wProcs.gl.DeleteShader
584#define glDeleteTextures imgl3wProcs.gl.DeleteTextures
585#define glDeleteVertexArrays imgl3wProcs.gl.DeleteVertexArrays
586#define glDetachShader imgl3wProcs.gl.DetachShader
587#define glDisable imgl3wProcs.gl.Disable
588#define glDisableVertexAttribArray imgl3wProcs.gl.DisableVertexAttribArray
589#define glDrawElements imgl3wProcs.gl.DrawElements
590#define glDrawElementsBaseVertex imgl3wProcs.gl.DrawElementsBaseVertex
591#define glEnable imgl3wProcs.gl.Enable
592#define glEnableVertexAttribArray imgl3wProcs.gl.EnableVertexAttribArray
593#define glFlush imgl3wProcs.gl.Flush
594#define glGenBuffers imgl3wProcs.gl.GenBuffers
595#define glGenSamplers imgl3wProcs.gl.GenSamplers
596#define glGenTextures imgl3wProcs.gl.GenTextures
597#define glGenVertexArrays imgl3wProcs.gl.GenVertexArrays
598#define glGetAttribLocation imgl3wProcs.gl.GetAttribLocation
599#define glGetError imgl3wProcs.gl.GetError
600#define glGetIntegerv imgl3wProcs.gl.GetIntegerv
601#define glGetProgramInfoLog imgl3wProcs.gl.GetProgramInfoLog
602#define glGetProgramiv imgl3wProcs.gl.GetProgramiv
603#define glGetShaderInfoLog imgl3wProcs.gl.GetShaderInfoLog
604#define glGetShaderiv imgl3wProcs.gl.GetShaderiv
605#define glGetString imgl3wProcs.gl.GetString
606#define glGetStringi imgl3wProcs.gl.GetStringi
607#define glGetUniformLocation imgl3wProcs.gl.GetUniformLocation
608#define glGetVertexAttribPointerv imgl3wProcs.gl.GetVertexAttribPointerv
609#define glGetVertexAttribiv imgl3wProcs.gl.GetVertexAttribiv
610#define glIsEnabled imgl3wProcs.gl.IsEnabled
611#define glIsProgram imgl3wProcs.gl.IsProgram
612#define glLinkProgram imgl3wProcs.gl.LinkProgram
613#define glPixelStorei imgl3wProcs.gl.PixelStorei
614#define glPolygonMode imgl3wProcs.gl.PolygonMode
615#define glReadPixels imgl3wProcs.gl.ReadPixels
616#define glSamplerParameteri imgl3wProcs.gl.SamplerParameteri
617#define glScissor imgl3wProcs.gl.Scissor
618#define glShaderSource imgl3wProcs.gl.ShaderSource
619#define glTexImage2D imgl3wProcs.gl.TexImage2D
620#define glTexParameteri imgl3wProcs.gl.TexParameteri
621#define glTexSubImage2D imgl3wProcs.gl.TexSubImage2D
622#define glUniform1i imgl3wProcs.gl.Uniform1i
623#define glUniformMatrix4fv imgl3wProcs.gl.UniformMatrix4fv
624#define glUseProgram imgl3wProcs.gl.UseProgram
625#define glVertexAttribPointer imgl3wProcs.gl.VertexAttribPointer
626#define glViewport imgl3wProcs.gl.Viewport
627
628#ifdef __cplusplus
629}
630#endif
631
632#endif
633
634#ifdef IMGL3W_IMPL
635#ifdef __cplusplus
636extern "C" {
637#endif
638
639#include <stdlib.h>
640
641#define GL3W_ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
642
643#if defined(_WIN32)
644#ifndef WIN32_LEAN_AND_MEAN
645#define WIN32_LEAN_AND_MEAN 1
646#endif
647#include <windows.h>
648
649static HMODULE libgl = NULL;
650typedef PROC(__stdcall* GL3WglGetProcAddr)(LPCSTR);
651static GL3WglGetProcAddr wgl_get_proc_address;
652
653static int open_libgl(void)
654{
655 libgl = LoadLibraryA("opengl32.dll");
656 if (!libgl)
658 wgl_get_proc_address = (GL3WglGetProcAddr)GetProcAddress(libgl, "wglGetProcAddress");
659 return GL3W_OK;
660}
661
662static void close_libgl(void) { FreeLibrary(libgl); libgl = NULL; }
663static GL3WglProc get_proc(const char *proc)
664{
665 GL3WglProc res;
666 res = (GL3WglProc)wgl_get_proc_address(proc);
667 if (!res)
668 res = (GL3WglProc)GetProcAddress(libgl, proc);
669 return res;
670}
671#elif defined(__APPLE__)
672#include <dlfcn.h>
673
674static void *libgl = NULL;
675static int open_libgl(void)
676{
677 libgl = dlopen("/System/Library/Frameworks/OpenGL.framework/OpenGL", RTLD_LAZY | RTLD_LOCAL);
678 if (!libgl)
680 return GL3W_OK;
681}
682
683static void close_libgl(void) { dlclose(libgl); libgl = NULL; }
684
685static GL3WglProc get_proc(const char *proc)
686{
687 GL3WglProc res;
688 *(void **)(&res) = dlsym(libgl, proc);
689 return res;
690}
691#else
692#include <dlfcn.h>
693
694static void* libgl; // OpenGL library
695static void* libglx; // GLX library
696static void* libegl; // EGL library
697static GL3WGetProcAddressProc gl_get_proc_address;
698
699static void close_libgl(void)
700{
701 if (libgl) {
702 dlclose(libgl);
703 libgl = NULL;
704 }
705 if (libegl) {
706 dlclose(libegl);
707 libegl = NULL;
708 }
709 if (libglx) {
710 dlclose(libglx);
711 libglx = NULL;
712 }
713}
714
715static int is_library_loaded(const char* name, void** lib)
716{
717#if defined(__HAIKU__)
718 *lib = NULL; // no support for RTLD_NOLOAD on Haiku.
719#else
720 *lib = dlopen(name, RTLD_LAZY | RTLD_LOCAL | RTLD_NOLOAD);
721#endif
722 return *lib != NULL;
723}
724
725static int open_libs(void)
726{
727 // On Linux we have two APIs to get process addresses: EGL and GLX.
728 // EGL is supported under both X11 and Wayland, whereas GLX is X11-specific.
729
730 libgl = NULL;
731 libegl = NULL;
732 libglx = NULL;
733
734 // First check what's already loaded, the windowing library might have
735 // already loaded either EGL or GLX and we want to use the same one.
736
737 if (is_library_loaded("libEGL.so.1", &libegl) ||
738 is_library_loaded("libGLX.so.0", &libglx)) {
739 libgl = dlopen("libOpenGL.so.0", RTLD_LAZY | RTLD_LOCAL);
740 if (libgl)
741 return GL3W_OK;
742 else
743 close_libgl();
744 }
745
746 if (is_library_loaded("libGL.so", &libgl))
747 return GL3W_OK;
748 if (is_library_loaded("libGL.so.1", &libgl))
749 return GL3W_OK;
750 if (is_library_loaded("libGL.so.3", &libgl))
751 return GL3W_OK;
752
753 // Neither is already loaded, so we have to load one. Try EGL first
754 // because it is supported under both X11 and Wayland.
755
756 // Load OpenGL + EGL
757 libgl = dlopen("libOpenGL.so.0", RTLD_LAZY | RTLD_LOCAL);
758 libegl = dlopen("libEGL.so.1", RTLD_LAZY | RTLD_LOCAL);
759 if (libgl && libegl)
760 return GL3W_OK;
761 else
762 close_libgl();
763
764 // Fall back to legacy libGL, which includes GLX
765 // While most systems use libGL.so.1, NetBSD seems to use that libGL.so.3. See https://github.com/ocornut/imgui/issues/6983
766 libgl = dlopen("libGL.so", RTLD_LAZY | RTLD_LOCAL);
767 if (!libgl)
768 libgl = dlopen("libGL.so.1", RTLD_LAZY | RTLD_LOCAL);
769 if (!libgl)
770 libgl = dlopen("libGL.so.3", RTLD_LAZY | RTLD_LOCAL);
771
772 if (libgl)
773 return GL3W_OK;
774
776}
777
778static int open_libgl(void)
779{
780 int res = open_libs();
781 if (res)
782 return res;
783
784 if (libegl)
785 *(void**)(&gl_get_proc_address) = dlsym(libegl, "eglGetProcAddress");
786 else if (libglx)
787 *(void**)(&gl_get_proc_address) = dlsym(libglx, "glXGetProcAddressARB");
788 else
789 *(void**)(&gl_get_proc_address) = dlsym(libgl, "glXGetProcAddressARB");
790
791 if (!gl_get_proc_address) {
792 close_libgl();
794 }
795
796 return GL3W_OK;
797}
798
799static GL3WglProc get_proc(const char* proc)
800{
801 GL3WglProc res = NULL;
802
803 // Before EGL version 1.5, eglGetProcAddress doesn't support querying core
804 // functions and may return a dummy function if we try, so try to load the
805 // function from the GL library directly first.
806 if (libegl)
807 *(void**)(&res) = dlsym(libgl, proc);
808
809 if (!res)
810 res = gl_get_proc_address(proc);
811
812 if (!libegl && !res)
813 *(void**)(&res) = dlsym(libgl, proc);
814
815 return res;
816}
817#endif
818
819static struct { int major, minor; } version;
820
821static int parse_version(void)
822{
823 if (!glGetIntegerv)
824 return GL3W_ERROR_INIT;
825 glGetIntegerv(GL_MAJOR_VERSION, &version.major);
826 glGetIntegerv(GL_MINOR_VERSION, &version.minor);
827 if (version.major == 0 && version.minor == 0)
828 {
829 // Query GL_VERSION in desktop GL 2.x, the string will start with "<major>.<minor>"
830 if (const char* gl_version = (const char*)glGetString(GL_VERSION))
831 sscanf(gl_version, "%d.%d", &version.major, &version.minor);
832 }
833 if (version.major < 2)
835 return GL3W_OK;
836}
837
838static void load_procs(GL3WGetProcAddressProc proc);
839static void clear_procs();
840
841int imgl3wInit(void)
842{
843 int res = open_libgl();
844 if (res)
845 return res;
846 atexit(close_libgl);
847 return imgl3wInit2(get_proc);
848}
849
851{
852 load_procs(proc);
853 return parse_version();
854}
855
856void imgl3wShutdown(void)
857{
858 close_libgl();
859 clear_procs();
860}
861
862int imgl3wIsSupported(int major, int minor)
863{
864 if (major < 2)
865 return 0;
866 if (version.major == major)
867 return version.minor >= minor;
868 return version.major >= major;
869}
870
871GL3WglProc imgl3wGetProcAddress(const char *proc) { return get_proc(proc); }
872
873static const char *proc_names[] = {
874 "glActiveTexture",
875 "glAttachShader",
876 "glBindBuffer",
877 "glBindSampler",
878 "glBindTexture",
879 "glBindVertexArray",
880 "glBlendEquation",
881 "glBlendEquationSeparate",
882 "glBlendFuncSeparate",
883 "glBufferData",
884 "glBufferSubData",
885 "glClear",
886 "glClearColor",
887 "glCompileShader",
888 "glCreateProgram",
889 "glCreateShader",
890 "glDeleteBuffers",
891 "glDeleteProgram",
892 "glDeleteSamplers",
893 "glDeleteShader",
894 "glDeleteTextures",
895 "glDeleteVertexArrays",
896 "glDetachShader",
897 "glDisable",
898 "glDisableVertexAttribArray",
899 "glDrawElements",
900 "glDrawElementsBaseVertex",
901 "glEnable",
902 "glEnableVertexAttribArray",
903 "glFlush",
904 "glGenBuffers",
905 "glGenSamplers",
906 "glGenTextures",
907 "glGenVertexArrays",
908 "glGetAttribLocation",
909 "glGetError",
910 "glGetIntegerv",
911 "glGetProgramInfoLog",
912 "glGetProgramiv",
913 "glGetShaderInfoLog",
914 "glGetShaderiv",
915 "glGetString",
916 "glGetStringi",
917 "glGetUniformLocation",
918 "glGetVertexAttribPointerv",
919 "glGetVertexAttribiv",
920 "glIsEnabled",
921 "glIsProgram",
922 "glLinkProgram",
923 "glPixelStorei",
924 "glPolygonMode",
925 "glReadPixels",
926 "glSamplerParameteri",
927 "glScissor",
928 "glShaderSource",
929 "glTexImage2D",
930 "glTexParameteri",
931 "glTexSubImage2D",
932 "glUniform1i",
933 "glUniformMatrix4fv",
934 "glUseProgram",
935 "glVertexAttribPointer",
936 "glViewport",
937};
938
940
941static void load_procs(GL3WGetProcAddressProc proc)
942{
943 size_t i;
944 for (i = 0; i < GL3W_ARRAY_SIZE(proc_names); i++)
945 imgl3wProcs.ptr[i] = proc(proc_names[i]);
946}
947
948static void clear_procs()
949{
950 size_t i;
951 for (i = 0; i < GL3W_ARRAY_SIZE(proc_names); i++)
952 imgl3wProcs.ptr[i] = nullptr;
953}
954
955#ifdef __cplusplus
956}
957#endif
958#endif
GLsizei GLsizei * length
Definition imgui_impl_opengl3_loader.h:319
#define glGetVertexAttribiv
Definition imgui_impl_opengl3_loader.h:609
GLint GLint GLsizei GLsizei GLint border
Definition imgui_impl_opengl3_loader.h:193
GLenum GLenum GLenum dfactorAlpha
Definition imgui_impl_opengl3_loader.h:259
signed long long khronos_int64_t
Definition imgui_impl_opengl3_loader.h:82
GLenum modeAlpha
Definition imgui_impl_opengl3_loader.h:307
#define glDisableVertexAttribArray
Definition imgui_impl_opengl3_loader.h:588
GLfloat GLfloat GLfloat alpha
Definition imgui_impl_opengl3_loader.h:195
GLsizei bufSize
Definition imgui_impl_opengl3_loader.h:319
#define glGetError
Definition imgui_impl_opengl3_loader.h:599
GLuint texture
Definition imgui_impl_opengl3_loader.h:231
#define glAttachShader
Definition imgui_impl_opengl3_loader.h:565
unsigned int GLbitfield
Definition imgui_impl_opengl3_loader.h:145
#define glGetUniformLocation
Definition imgui_impl_opengl3_loader.h:607
GLenum void ** pointer
Definition imgui_impl_opengl3_loader.h:324
#define glClearColor
Definition imgui_impl_opengl3_loader.h:576
GLenum GLenum sfactorAlpha
Definition imgui_impl_opengl3_loader.h:259
float khronos_float_t
Definition imgui_impl_opengl3_loader.h:61
GLint GLsizei width
Definition imgui_impl_opengl3_loader.h:191
signed long int khronos_intptr_t
Definition imgui_impl_opengl3_loader.h:70
#define GL_VERSION
Definition imgui_impl_opengl3_loader.h:181
GLsizei GLboolean const GLfloat * value
Definition imgui_impl_opengl3_loader.h:330
#define glGenBuffers
Definition imgui_impl_opengl3_loader.h:594
#define glUniformMatrix4fv
Definition imgui_impl_opengl3_loader.h:623
#define glGetVertexAttribPointerv
Definition imgui_impl_opengl3_loader.h:608
void GLvoid
Definition imgui_impl_opengl3_loader.h:139
GLenum mode
Definition imgui_impl_opengl3_loader.h:190
khronos_uint16_t GLushort
Definition imgui_impl_opengl3_loader.h:291
#define glGetAttribLocation
Definition imgui_impl_opengl3_loader.h:598
#define glDeleteVertexArrays
Definition imgui_impl_opengl3_loader.h:585
#define glBlendFuncSeparate
Definition imgui_impl_opengl3_loader.h:572
GLenum GLint * params
Definition imgui_impl_opengl3_loader.h:318
khronos_int16_t GLshort
Definition imgui_impl_opengl3_loader.h:289
GLuint * samplers
Definition imgui_impl_opengl3_loader.h:404
#define GL_MAJOR_VERSION
Definition imgui_impl_opengl3_loader.h:366
GLint level
Definition imgui_impl_opengl3_loader.h:193
#define glPixelStorei
Definition imgui_impl_opengl3_loader.h:613
#define glGetShaderInfoLog
Definition imgui_impl_opengl3_loader.h:603
#define glIsProgram
Definition imgui_impl_opengl3_loader.h:611
GLuint buffer
Definition imgui_impl_opengl3_loader.h:274
#define glShaderSource
Definition imgui_impl_opengl3_loader.h:618
#define glBindBuffer
Definition imgui_impl_opengl3_loader.h:566
GLsizeiptr size
Definition imgui_impl_opengl3_loader.h:277
#define glEnable
Definition imgui_impl_opengl3_loader.h:591
#define APIENTRY
Definition imgui_impl_opengl3_loader.h:108
khronos_ssize_t GLsizeiptr
Definition imgui_impl_opengl3_loader.h:267
#define glGenSamplers
Definition imgui_impl_opengl3_loader.h:595
GL3W_API int imgl3wInit(void)
#define glBindVertexArray
Definition imgui_impl_opengl3_loader.h:569
#define glCreateShader
Definition imgui_impl_opengl3_loader.h:579
#define glBlendEquation
Definition imgui_impl_opengl3_loader.h:570
GLuint sampler
Definition imgui_impl_opengl3_loader.h:406
double GLdouble
Definition imgui_impl_opengl3_loader.h:146
GLint GLint GLsizei GLsizei GLint GLenum GLenum const void * pixels
Definition imgui_impl_opengl3_loader.h:193
#define glGetProgramiv
Definition imgui_impl_opengl3_loader.h:602
GLsizei GLenum const void GLint basevertex
Definition imgui_impl_opengl3_loader.h:395
GL3WglProc(* GL3WGetProcAddressProc)(const char *proc)
Definition imgui_impl_opengl3_loader.h:482
#define glDeleteBuffers
Definition imgui_impl_opengl3_loader.h:580
#define GL3W_API
Definition imgui_impl_opengl3_loader.h:465
GLuint shader
Definition imgui_impl_opengl3_loader.h:308
khronos_uint64_t GLuint64EXT
Definition imgui_impl_opengl3_loader.h:428
#define glTexParameteri
Definition imgui_impl_opengl3_loader.h:620
khronos_uint8_t GLubyte
Definition imgui_impl_opengl3_loader.h:149
#define glScissor
Definition imgui_impl_opengl3_loader.h:617
const GLchar * name
Definition imgui_impl_opengl3_loader.h:317
void(APIENTRY * GLDEBUGPROC)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *message, const void *userParam)
Definition imgui_impl_opengl3_loader.h:420
GLint y
Definition imgui_impl_opengl3_loader.h:191
#define glBindSampler
Definition imgui_impl_opengl3_loader.h:567
GLsizei count
Definition imgui_impl_opengl3_loader.h:229
#define glReadPixels
Definition imgui_impl_opengl3_loader.h:615
GLint GLint GLsizei GLsizei GLint GLenum GLenum type
Definition imgui_impl_opengl3_loader.h:193
#define glGetStringi
Definition imgui_impl_opengl3_loader.h:606
#define GL3W_ERROR_OPENGL_VERSION
Definition imgui_impl_opengl3_loader.h:479
unsigned int GLuint
Definition imgui_impl_opengl3_loader.h:147
GL3W_API int imgl3wIsSupported(int major, int minor)
#define glEnableVertexAttribArray
Definition imgui_impl_opengl3_loader.h:592
#define glGetIntegerv
Definition imgui_impl_opengl3_loader.h:600
#define glGenVertexArrays
Definition imgui_impl_opengl3_loader.h:597
struct __GLsync * GLsync
Definition imgui_impl_opengl3_loader.h:390
#define glGetString
Definition imgui_impl_opengl3_loader.h:605
GLint GLint GLint yoffset
Definition imgui_impl_opengl3_loader.h:230
GL3W_API GL3WglProc imgl3wGetProcAddress(const char *proc)
#define glTexImage2D
Definition imgui_impl_opengl3_loader.h:619
unsigned int GLenum
Definition imgui_impl_opengl3_loader.h:140
#define glDrawElements
Definition imgui_impl_opengl3_loader.h:589
void(APIENTRY * GLDEBUGPROCARB)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *message, const void *userParam)
Definition imgui_impl_opengl3_loader.h:438
#define glGenTextures
Definition imgui_impl_opengl3_loader.h:596
khronos_float_t GLfloat
Definition imgui_impl_opengl3_loader.h:142
void(APIENTRY * GLVULKANPROCNV)(void)
Definition imgui_impl_opengl3_loader.h:451
#define glVertexAttribPointer
Definition imgui_impl_opengl3_loader.h:625
signed long int khronos_ssize_t
Definition imgui_impl_opengl3_loader.h:71
GLint GLsizei GLsizei height
Definition imgui_impl_opengl3_loader.h:191
GLint v0
Definition imgui_impl_opengl3_loader.h:329
#define glTexSubImage2D
Definition imgui_impl_opengl3_loader.h:621
int GLsizei
Definition imgui_impl_opengl3_loader.h:144
#define glBufferData
Definition imgui_impl_opengl3_loader.h:573
GLint GLint internalformat
Definition imgui_impl_opengl3_loader.h:193
GLsizei GLenum const void * indices
Definition imgui_impl_opengl3_loader.h:229
#define glDeleteProgram
Definition imgui_impl_opengl3_loader.h:581
#define glBindTexture
Definition imgui_impl_opengl3_loader.h:568
#define GL3W_ERROR_INIT
Definition imgui_impl_opengl3_loader.h:477
GLint GLenum GLboolean normalized
Definition imgui_impl_opengl3_loader.h:331
unsigned short int khronos_uint16_t
Definition imgui_impl_opengl3_loader.h:65
#define glDeleteSamplers
Definition imgui_impl_opengl3_loader.h:582
GLenum GLint param
Definition imgui_impl_opengl3_loader.h:192
const GLubyte *APIENTRYP PFNGLGETSTRINGPROC(GLenum name)
Definition imgui_impl_opengl3_loader.h:203
GLuint GLuint64EXT * result
Definition imgui_impl_opengl3_loader.h:457
khronos_uint16_t GLhalf
Definition imgui_impl_opengl3_loader.h:365
unsigned char khronos_uint8_t
Definition imgui_impl_opengl3_loader.h:63
#define glDrawElementsBaseVertex
Definition imgui_impl_opengl3_loader.h:590
#define glBufferSubData
Definition imgui_impl_opengl3_loader.h:574
void(* GL3WglProc)(void)
Definition imgui_impl_opengl3_loader.h:481
GL3W_API union ImGL3WProcs imgl3wProcs
GLuint index
Definition imgui_impl_opengl3_loader.h:371
GLfloat GLfloat blue
Definition imgui_impl_opengl3_loader.h:195
#define glViewport
Definition imgui_impl_opengl3_loader.h:626
GLint GLint GLsizei GLsizei GLint GLenum format
Definition imgui_impl_opengl3_loader.h:193
GL3W_API void imgl3wShutdown(void)
khronos_intptr_t GLintptr
Definition imgui_impl_opengl3_loader.h:268
const GLuint * arrays
Definition imgui_impl_opengl3_loader.h:375
#define GLAPI
Definition imgui_impl_opengl3_loader.h:114
double GLclampd
Definition imgui_impl_opengl3_loader.h:227
GLint * data
Definition imgui_impl_opengl3_loader.h:202
GLsizei GLboolean transpose
Definition imgui_impl_opengl3_loader.h:330
GLsizei GLsizei GLchar * infoLog
Definition imgui_impl_opengl3_loader.h:319
#define glUniform1i
Definition imgui_impl_opengl3_loader.h:622
#define GL3W_ERROR_LIBRARY_OPEN
Definition imgui_impl_opengl3_loader.h:478
#define glDeleteShader
Definition imgui_impl_opengl3_loader.h:583
#define glIsEnabled
Definition imgui_impl_opengl3_loader.h:610
GLint GLint xoffset
Definition imgui_impl_opengl3_loader.h:230
typedef void(APIENTRYP PFNGLPOLYGONMODEPROC)(GLenum face
GLsizei const GLchar *const * string
Definition imgui_impl_opengl3_loader.h:327
khronos_int64_t GLint64
Definition imgui_impl_opengl3_loader.h:392
const GLuint * buffers
Definition imgui_impl_opengl3_loader.h:275
const GLuint * textures
Definition imgui_impl_opengl3_loader.h:232
GLenum dfactorRGB
Definition imgui_impl_opengl3_loader.h:259
int GLint
Definition imgui_impl_opengl3_loader.h:143
#define glCompileShader
Definition imgui_impl_opengl3_loader.h:577
khronos_int64_t GLint64EXT
Definition imgui_impl_opengl3_loader.h:454
#define glFlush
Definition imgui_impl_opengl3_loader.h:593
#define glCreateProgram
Definition imgui_impl_opengl3_loader.h:578
#define glGetProgramInfoLog
Definition imgui_impl_opengl3_loader.h:601
#define glPolygonMode
Definition imgui_impl_opengl3_loader.h:614
#define glLinkProgram
Definition imgui_impl_opengl3_loader.h:612
#define GL_MINOR_VERSION
Definition imgui_impl_opengl3_loader.h:367
#define glUseProgram
Definition imgui_impl_opengl3_loader.h:624
khronos_uint64_t GLuint64
Definition imgui_impl_opengl3_loader.h:391
#define glDisable
Definition imgui_impl_opengl3_loader.h:587
#define GL3W_OK
Definition imgui_impl_opengl3_loader.h:476
const GLubyte *APIENTRYP PFNGLGETSTRINGIPROC(GLenum name, GLuint index)
Definition imgui_impl_opengl3_loader.h:373
GLint GLenum GLboolean GLsizei stride
Definition imgui_impl_opengl3_loader.h:331
GLintptr offset
Definition imgui_impl_opengl3_loader.h:278
#define glGetShaderiv
Definition imgui_impl_opengl3_loader.h:604
unsigned char GLboolean
Definition imgui_impl_opengl3_loader.h:148
signed short int khronos_int16_t
Definition imgui_impl_opengl3_loader.h:64
unsigned long long khronos_uint64_t
Definition imgui_impl_opengl3_loader.h:83
#define glDeleteTextures
Definition imgui_impl_opengl3_loader.h:584
#define APIENTRYP
Definition imgui_impl_opengl3_loader.h:111
GLfloat green
Definition imgui_impl_opengl3_loader.h:195
#define glBlendEquationSeparate
Definition imgui_impl_opengl3_loader.h:571
GL3W_API int imgl3wInit2(GL3WGetProcAddressProc proc)
#define glActiveTexture
Definition imgui_impl_opengl3_loader.h:564
#define glSamplerParameteri
Definition imgui_impl_opengl3_loader.h:616
void * GLeglImageOES
Definition imgui_impl_opengl3_loader.h:441
khronos_float_t GLclampf
Definition imgui_impl_opengl3_loader.h:226
GLenum pname
Definition imgui_impl_opengl3_loader.h:192
khronos_int8_t GLbyte
Definition imgui_impl_opengl3_loader.h:290
char GLchar
Definition imgui_impl_opengl3_loader.h:288
#define glDetachShader
Definition imgui_impl_opengl3_loader.h:586
signed char khronos_int8_t
Definition imgui_impl_opengl3_loader.h:62
GLsizeiptr const void GLenum usage
Definition imgui_impl_opengl3_loader.h:277
#define glClear
Definition imgui_impl_opengl3_loader.h:575
Definition imgui_impl_opengl3_loader.h:492
PFNGLDELETESAMPLERSPROC DeleteSamplers
Definition imgui_impl_opengl3_loader.h:513
PFNGLBUFFERDATAPROC BufferData
Definition imgui_impl_opengl3_loader.h:504
PFNGLDRAWELEMENTSBASEVERTEXPROC DrawElementsBaseVertex
Definition imgui_impl_opengl3_loader.h:521
PFNGLPIXELSTOREIPROC PixelStorei
Definition imgui_impl_opengl3_loader.h:544
PFNGLBLENDFUNCSEPARATEPROC BlendFuncSeparate
Definition imgui_impl_opengl3_loader.h:503
PFNGLENABLEVERTEXATTRIBARRAYPROC EnableVertexAttribArray
Definition imgui_impl_opengl3_loader.h:523
PFNGLDELETEBUFFERSPROC DeleteBuffers
Definition imgui_impl_opengl3_loader.h:511
PFNGLVERTEXATTRIBPOINTERPROC VertexAttribPointer
Definition imgui_impl_opengl3_loader.h:556
PFNGLGENTEXTURESPROC GenTextures
Definition imgui_impl_opengl3_loader.h:527
PFNGLGETPROGRAMIVPROC GetProgramiv
Definition imgui_impl_opengl3_loader.h:533
GL3WglProc ptr[63]
Definition imgui_impl_opengl3_loader.h:493
PFNGLGETSTRINGIPROC GetStringi
Definition imgui_impl_opengl3_loader.h:537
PFNGLGETUNIFORMLOCATIONPROC GetUniformLocation
Definition imgui_impl_opengl3_loader.h:538
PFNGLGENVERTEXARRAYSPROC GenVertexArrays
Definition imgui_impl_opengl3_loader.h:528
PFNGLBINDVERTEXARRAYPROC BindVertexArray
Definition imgui_impl_opengl3_loader.h:500
PFNGLGETVERTEXATTRIBIVPROC GetVertexAttribiv
Definition imgui_impl_opengl3_loader.h:540
PFNGLUSEPROGRAMPROC UseProgram
Definition imgui_impl_opengl3_loader.h:555
PFNGLGETINTEGERVPROC GetIntegerv
Definition imgui_impl_opengl3_loader.h:531
PFNGLSCISSORPROC Scissor
Definition imgui_impl_opengl3_loader.h:548
PFNGLUNIFORMMATRIX4FVPROC UniformMatrix4fv
Definition imgui_impl_opengl3_loader.h:554
PFNGLDELETESHADERPROC DeleteShader
Definition imgui_impl_opengl3_loader.h:514
PFNGLDRAWELEMENTSPROC DrawElements
Definition imgui_impl_opengl3_loader.h:520
PFNGLBINDTEXTUREPROC BindTexture
Definition imgui_impl_opengl3_loader.h:499
PFNGLGETSHADERINFOLOGPROC GetShaderInfoLog
Definition imgui_impl_opengl3_loader.h:534
PFNGLGETSTRINGPROC GetString
Definition imgui_impl_opengl3_loader.h:536
PFNGLGENBUFFERSPROC GenBuffers
Definition imgui_impl_opengl3_loader.h:525
PFNGLCOMPILESHADERPROC CompileShader
Definition imgui_impl_opengl3_loader.h:508
PFNGLBUFFERSUBDATAPROC BufferSubData
Definition imgui_impl_opengl3_loader.h:505
PFNGLTEXIMAGE2DPROC TexImage2D
Definition imgui_impl_opengl3_loader.h:550
PFNGLTEXPARAMETERIPROC TexParameteri
Definition imgui_impl_opengl3_loader.h:551
struct ImGL3WProcs::@277244074135173134202317204237106015116201136075 gl
PFNGLGETPROGRAMINFOLOGPROC GetProgramInfoLog
Definition imgui_impl_opengl3_loader.h:532
PFNGLCREATEPROGRAMPROC CreateProgram
Definition imgui_impl_opengl3_loader.h:509
PFNGLDETACHSHADERPROC DetachShader
Definition imgui_impl_opengl3_loader.h:517
PFNGLSHADERSOURCEPROC ShaderSource
Definition imgui_impl_opengl3_loader.h:549
PFNGLACTIVETEXTUREPROC ActiveTexture
Definition imgui_impl_opengl3_loader.h:495
PFNGLPOLYGONMODEPROC PolygonMode
Definition imgui_impl_opengl3_loader.h:545
PFNGLTEXSUBIMAGE2DPROC TexSubImage2D
Definition imgui_impl_opengl3_loader.h:552
PFNGLBLENDEQUATIONSEPARATEPROC BlendEquationSeparate
Definition imgui_impl_opengl3_loader.h:502
PFNGLGETSHADERIVPROC GetShaderiv
Definition imgui_impl_opengl3_loader.h:535
PFNGLBINDBUFFERPROC BindBuffer
Definition imgui_impl_opengl3_loader.h:497
PFNGLDISABLEPROC Disable
Definition imgui_impl_opengl3_loader.h:518
PFNGLUNIFORM1IPROC Uniform1i
Definition imgui_impl_opengl3_loader.h:553
PFNGLDELETEVERTEXARRAYSPROC DeleteVertexArrays
Definition imgui_impl_opengl3_loader.h:516
PFNGLBLENDEQUATIONPROC BlendEquation
Definition imgui_impl_opengl3_loader.h:501
PFNGLISENABLEDPROC IsEnabled
Definition imgui_impl_opengl3_loader.h:541
PFNGLFLUSHPROC Flush
Definition imgui_impl_opengl3_loader.h:524
PFNGLATTACHSHADERPROC AttachShader
Definition imgui_impl_opengl3_loader.h:496
PFNGLDELETETEXTURESPROC DeleteTextures
Definition imgui_impl_opengl3_loader.h:515
PFNGLCREATESHADERPROC CreateShader
Definition imgui_impl_opengl3_loader.h:510
PFNGLCLEARCOLORPROC ClearColor
Definition imgui_impl_opengl3_loader.h:507
PFNGLGETVERTEXATTRIBPOINTERVPROC GetVertexAttribPointerv
Definition imgui_impl_opengl3_loader.h:539
PFNGLGETERRORPROC GetError
Definition imgui_impl_opengl3_loader.h:530
PFNGLISPROGRAMPROC IsProgram
Definition imgui_impl_opengl3_loader.h:542
PFNGLGENSAMPLERSPROC GenSamplers
Definition imgui_impl_opengl3_loader.h:526
PFNGLBINDSAMPLERPROC BindSampler
Definition imgui_impl_opengl3_loader.h:498
PFNGLCLEARPROC Clear
Definition imgui_impl_opengl3_loader.h:506
PFNGLDISABLEVERTEXATTRIBARRAYPROC DisableVertexAttribArray
Definition imgui_impl_opengl3_loader.h:519
PFNGLVIEWPORTPROC Viewport
Definition imgui_impl_opengl3_loader.h:557
PFNGLREADPIXELSPROC ReadPixels
Definition imgui_impl_opengl3_loader.h:546
PFNGLLINKPROGRAMPROC LinkProgram
Definition imgui_impl_opengl3_loader.h:543
PFNGLGETATTRIBLOCATIONPROC GetAttribLocation
Definition imgui_impl_opengl3_loader.h:529
PFNGLENABLEPROC Enable
Definition imgui_impl_opengl3_loader.h:522
PFNGLDELETEPROGRAMPROC DeleteProgram
Definition imgui_impl_opengl3_loader.h:512
PFNGLSAMPLERPARAMETERIPROC SamplerParameteri
Definition imgui_impl_opengl3_loader.h:547