$darkmode
Suckless OGL 1.0.0
A lean, high-performance C11 PBR Renderer
window.c File Reference
#include "window.h"
#include "gl_debug.h"
#include "glad/glad.h"
#include "log.h"
#include "render_utils.h"
#include <GLFW/glfw3.h>
#include <stdio.h>
Include dependency graph for window.c:

Functions

GLFWwindowwindow_create (int width, int height, const char *title, int samples)
 
void window_destroy (GLFWwindow *window)
 

Function Documentation

◆ window_create()

GLFWwindow* window_create ( int  width,
int  height,
const char *  title,
int  samples 
)

Creates a GLFW window with an OpenGL context initialized. Handles GLFW initialization, Window creation, and GLAD loading.

Parameters
widthWindow width
heightWindow height
titleWindow title
samplesMSAA samples (0 or 1 to disable)
Returns
Pointer to the created window, or NULL on failure.
Here is the call graph for this function:

◆ window_destroy()

void window_destroy ( GLFWwindow window)

Destroys the window and terminates GLFW.

Parameters
windowThe window to destroy.