A 3d fps game made in OpenGL
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Symmetry/src/main.c

54 lines
845 B

#define GLEW_STATIC
#include <GL/glew.h>
#include <stdio.h>
#include "log.h"
#include "window_system.h"
#include "game.h"
const int WIN_WIDTH = 800;
const int WIN_HEIGHT = 600;
int init();
void cleanup();
int main(int argc, char** args)
{
//Initialize window system and Glew
if(!init())
log_error("Main:main", "Could not initialize");
else
game_init();
cleanup();
log_message("Program exiting!");
return 0;
}
int init(void)
{
int success = 1;
if(window_init("Symmetry", WIN_WIDTH, WIN_HEIGHT))
{
//Initialize GLEW
glewExperimental = GL_TRUE;
GLenum glewError = glewInit();
if(glewError != GLEW_OK)
{
log_error("Main:init", "GLEW : %s", glewGetErrorString(glewError));
success = 0;
}
}
else
{
success = 0;
}
return success;
}
void cleanup()
{
game_cleanup();
window_cleanup();
}