polyadvent

A game engine from scratch in C
git clone git://jb55.com/polyadvent
Log | Files | Refs | README

window.c (464B)


      1 
      2 
      3 #include "gl.h"
      4 #include "mat4.h"
      5 #include "window.h"
      6 #include "engine.h"
      7 #include "update.h"
      8 
      9 
     10 void handle_resize(struct engine *game, int width, int height) {
     11   /* printf("resizing %d %d\n", width, height); */
     12   glViewport( 0, 0, width, height );
     13   game->width = width;
     14   game->height = height;
     15 
     16   /* glMatrixMode( GL_PROJECTION ); //Switch to setting the camera perspective */
     17   /* Set the camera perspective */
     18   /* glLoadIdentity(); //reset the camera */
     19 }