#include <iostream>
#include <GL/glew.h>
#include <GL/glut.h>
#include "globals.h"
#include "display.h"
#include "input.h"
#include "ovwater.h"
#include "mesh.h"
#include "shader.h"
#include "univar.h"
#include "texture2d.h"
Functions | |
void | Reshape (int w, int h) |
Reshapes the Glut window. | |
void | Idle () |
Idle function in the Glut loop. | |
void | Display () |
Display function for Glut. | |
void | InitGL () |
Initialization function for OpenGL. | |
void | LoadTextures () |
Load textures. | |
void | LoadShaders () |
Load shaders. | |
void | InitScene () |
Initialize scene. | |
int | main (int argc, char **argv) |
The main function for the testshell. |
Startup source file for the OceanView project.
void Display | ( | ) |
Display function for Glut.
This function draws a frame and is called back again using glutPostRedisplay. It clears the framebuffer, calls the DrawScene function and swaps buffers.
void Idle | ( | ) |
Idle function in the Glut loop.
This function is called when a frame is rendered. It handles input and calculates the new time and delta time.
void InitGL | ( | ) |
Initialization function for OpenGL.
This function sets up everything in Glut and OpenGL that is needed. Glew is also initialized from here. This must be run before textures or shaders are loded.
void InitScene | ( | ) |
Initialize scene.
void LoadShaders | ( | ) |
Load shaders.
Shaders are loaded in this function, also uniform variables can be created here.
void LoadTextures | ( | ) |
Load textures.
Load textures for the testshell.
int main | ( | int | argc, | |
char ** | argv | |||
) |
The main function for the testshell.
This is the main function in the testshell. It starts Glut and initializes OceanView.
argc | argument count. | |
argv | arguments. |
void Reshape | ( | int | w, | |
int | h | |||
) |
Reshapes the Glut window.
This function is called when the Glut window is resized. It sets the new viewport size and tells the camera to change the projection matrix.
w | new width. | |
h | new height. |