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,100 @@
#ifndef _program
#define _program
// Macros
#define GL_GLEXT_PROTOTYPES
#include "stdlib.h"
extern char * __ClassNames[];
// Includes
#include "shader.h"
#include "sampler2D.h"
#include "../char.h"
#include "../array.h"
#include "fileSystem.h"
#include <stdio.h>
#include <GL/glx.h>
#include <GL/gl.h>
#include <GL/glext.h>
#include "uniform.h"
#include "member.h"
#include "block.h"
typedef struct program{
GLuint samplerIndex;
array * uniforms;
array * attributes;
array * blocks;
array * shaders;
GLuint glProgram;
} program;
void program_addShader( program * this, struct shader * shaderInstance );
GLint program_glGetProgramResourceiv( program * this, GLint programProperty, GLint index, GLint Property );
GLchar * program_glGetProgramResourceName( program * this, GLint programProperty, GLint index, GLint nameLength );
void program_extractBlocks( program * this );
struct block * program_createNewBlock( program * this, char * blockName );
struct block * program_getBlock( program * this, char * blockName );
void program_create( program * this );
void program_bindBlock( program * this, char * blockName );
void program_use( program * this );
void program_extractUniforms( program * this );
void program_extractAttributes( program * this );
struct attribute * program_getAttributeByName( program * this, char * attributeName );
void program_setUniform( program * this, char * name, void * value );
void program_updateSampler2D( program * this, uniform * currentUniform, void * value );
program program_new( );
program * program_newPointer( );
#endif
typedef struct program program;