Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
44 lines (37 sloc) 1.1 KB
/*
* =====================================================================================
*
* Filename: shaders.h
*
* Description: loads vertex- and fragment shaders
*
* Version: 1.0
* Created: 22.07.2011 19:16:31
* Revision: none
* Compiler: gcc
*
* Author: Jem
* Company:
*
* =====================================================================================
*/
#ifndef SHADERS_H_
#define SHADERS_H_
#define PROJECTION_MATRIX "projectionMatrix"
#define MODELVIEW_MATRIX "modelViewMatrix"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <GL/glew.h>
typedef struct{
GLchar *vertexsource, *geometrysource, *fragmentsource;
GLuint vertex, geometry, fragment;
GLuint program;
} shader_t;
char* filetobuf(char *file);
shader_t *create_shaders();
void destroy_shaders(shader_t *shader);
void get_matrix(shader_t *shader, const char *matrix_type, GLfloat *matrix_object);
void set_matrix(shader_t *shader, const char *matrix_type, GLfloat *matrix_object);
void set_texture(shader_t *shader, GLuint texture);
#endif
Jump to Line
Something went wrong with that request. Please try again.