progress binding RGFW and making RGFW shell

This commit is contained in:
2026-01-22 21:02:22 +00:00
parent e0c09c5480
commit d0f9220cfe
8 changed files with 80 additions and 28 deletions

View File

@@ -1,16 +1,25 @@
#include <math.h>
#define RGFW_OPENGL
#define RGFW_ALLOC_DROPFILES
#define RGFW_IMPLEMENTATION
#define RGFW_OPENGL /* if this line is not added, OpenGL functions will not be included */
#define RGFW_PRINT_ERRORS
#define RGFW_DEBUG
#define GL_SILENCE_DEPRECATION
#include "RGFW.h"
#include <GLES3/gl3.h>
#include <stdbool.h>
#ifdef RGFW_MACOS
#include <OpenGL/gl.h> /* why does macOS do this */
#else
#include <GL/gl.h>
#endif
RGFW_windowFlags OPENGL_WINDOW = RGFW_windowOpenGL;
RGFW_window* createWindow(char* title, int x, int y, int width, int height, RGFW_windowFlags options) {
return RGFW_createWindow(title, x, y, width, height, options);
RGFW_window* createWindow(char* title, int x, int y, int width, int height) {
return RGFW_createWindow(title, x, y, width, height, RGFW_windowCenter | RGFW_windowOpenGL);
}
void closeWindow(RGFW_window* window) {
RGFW_window_close(window);
}
bool shouldCloseWindow(RGFW_window* window) {
return RGFW_window_shouldClose(window) != 0;
}
void swapBuffers(RGFW_window* window) {
RGFW_window_swapBuffers_OpenGL(window);
}