#define VIEWPORT_SIZE 1024

#include "gluos.h"
#if defined(USE_MGL_NAMESPACE)
#include "gl_mangle.h"
#include <GL/gl.h>

void GLAPIENTRY glDisable( GLenum cap ){
}
void GLAPIENTRY glEnable(GLenum cap){
}
void GLAPIENTRY glMapGrid1d( GLint un, GLdouble u1, GLdouble u2 ){
}
void GLAPIENTRY glPushAttrib( GLbitfield mask ){
}
void GLAPIENTRY glPopAttrib( void ){
}
void GLAPIENTRY glMapGrid1f( GLint un, GLfloat u1, GLfloat u2 ){
}
void GLAPIENTRY glMap1f( GLenum target, GLfloat u1, GLfloat u2,
                               GLint stride,
							   GLint order, const GLfloat *points ){
}
void GLAPIENTRY glEvalMesh1( GLenum mode, GLint i1, GLint i2 ){
}
void GLAPIENTRY glEvalPoint1( GLint i ){
}
void GLAPIENTRY glEvalCoord1f( GLfloat u ){
}
void GLAPIENTRY glBegin( GLenum mode ){
}
void GLAPIENTRY glEnd( void ){
}
void GLAPIENTRY glGetFloatv( GLenum pname, GLfloat *params ){
	if (pname == GL_MODELVIEW_MATRIX || pname == GL_PROJECTION_MATRIX){
		for (int i = 0; i < 16; ++i) params[i] = 0.0f;
		params[0] = params[5] = params[10] = params[15] = 1.0f;
	}
}
static GLint viewport[4] = {0, 0, VIEWPORT_SIZE, VIEWPORT_SIZE};
void GLAPIENTRY glGetIntegerv( GLenum pname, GLint *params ){
	if (pname == GL_VIEWPORT){
		for (int i = 0; i < 4; ++i) params[i] = viewport[i];
	}
}
void GLAPIENTRY glViewport( GLint x, GLint y, GLsizei width, GLsizei height ){
	viewport[0] = x, viewport[1] = y;
	viewport[2] = width, viewport[3] = height;
}
void GLAPIENTRY glMapGrid2d( GLint un, GLdouble u1, GLdouble u2,
							GLint vn, GLdouble v1, GLdouble v2 ){
}
void GLAPIENTRY glPolygonMode( GLenum face, GLenum mode ){
}
void GLAPIENTRY glMap2f( GLenum target,
		     GLfloat u1, GLfloat u2, GLint ustride, GLint uorder,
		     GLfloat v1, GLfloat v2, GLint vstride, GLint vorder,
			 const GLfloat *points ){
}
void GLAPIENTRY glEvalCoord2f( GLfloat u, GLfloat v ){
}
void GLAPIENTRY glEvalMesh2( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 ){
}
void GLAPIENTRY glEvalPoint2( GLint i, GLint j ){
}
void GLAPIENTRY glVertex3fv( const GLfloat *v ){
}
void GLAPIENTRY glNormal3fv( const GLfloat *v ){
}
#endif
