Initial commit
This commit is contained in:
87
application/demos/example.opengl/engine/shader.h
Normal file
87
application/demos/example.opengl/engine/shader.h
Normal file
@@ -0,0 +1,87 @@
|
||||
#ifndef _shader
|
||||
|
||||
#define _shader
|
||||
|
||||
|
||||
// Macros
|
||||
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
|
||||
|
||||
|
||||
|
||||
#include "stdlib.h"
|
||||
|
||||
extern char * __ClassNames[];
|
||||
|
||||
|
||||
// Includes
|
||||
|
||||
#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 shader{
|
||||
|
||||
GLuint glShader;
|
||||
|
||||
|
||||
} shader;
|
||||
|
||||
void shader_constructor( shader * this, GLuint shaderType );
|
||||
|
||||
void shader_loadFromFile( shader * this, char * shaderPath );
|
||||
|
||||
void shader_checkShaderForErrors( shader * this, GLuint shader );
|
||||
|
||||
typedef struct attribute{
|
||||
|
||||
GLchar name[64];
|
||||
|
||||
GLint location;
|
||||
|
||||
GLenum type;
|
||||
|
||||
|
||||
} attribute;
|
||||
|
||||
shader shader_new( GLuint shaderType );
|
||||
|
||||
shader * shader_newPointer( GLuint shaderType );
|
||||
|
||||
attribute attribute_new( );
|
||||
|
||||
attribute * attribute_newPointer( );
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct shader shader;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
typedef struct attribute attribute;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user