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

#ifdef USE_P3D

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

#include "power3d.h"

int SCREENWIDTH3D,
    SCREENHEIGHT3D,
    BPP3D;


///////////////////////////////////////////////
//          INITIALIZATION ROUTINES          //
///////////////////////////////////////////////

/* Initialize all our variables and SDL */
int P3D_Init(int argc, char** argv)
{
   glutInit(&argc, argv);

   return 0;
}



/* De-initialize all */
int P3D_Quit()
{
   return 0;
}


void P3D_MainLoop(void (*DisplayFunction)(void), void (*ReshapeFunction)(int width, int height))
{
   glutDisplayFunc(DisplayFunction);
   glutReshapeFunc(ReshapeFunction);
   glutIdleFunc(DisplayFunction);
   glutMainLoop();
}



///////////////////////////////////////
//          VERTEX ROUTINES          //
///////////////////////////////////////

P3D_Vertex2P P3D_FillVertex2P(float X, float Y)
{
   P3D_Vertex2P vertex;

   vertex.x = X;
   vertex.y = Y;

   return (vertex);
}



P3D_Vertex3P P3D_FillVertex3P(float X, float Y, float Z)
{
   P3D_Vertex3P vertex;

   vertex.x = X;
   vertex.y = Y;
   vertex.z = Z;

   return (vertex);
}

#endif
