paysages3d/src/exploring/main.c

51 lines
938 B
C
Raw Normal View History

#include "main.h"
#include <math.h>
#include "GL/gl.h"
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)
{
glViewport(0, 0, width, height);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(camera->yfov * 180.0 / M_PI, camera->xratio, camera->znear, camera->zfar);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
}
void exploringRenderFrame(Renderer* renderer)
{
}
void exploringStartStandAlone()
{
}
void exploringInterruptStandAlone()
{
}