actually compile shaders

This commit is contained in:
Gregory Wells
2025-08-12 22:17:54 -04:00
parent f6484ddde5
commit 23f46385fe
5 changed files with 66 additions and 5 deletions

View File

@@ -0,0 +1,31 @@
#pragma once
#include "stdint.h"
#include "glad/glad.h"
#include "utils/gryphn_cpp_function.h"
#define MAX_OPENGL_SETS 32
#define MAX_OPENGL_BINDINGS 16
typedef enum glShaderModuleStage {
glVertex = GL_VERTEX_SHADER,
mtlFragment = GL_FRAGMENT_SHADER,
mtlMaxStage
} glShaderModuleStage;
typedef struct glCompilerInfo {
uint32_t* code;
int wordCount;
const char* entryPoint;
// glShaderModuleStage stage;
} glCompilerInfo;
typedef struct glSet { uint32_t bindings[MAX_OPENGL_BINDINGS]; } glSet;
typedef struct glShader {
const char* source;
glSet sets[MAX_OPENGL_SETS];
} glShader;
typedef struct glCompiler_t* glCompiler;
GN_CPP_FUNCTION glCompiler glCreateCompiler(glCompilerInfo* info);
GN_CPP_FUNCTION const char* glCompilerCompilerShader(glCompiler compiler);