17 lines
694 B
C
17 lines
694 B
C
/**
|
|
* From the OpenGL Programming wikibook: http://en.wikibooks.org/wiki/OpenGL_Programming
|
|
* This file is in the public domain.
|
|
* Contributors: Sylvain Beucler
|
|
*/
|
|
#ifndef _SHADER_UTILS_H
|
|
#define _SHADER_UTILS_H
|
|
#include <GL/glew.h>
|
|
char* file_read(const char* filename);
|
|
void print_log(GLuint object);
|
|
GLuint create_shader(const char* filename, GLenum type);
|
|
GLuint create_program(const char* vertexfile, const char *fragmentfile);
|
|
GLuint create_gs_program(const char* vertexfile, const char *geometryfile, const char *fragmentfile, GLint input, GLint output, GLint vertices);
|
|
GLint get_attrib(GLuint program, const char *name);
|
|
GLint get_uniform(GLuint program, const char *name);
|
|
#endif
|