Initial commit

This commit is contained in:
2025-11-17 10:28:09 +01:00
parent 7bff81691f
commit 6ee36e26be
391 changed files with 110253 additions and 0 deletions

View File

@@ -0,0 +1,92 @@
#ifndef _shader
#define _shader
// Macros
#define GL_GLEXT_PROTOTYPES
#include "stdlib.h"
extern char * __ClassNames[];
// Includes
#include "char.h"
#include "array.h"
#include "fileSystem.h"
#include <stdio.h>
#include <GL/glx.h>
#include <GL/gl.h>
#include <GL/glext.h>
typedef struct shader{
unsigned short __classIndex;
array * uniforms;
array * attributes;
} shader;
void shader_checkShaderForErrors( shader * this, GLuint shader );
void shader_createFromFile( shader * this, char * vertexShaderPath, char * fragmentShaderPath );
struct attribute * shader_getAttributeByName( shader * this, char * attributeName );
void shader_setUniform( shader * this, char * name, void * value );
typedef struct uniform{
unsigned short __classIndex;
char name[64];
GLint location;
GLenum type;
} uniform;
typedef struct attribute{
unsigned short __classIndex;
GLchar name[64];
GLint location;
GLenum type;
} attribute;
shader shader_new( );
shader * shader_newPointer( );
uniform uniform_new( );
uniform * uniform_newPointer( );
attribute attribute_new( );
attribute * attribute_newPointer( );
#endif