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,98 @@
#ifndef _mesh
#define _mesh
// Macros
#define GL_GLEXT_PROTOTYPES
#include "stdlib.h"
extern char * __ClassNames[];
// Includes
#include "unsignedIntegerArray.h"
#include "floatArray.h"
#include "program.h"
#include "shader.h"
#include "block.h"
#include <GL/glx.h>
#include <GL/gl.h>
#include <GL/glext.h>
typedef struct mesh{
struct program * program;
struct unsignedIntegerArray * indices;
struct floatArray * textureCoordinates;
struct floatArray * vertexCoordinates;
struct floatArray * normalCoordinates;
struct array * blocks;
GLuint vertexArrayObject;
GLuint uniformBuffer;
GLuint indexBuffer;
GLuint vertexbuffer;
GLuint textureCoordinateBuffer;
GLuint meshIndexBuffer;
GLuint uvBuffer;
struct unsignedIntegerArray * uniformBuffers;
} mesh;
struct block * mesh_getUniformBlock( mesh * this, char * blockName );
void mesh_bindBlock( mesh * this, struct block * blockInstance );
void mesh_setProgram( mesh * this, struct program * currentProgram );
GLuint mesh_getGLTypeSize( mesh * this, GLuint type );
GLuint mesh_getComponentType( mesh * this, GLuint type );
GLuint mesh_getItemSize( mesh * this, GLuint type );
GLuint mesh_createBuffer( mesh * this, char * attributeName, void * data, GLenum target, GLenum usage );
void mesh_createBuffers( mesh * this );
void mesh_createOrderedTriangleStripQuad( mesh * this );
mesh mesh_new( );
mesh * mesh_newPointer( );
#endif
typedef struct mesh mesh;