erebus

diff src/main.cc @ 23:56d504cc555a

- debugging scale factor for render size - fixed un-normalized normals after transforms in the SceneNode
author John Tsiombikas <nuclear@member.fsf.org>
date Thu, 29 May 2014 07:47:52 +0300
parents e49f4d7ad04c
children c8a6fb04fefa
line diff
     1.1 --- a/src/main.cc	Thu May 29 03:35:04 2014 +0300
     1.2 +++ b/src/main.cc	Thu May 29 07:47:52 2014 +0300
     1.3 @@ -5,6 +5,8 @@
     1.4  #include "opengl.h"
     1.5  #include "erebus.h"
     1.6  
     1.7 +#define SCALE 2
     1.8 +
     1.9  static bool init();
    1.10  static void cleanup();
    1.11  static void resize_rtarget(int xsz, int ysz);
    1.12 @@ -59,8 +61,8 @@
    1.13  
    1.14  static bool init()
    1.15  {
    1.16 -	width = glutGet(GLUT_WINDOW_WIDTH) / 2;
    1.17 -	height = glutGet(GLUT_WINDOW_HEIGHT) / 2;
    1.18 +	width = glutGet(GLUT_WINDOW_WIDTH) / SCALE;
    1.19 +	height = glutGet(GLUT_WINDOW_HEIGHT) / SCALE;
    1.20  
    1.21  	if(!(erb = erb_init())) {
    1.22  		return false;
    1.23 @@ -95,8 +97,8 @@
    1.24  {
    1.25  	static unsigned char *defpix;
    1.26  
    1.27 -	width = xsz / 2;
    1.28 -	height = ysz / 2;
    1.29 +	width = xsz / SCALE;
    1.30 +	height = ysz / SCALE;
    1.31  
    1.32  	if(width <= rtex_width && height <= rtex_height) {
    1.33  		return;