2013-04-16 14:57:14 +00:00
|
|
|
#include "main.h"
|
|
|
|
|
|
|
|
#include <math.h>
|
|
|
|
#include "GL/gl.h"
|
2013-10-20 14:47:59 +00:00
|
|
|
#include "GL/glu.h"
|
2013-04-16 14:57:14 +00:00
|
|
|
|
|
|
|
void exploringInit()
|
|
|
|
{
|
|
|
|
glClearColor(0.0, 0.0, 0.0, 0.0);
|
|
|
|
|
|
|
|
glDisable(GL_LIGHTING);
|
|
|
|
|
|
|
|
glFrontFace(GL_CCW);
|
|
|
|
glCullFace(GL_BACK);
|
|
|
|
glEnable(GL_CULL_FACE);
|
|
|
|
|
|
|
|
glDepthFunc(GL_LESS);
|
|
|
|
glDepthMask(1);
|
|
|
|
glEnable(GL_DEPTH_TEST);
|
|
|
|
|
|
|
|
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
|
|
|
|
glEnable(GL_LINE_SMOOTH);
|
|
|
|
glLineWidth(1.0);
|
|
|
|
|
|
|
|
glDisable(GL_FOG);
|
|
|
|
|
|
|
|
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
|
|
|
}
|
|
|
|
|
|
|
|
void exploringSetViewPort(int width, int height, CameraDefinition* camera)
|
|
|
|
{
|
2013-04-27 19:41:57 +00:00
|
|
|
CameraPerspective perspective;
|
|
|
|
|
2013-04-16 14:57:14 +00:00
|
|
|
glViewport(0, 0, width, height);
|
|
|
|
|
|
|
|
glMatrixMode(GL_PROJECTION);
|
|
|
|
glLoadIdentity();
|
2013-04-27 19:41:57 +00:00
|
|
|
perspective = cameraGetPerspective(camera);
|
|
|
|
gluPerspective(perspective.yfov * 180.0 / M_PI, perspective.xratio, perspective.znear, perspective.zfar);
|
2013-04-16 14:57:14 +00:00
|
|
|
|
|
|
|
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
|
|
|
}
|
|
|
|
|
|
|
|
void exploringRenderFrame(Renderer* renderer)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void exploringStartStandAlone()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void exploringInterruptStandAlone()
|
|
|
|
{
|
|
|
|
}
|