common/GL_utilities.h
b23636c9
 #ifndef _GL_UTILITIES_
 #define _GL_UTILITIES_
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
9230c2a7
 #if defined(__APPLE__)
b23636c9
 	#define GL_SILENCE_DEPRECATION
 	#include <OpenGL/gl3.h>
9230c2a7
 #elif defined(_WIN32)
 	#include "glew.h"
b23636c9
 #else
9230c2a7
 	#define GL_GLEXT_PROTOTYPES
 	#include <GL/gl.h>
b23636c9
 #endif
9230c2a7
 
b23636c9
 #include <stdlib.h>
 
 void printError(const char *functionName);
 GLuint loadShaders(const char *vertFileName, const char *fragFileName);
 GLuint loadShadersG(const char *vertFileName, const char *fragFileName, const char *geomFileName);
 GLuint loadShadersGT(const char *vertFileName, const char *fragFileName, const char *geomFileName,
 						const char *tcFileName, const char *teFileName);
 void dumpInfo(void);
 
 // This is obsolete! Use the functions in MicroGlut instead!
 //void initKeymapManager();
 //char keyIsDown(unsigned char c);
 
 // FBO support
 
 //------------a structure for FBO information-------------------------------------
 typedef struct
 {
 	GLuint texid;
 	GLuint fb;
 	GLuint rb;
 	GLuint depth;
 	int width, height;
 } FBOstruct;
 
 FBOstruct *initFBO(int width, int height, int int_method);
 FBOstruct *initFBO2(int width, int height, int int_method, int create_depthimage);
 void useFBO(FBOstruct *out, FBOstruct *in1, FBOstruct *in2);
 void updateScreenSizeForFBOHandler(int w, int h); // Temporary workaround to inform useFBO of screen size changes
 
 #ifdef __cplusplus
 }
 #endif
 
 #endif