all opengl instance functions

This commit is contained in:
Gregory Wells
2025-07-10 15:24:59 -04:00
parent fbd4c01e73
commit af1f028088
9 changed files with 8041 additions and 4 deletions

View File

@@ -1,3 +1,4 @@
#include <glad/glad.h>
#include "opengl_surface.h"
#ifdef GN_PLATFORM_LINUX
@@ -18,6 +19,8 @@ gnReturnCode createGLXContext(gnWindowSurfaceHandle windowSurface, gnInstanceHan
return GN_FAILED_TO_ATTACH_WINDOW;
windowSurface->windowSurface->window = createInfo.window;
windowSurface->windowSurface->display = createInfo.display;
if (!gladLoadGLLoader((GLADloadproc)glXGetProcAddress))
return GN_FAILED_TO_INIT_OPENGL;
return GN_SUCCESS;
}
@@ -58,3 +61,7 @@ gnSurfaceDetails genOpenGLSurfaceDetails(
return surfaceDetails;
}
void destroyOpenGLSurface(gnWindowSurface surface) {
free(surface->windowSurface);
}