glviewvol

diff src/rend_fast.cc @ 9:931a6b35f1cd

added lighting and openmp normal calculation
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 30 Dec 2014 21:20:57 +0200
parents fb6d93471352
children 89efc666105c
line diff
     1.1 --- a/src/rend_fast.cc	Tue Dec 30 20:03:32 2014 +0200
     1.2 +++ b/src/rend_fast.cc	Tue Dec 30 21:20:57 2014 +0200
     1.3 @@ -94,10 +94,12 @@
     1.4  
     1.5  		for(int i=0; i<zsz; i++) {
     1.6  			float z = (float)i;
     1.7 -			float *pptr = slice;
     1.8  
     1.9 +#pragma omp parallel for schedule(dynamic)
    1.10  			for(int j=0; j<ysz; j++) {
    1.11  				float y = (float)j;
    1.12 +
    1.13 +				float *pptr = slice + (j * xsz) * 4;
    1.14  				for(int k=0; k<xsz; k++) {
    1.15  					float x = (float)k;
    1.16