#ifndef _dmsUtil_h_
#define _dmsUtil_h_

#include <GL/gl.h>
#include <GL/glut.h>
#include <dms/Vector2.h>
#include <dms/Vector3.h>

#define DMS_X 0
#define DMS_Y 1
#define DMS_Z 2
#define DMS_W 3

namespace dms
{
    
void checkGLError(const char *prefix);
void drawString(char *s,void *font=GLUT_BITMAP_TIMES_ROMAN_24);
void drawString(char *s,const Vector3& position,void *font=GLUT_BITMAP_TIMES_ROMAN_24);
void drawString(char *s,const Vector2& position,void *font=GLUT_BITMAP_TIMES_ROMAN_24);
void drawAxes(void);

float currentTime(void);
void beginFrame(void);
float frameTime(void);
float deltaTime(void);

void computeNormal(const GLfloat *v0, const GLfloat *v1, const GLfloat *v2,
                   GLfloat *normal);
void computeNormal(const Vector3& v0, const Vector3& v1, const Vector3& v2,
                   Vector3& normal);

GLfloat degreesToRadians(GLfloat);
GLfloat radiansToDegrees(GLfloat);
}

#endif
