qvolray
diff src/volray.cc @ 28:aeef3c2ae472
the slice widget works fine
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 14 Apr 2012 16:35:30 +0300 |
parents | 53aca4775514 |
children | 93d889a3726a |
line diff
1.1 --- a/src/volray.cc Sat Apr 14 06:37:31 2012 +0300 1.2 +++ b/src/volray.cc Sat Apr 14 16:35:30 2012 +0300 1.3 @@ -143,7 +143,7 @@ 1.4 1.5 if(volume) { 1.6 render_volume(); 1.7 - draw_slice(); 1.8 + //draw_slice(); 1.9 draw_xfer_func(); 1.10 } 1.11 1.12 @@ -206,14 +206,8 @@ 1.13 glPopMatrix(); 1.14 } 1.15 1.16 -static void draw_slice(void) 1.17 +void volray_draw_slice(void) 1.18 { 1.19 - glMatrixMode(GL_MODELVIEW); 1.20 - glPushMatrix(); 1.21 - glTranslatef(0.9, 0.9, 0); 1.22 - glScalef(0.3, 0.3 * ((float)win_xsz / win_ysz), 1); 1.23 - glTranslatef(-1, -1, 0); 1.24 - 1.25 glActiveTexture(GL_TEXTURE0); 1.26 glBindTexture(GL_TEXTURE_3D, volume->get_texture()); 1.27 glEnable(GL_TEXTURE_3D); 1.28 @@ -238,7 +232,6 @@ 1.29 glDisable(GL_TEXTURE_1D); 1.30 glActiveTexture(GL_TEXTURE0); 1.31 glDisable(GL_TEXTURE_3D); 1.32 - glPopMatrix(); 1.33 } 1.34 1.35 static void draw_xfer_func(void)