Initial commit
This commit is contained in:
96
application/demos/example.opengl/engine/block.h
Normal file
96
application/demos/example.opengl/engine/block.h
Normal file
@@ -0,0 +1,96 @@
|
||||
#ifndef _block
|
||||
|
||||
#define _block
|
||||
|
||||
|
||||
// Macros
|
||||
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
|
||||
|
||||
|
||||
|
||||
#include "stdlib.h"
|
||||
|
||||
extern char * __ClassNames[];
|
||||
|
||||
|
||||
// Includes
|
||||
|
||||
#include "member.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>
|
||||
|
||||
|
||||
typedef struct block{
|
||||
|
||||
array * members;
|
||||
|
||||
GLint buffer;
|
||||
|
||||
GLuint index;
|
||||
|
||||
GLenum bufferType;
|
||||
|
||||
GLint bufferSize;
|
||||
|
||||
GLint bindingPoint;
|
||||
|
||||
GLchar * name;
|
||||
|
||||
float * data;
|
||||
|
||||
GLint autoUpload;
|
||||
|
||||
|
||||
} block;
|
||||
|
||||
void block_add( block * this, struct member * memberInstance );
|
||||
|
||||
void block_enableAutoUpload( block * this );
|
||||
|
||||
char * block_getBufferTypeText( block * this );
|
||||
|
||||
void block_createBuffer( block * this );
|
||||
|
||||
void block_upload( block * this );
|
||||
|
||||
void block_mapBufferError( block * this, void * pointer );
|
||||
|
||||
void * block_getMemberArray( block * this, char * name );
|
||||
|
||||
void block_setMemberArrayRow( block * this, char * name, int arrayIndex, float * data );
|
||||
|
||||
void block_setMemberArray( block * this, char * name, float * data );
|
||||
|
||||
void block_setMemberItem( block * this, char * name, int index, void * value );
|
||||
|
||||
void block_setData( block * this, float * data );
|
||||
|
||||
void block_setMember( block * this, char * name, void * value );
|
||||
|
||||
block block_new( );
|
||||
|
||||
block * block_newPointer( );
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct block block;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user