/*
*     ___                       ____ ___
*    / _ \___ _    _____ ____  |_  // _ \
*   / ___/ _ \ |/|/ / -_) __/ _/_ </ // /
*  /_/   \___/__,__/\__/_/   /____/____/
*
*
*   Original Code by John Garrison
*   Written August 30, 1999
*   To be released under the LGPL
*
*   Power3D initialization and misc. routines
*
*   See LICENSE.TXT for more LGPL info
*/

#ifndef _P3D_H
#define _P3D_H

#ifdef __cplusplus
extern "C" {
#endif

#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glut.h>

#define P3D_COLORBUFFER GL_COLOR_BUFFER_BIT
#define P3D_DEPTHBUFFER GL_DEPTH_BUFFER_BIT
#ifndef PI
   #define PI 3.1415926535897
#endif

typedef struct _Vertex2P{
   float x;
   float y;
}P3D_Vertex2P;

typedef struct _Vertex3P{
   float x;
   float y;
   float z;
}P3D_Vertex3P;


extern int SCREENWIDTH3D,
           SCREENHEIGHT3D,
           BPP3D;

#include "gfx3d.h"

typedef struct _Object{
   int list;
   P3D_Color color;
   float posx;
   float posy;
   float posz;
   float rotx;
   float roty;
   float rotz;
}P3D_Object;

#include "objects3d.h"
#include "render.h"

int P3D_Init(int argc, char** argv);
int P3D_Quit();
void P3D_MainLoop(void (*DisplayFunction)(void), void (*ReshapeFunction)(int width, int height));

P3D_Vertex2P P3D_FillVertex2P(float X, float Y);
P3D_Vertex3P P3D_FillVertex3P(float X, float Y, float Z);

#ifdef __cplusplus
};
#endif

#endif
