sphore 0.0.1
SPH openGL rendering engine

src/glut-device.c File Reference

Code for handeling a glut window. More...

#include "sphore.h"
#include "settings.h"
#include "glut-device.h"
#include "render.h"
#include <GL/glut.h>

Functions

void glut_reshape_function (int width, int height)
 Tells glut what to do when the window changes shape.
void glut_special_key (int key, int x, int y)
void glut_key (unsigned char key, int x, int y)
void glut_device_init ()
 Initialises a glut window for rendering to.
void glut_main_loop ()
 Enter the interactive loop.
void glut_passive_mouse (int x, int y)

Detailed Description

Code for handeling a glut window.


Function Documentation

void glut_device_init ( )

Initialises a glut window for rendering to.

void glut_key ( unsigned char  key,
int  x,
int  y 
)
void glut_main_loop ( void  )

Enter the interactive loop.

Due to the limitations of glut, you will never return from this function!

void glut_passive_mouse ( int  x,
int  y 
)
void glut_reshape_function ( int  width,
int  height 
)

Tells glut what to do when the window changes shape.

Updates the viewports!

Parameters:
[in]widthThe new width of the window.
[in]heightThe new height of the window.
void glut_special_key ( int  key,
int  x,
int  y 
)
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines