3 Commits
Author SHA1 Message Date
klemek 0a43f3f582 fix: add opengl metadata
Clang Lint CI / lint-no-video (push) Successful in 46s
Clang Build CI / run-no-video (push) Successful in 1m4s
Clang Build CI / run-video (push) Successful in 1m4s
Clang Build CI / build-release (push) Successful in 1m43s
Clang Lint CI / lint-video (push) Successful in 1m4s
2026-08-27 18:45:48 +02:00
klemek 6110e1df7f fix: add ext to gl.h 2026-08-27 17:43:32 +02:00
klemek 3a228122cf fix: compatibility
Clang Build CI / run-no-video (push) Successful in 49s
Clang Build CI / run-video (push) Successful in 51s
Clang Lint CI / lint-no-video (push) Successful in 56s
Clang Build CI / build-release (push) Successful in 1m14s
Clang Lint CI / lint-video (push) Successful in 46s
2026-08-27 17:21:30 +02:00
4 changed files with 22 additions and 8 deletions
+10 -5
View File
@@ -1,11 +1,11 @@
/**
* Loader generated by glad 2.0.8 on Wed May 13 21:57:23 2026
* Loader generated by glad 2.0.8 on Thu Aug 27 15:42:48 2026
*
* SPDX-License-Identifier: (WTFPL OR CC0-1.0) AND Apache-2.0
*
* Generator: C/C++
* Specification: gl
* Extensions: 4
* Extensions: 5
*
* APIs:
* - gl:compatibility=4.6
@@ -19,10 +19,10 @@
* - ON_DEMAND = False
*
* Commandline:
* --api='gl:compatibility=4.6' --extensions='GL_ARB_direct_state_access,GL_EXT_EGL_image_storage,GL_EXT_direct_state_access,GL_KHR_debug' c --header-only --loader
* --api='gl:compatibility=4.6' --extensions='GL_ARB_arrays_of_arrays,GL_ARB_direct_state_access,GL_EXT_EGL_image_storage,GL_EXT_direct_state_access,GL_KHR_debug' c --header-only --loader
*
* Online:
* http://glad.sh/#api=gl%3Acompatibility%3D4.6&extensions=GL_ARB_direct_state_access%2CGL_EXT_EGL_image_storage%2CGL_EXT_direct_state_access%2CGL_KHR_debug&generator=c&options=HEADER_ONLY%2CLOADER
* http://glad.sh/#api=gl%3Acompatibility%3D4.6&extensions=GL_ARB_arrays_of_arrays%2CGL_ARB_direct_state_access%2CGL_EXT_EGL_image_storage%2CGL_EXT_direct_state_access%2CGL_KHR_debug&generator=c&options=HEADER_ONLY%2CLOADER
*
*/
@@ -2403,6 +2403,8 @@ GLAD_API_CALL int GLAD_GL_VERSION_4_4;
GLAD_API_CALL int GLAD_GL_VERSION_4_5;
#define GL_VERSION_4_6 1
GLAD_API_CALL int GLAD_GL_VERSION_4_6;
#define GL_ARB_arrays_of_arrays 1
GLAD_API_CALL int GLAD_GL_ARB_arrays_of_arrays;
#define GL_ARB_direct_state_access 1
GLAD_API_CALL int GLAD_GL_ARB_direct_state_access;
#define GL_EXT_EGL_image_storage 1
@@ -6395,6 +6397,7 @@ int GLAD_GL_VERSION_4_3 = 0;
int GLAD_GL_VERSION_4_4 = 0;
int GLAD_GL_VERSION_4_5 = 0;
int GLAD_GL_VERSION_4_6 = 0;
int GLAD_GL_ARB_arrays_of_arrays = 0;
int GLAD_GL_ARB_direct_state_access = 0;
int GLAD_GL_EXT_EGL_image_storage = 0;
int GLAD_GL_EXT_direct_state_access = 0;
@@ -9290,6 +9293,7 @@ static int glad_gl_find_extensions_gl(void) {
char **exts_i = NULL;
if (!glad_gl_get_extensions(&exts, &exts_i)) return 0;
GLAD_GL_ARB_arrays_of_arrays = glad_gl_has_extension(exts, exts_i, "GL_ARB_arrays_of_arrays");
GLAD_GL_ARB_direct_state_access = glad_gl_has_extension(exts, exts_i, "GL_ARB_direct_state_access");
GLAD_GL_EXT_EGL_image_storage = glad_gl_has_extension(exts, exts_i, "GL_EXT_EGL_image_storage");
GLAD_GL_EXT_direct_state_access = glad_gl_has_extension(exts, exts_i, "GL_EXT_direct_state_access");
@@ -9392,7 +9396,7 @@ int gladLoadGL( GLADloadfunc load) {
#ifdef GLAD_GL
@@ -9571,3 +9575,4 @@ void gladLoaderUnloadGL(void) {
#endif
#endif /* GLAD_GL_IMPLEMENTATION */
+2 -2
View File
@@ -4,9 +4,9 @@
#define CONSTANTS_H
static const char *vertex_shader_text =
"#version 460\n"
"#version 140\n"
"const mat4 mvp = "
"{{2.,0.,0.,0.},{0.,2.,0.,0.},{0.,0.,2.,0.},{-1.,-1.,1.,1.}};\n"
"mat4(vec4(2.,0.,0.,0.),vec4(0.,2.,0.,0.),vec4(0.,0.,2.,0.),vec4(-1.,-1.,1.,1.));\n"
"in vec2 vPos;\n"
"out vec2 vUV;\n"
"void main()\n"
+7
View File
@@ -105,6 +105,13 @@ static bool init_gl(ShaderProgram *program) {
glDebugMessageCallback(gl_debug_callback, NULL);
#endif /* GL_DEBUG */
// print OpenGL info
log_info("[OpenGL] Vendor: %s", glGetString(GL_VENDOR));
log_info("[OpenGL] Renderer: %s", glGetString(GL_RENDERER));
log_info("[OpenGL] Version: %s", glGetString(GL_VERSION));
log_info("[OpenGL] Shading language: %s",
glGetString(GL_SHADING_LANGUAGE_VERSION));
#ifdef VIDEO_IN
program->egl_display = glfwGetEGLDisplay();
if (program->egl_display == EGL_NO_DISPLAY) {
+3 -1
View File
@@ -89,7 +89,9 @@ create_window(GLFWmonitor *monitor, const char *title,
#ifdef GL_DEBUG
glfwWindowHint(GLFW_OPENGL_DEBUG_CONTEXT, GLFW_TRUE);
#endif
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
if (opengl_major > 4 || (opengl_major == 3 && opengl_minor >= 2)) {
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
}
// create fullscreen window in selected monitor
window = glfwCreateWindow(1, 1, title, monitor, shared_context);