[artoolkit-commits] artoolkit/lib/SRC/ARvrml arViewer.cpp,1.1,1.2
Optical marker tracking and overlay for augmented reality.
Brought to you by:
philip_lamb
From: Philip L. <phi...@us...> - 2006-05-28 09:24:53
|
Update of /cvsroot/artoolkit/artoolkit/lib/SRC/ARvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2968 Modified Files: arViewer.cpp Log Message: Trivial formatting pickiness. Index: arViewer.cpp =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/lib/SRC/ARvrml/arViewer.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** arViewer.cpp 19 Nov 2004 03:26:52 -0000 1.1 --- arViewer.cpp 28 May 2006 09:24:49 -0000 1.2 *************** *** 81,93 **** void arVrmlViewer::redraw() { ! double start = browser::current_time(); glMatrixMode(GL_MODELVIEW); glPushMatrix(); glTranslated( translation[0], translation[1], translation[2] ); ! if( rotation[0] != 0.0 ) { ! glRotated( rotation[0], rotation[1], rotation[2], rotation[3] ); } ! glScaled( scale[0], scale[1], scale[2] ); ! #if USE_STENCIL_SHAPE glEnable(GL_STENCIL_TEST); --- 81,93 ---- void arVrmlViewer::redraw() { ! double start = browser::current_time(); glMatrixMode(GL_MODELVIEW); glPushMatrix(); glTranslated( translation[0], translation[1], translation[2] ); ! if (rotation[0] != 0.0) { ! glRotated(rotation[0], rotation[1], rotation[2], rotation[3]); } ! glScaled(scale[0], scale[1], scale[2]); ! #if USE_STENCIL_SHAPE glEnable(GL_STENCIL_TEST); *************** *** 98,135 **** glDepthFunc(GL_LEQUAL); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); ! glDisable( GL_FOG ); // this is a global attribute ! glDisable( GL_TEXTURE_2D ); ! glEnable( GL_CULL_FACE ); ! glFrontFace( GL_CCW ); ! glCullFace( GL_BACK ); ! ! if( internal_light ) { ! if (lit) glEnable( GL_LIGHTING ); ! glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE); ! glEnable(GL_NORMALIZE); ! glDisable( GL_COLOR_MATERIAL ); ! glDisable(GL_BLEND); ! glShadeModel( GL_SMOOTH ); ! ! for(int i=0; i<max_lights; ++i) { ! light_info_[i].type = light_unused; ! GLenum light = (GLenum) (GL_LIGHT0 + i); ! glDisable( light ); ! } ! } ! objects = 0; nested_objects = 0; sensitive = 0; ! this->browser.render(*this); ! ! if( internal_light ) { ! if (lit) glDisable( GL_LIGHTING ); ! } glDisable(GL_BLEND); ! glDisable( GL_CULL_FACE ); ! glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE ); ! glMatrixMode(GL_MODELVIEW); glPopMatrix(); --- 98,135 ---- glDepthFunc(GL_LEQUAL); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); ! glDisable(GL_FOG); // this is a global attribute ! glDisable(GL_TEXTURE_2D); ! glEnable(GL_CULL_FACE); ! glFrontFace(GL_CCW); ! glCullFace(GL_BACK); ! ! if (internal_light) { ! if (lit) glEnable(GL_LIGHTING); ! glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE); ! glEnable(GL_NORMALIZE); ! glDisable(GL_COLOR_MATERIAL); ! glDisable(GL_BLEND); ! glShadeModel(GL_SMOOTH); ! ! for (int i = 0; i < max_lights; ++i) { ! light_info_[i].type = light_unused; ! GLenum light = (GLenum) (GL_LIGHT0 + i); ! glDisable(light); ! } ! } ! objects = 0; nested_objects = 0; sensitive = 0; ! this->browser.render(*this); ! ! if (internal_light) { ! if (lit) glDisable(GL_LIGHTING); ! } glDisable(GL_BLEND); ! glDisable(GL_CULL_FACE); ! glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); ! glMatrixMode(GL_MODELVIEW); glPopMatrix(); *************** *** 172,176 **** unsigned char ** pixels) { ! return 0; } --- 172,176 ---- unsigned char ** pixels) { ! return 0; } *************** *** 180,184 **** const openvrml::vec3f & direction) { ! if( internal_light ) return gl::viewer::insert_dir_light(ambientIntensity,intensity,color,direction); return 0; } --- 180,184 ---- const openvrml::vec3f & direction) { ! if (internal_light) return gl::viewer::insert_dir_light(ambientIntensity, intensity, color, direction); return 0; } *************** *** 191,195 **** float radius) { ! if( internal_light ) return gl::viewer::insert_point_light(ambientIntensity,attenuation,color,intensity,location,radius); return 0; --- 191,195 ---- float radius) { ! if (internal_light) return gl::viewer::insert_point_light(ambientIntensity, attenuation, color, intensity, location, radius); return 0; *************** *** 207,211 **** float radius) { ! if( internal_light ) return gl::viewer::insert_spot_light(ambientIntensity,attenuation,beamWidth,color,cutOffAngle, direction, intensity, location, radius); return 0; } --- 207,211 ---- float radius) { ! if (internal_light) return gl::viewer::insert_spot_light(ambientIntensity, attenuation, beamWidth, color,cutOffAngle, direction, intensity, location, radius); return 0; } |