qvolray

changeset 17:535762131d34

fixed to compile on visual studio 2010
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 11 Apr 2012 01:44:45 +0200
parents fc1210b8cacf
children 3d05c261a2f4
files .hgignore qvolray.pro src/volume.cc
diffstat 3 files changed, 17 insertions(+), 9 deletions(-) [+]
line diff
     1.1 --- a/.hgignore	Wed Apr 11 01:00:40 2012 +0300
     1.2 +++ b/.hgignore	Wed Apr 11 01:44:45 2012 +0200
     1.3 @@ -3,3 +3,12 @@
     1.4  \.d$
     1.5  \.swp$
     1.6  ^data
     1.7 +^debug
     1.8 +^release
     1.9 +\.sln$
    1.10 +\.suo$
    1.11 +\.vcproj
    1.12 +\.vcxproj
    1.13 +\.pdb$
    1.14 +^ipch
    1.15 +\.sdf$
     2.1 --- a/qvolray.pro	Wed Apr 11 01:00:40 2012 +0300
     2.2 +++ b/qvolray.pro	Wed Apr 11 01:44:45 2012 +0200
     2.3 @@ -7,7 +7,9 @@
     2.4  contains(QMAKE_CXX, g++) {
     2.5  	QMAKE_CXXFLAGS += -std=c++0x -pedantic
     2.6  }
     2.7 -LIBS += -lGLEW -limago -lvmath
     2.8 +
     2.9 +unix:LIBS += -lGLEW -limago -lvmath
    2.10 +win32:LIBS += -lglew32 -llibimago2 -llibvmath -llibpng -lzlib -ljpeglib
    2.11  
    2.12  # Input
    2.13  HEADERS += src/sdr.h src/volray.h src/volume.h src/ui.h
     3.1 --- a/src/volume.cc	Wed Apr 11 01:00:40 2012 +0300
     3.2 +++ b/src/volume.cc	Wed Apr 11 01:44:45 2012 +0200
     3.3 @@ -4,13 +4,7 @@
     3.4  #include <ctype.h>
     3.5  #include <list>
     3.6  #include <string>
     3.7 -
     3.8 -#ifndef __APPLE__
     3.9 -#include <GL/gl.h>
    3.10 -#else
    3.11 -#include <OpenGL/gl.h>
    3.12 -#endif
    3.13 -
    3.14 +#include <GL/glew.h>
    3.15  #include <imago2.h>
    3.16  #include "volume.h"
    3.17  
    3.18 @@ -59,7 +53,10 @@
    3.19  	img_destroy(&img);
    3.20  
    3.21  	/* put the volume data into the alpha component */
    3.22 -	for(auto slice : slist) {
    3.23 +	//for(auto slice : slist) { // fucking vs2010 doesn't support range-for
    3.24 +	for(auto iter = slist.begin(); iter != slist.end(); iter++) {
    3.25 +		auto slice = *iter;
    3.26 +
    3.27  		int x, y, xsz, ysz;
    3.28  		float *pixels, *src;
    3.29