1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
|
#ifndef MYGL_H
#define MYGL_H
#define GLEW_STATIC
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include <string>
#include <GL/glew.h>
#include "lib/gml/gml.h"
// includes boost now!
#include "float3.h"
inline void glVertexf3(const float3 &v)
{
glVertex3f(v.x,v.y,v.z);
}
inline void glColorf3(const float3& v)
{
glColor3f(v.x,v.y,v.z);
}
inline void glNormalf3(const float3 &v)
{
glNormal3f(v.x,v.y,v.z);
}
inline void glTranslatef3(const float3 &v)
{
glTranslatef(v.x,v.y,v.z);
}
inline void glSecondaryColorf3(const float3& v)
{
glSecondaryColor3f(v.x,v.y,v.z);
}
inline void glColorf4(const float3& v, const float& alpha)
{
glColor4f(v.x,v.y,v.z,alpha);
}
inline void glUniformf3(const GLint& location, const float3 &v)
{
glUniform3f(location, v.x,v.y,v.z);
}
void glBuildMipmaps(const GLenum target,GLint internalFormat,const GLsizei width,const GLsizei height,const GLenum format,const GLenum type,const void *data);
void SetTexGen(const float& scalex, const float& scaley, const float& offsetx, const float& offsety);
void RandomStartPicture(const std::string& sidePref);
void LoadStartPicture(const std::string& picture);
void ClearScreen();
void PrintLoadMsg(const char* text, bool swapbuffers = true);
void UnloadStartPicture();
bool ProgramStringIsNative(GLenum target, const char* filename);
unsigned int LoadVertexProgram(const char* filename);
unsigned int LoadFragmentProgram(const char* filename);
void glClearErrors();
void glSafeDeleteProgram(GLuint program);
void LoadExtensions();
void UnloadExtensions();
class CVertexArray;
CVertexArray* GetVertexArray();
#endif
|