void Channel::frameDraw( const eq::uint128_t& frameID ) { //----- setup GL state applyBuffer(); applyViewport(); glMatrixMode( GL_PROJECTION ); glLoadIdentity(); applyFrustum(); glMatrixMode( GL_MODELVIEW ); glLoadIdentity(); applyHeadTransform(); setupAssemblyState(); _testFormats( 1.0f ); _testFormats( 0.5f ); _testFormats( 2.0f ); _testTiledOperations(); _testDepthAssemble(); resetAssemblyState(); }
void Channel::frameDraw( const eq::uint128_t& ) { // Setup frustum EQ_GL_CALL( applyBuffer( )); EQ_GL_CALL( applyViewport( )); EQ_GL_CALL( glMatrixMode( GL_PROJECTION )); EQ_GL_CALL( glLoadIdentity( )); EQ_GL_CALL( applyFrustum( )); EQ_GL_CALL( glMatrixMode( GL_MODELVIEW )); EQ_GL_CALL( glLoadIdentity( )); // Setup lights before applying head transform, so the light will be // consistent in the cave const FrameData& frameData = _getFrameData(); const eq::Matrix4f& rotation = frameData.getRotation(); const eq::Vector3f& translation = frameData.getTranslation(); eq::Matrix4f invRotationM; rotation.inverse( invRotationM ); setLights( invRotationM ); EQ_GL_CALL( applyHeadTransform( )); glTranslatef( translation.x(), translation.y(), translation.z() ); glMultMatrixf( rotation.array ); Pipe* pipe = static_cast<Pipe*>( getPipe( )); Renderer* renderer = pipe->getRenderer(); LBASSERT( renderer ); const eq::Matrix4f& modelview = _computeModelView(); // set fancy data colors const eq::Vector4f taintColor = _getTaintColor( frameData.getColorMode(), getUniqueColor( )); const int normalsQuality = _getFrameData().getNormalsQuality(); const eq::Range& range = getRange(); renderer->render( range, modelview, invRotationM, taintColor, normalsQuality ); checkError( "error during rendering " ); _drawRange = range; #ifndef NDEBUG outlineViewport(); #endif }
void Channel::frameDraw( const eq::uint128_t& frameID ) { // Setup frustum EQ_GL_CALL( applyBuffer( )); EQ_GL_CALL( applyViewport( )); EQ_GL_CALL( glMatrixMode( GL_PROJECTION )); EQ_GL_CALL( glLoadIdentity( )); EQ_GL_CALL( applyFrustum( )); EQ_GL_CALL( glMatrixMode( GL_MODELVIEW )); EQ_GL_CALL( glLoadIdentity( )); // Setup lights before applying head transform, so the light will be // consistent in the cave const FrameData& frameData = _getFrameData(); const eq::Matrix4f& rotation = frameData.getRotation(); const eq::Vector3f& translation = frameData.getTranslation(); eq::Matrix4f invRotationM; rotation.inverse( invRotationM ); setLights( invRotationM ); EQ_GL_CALL( applyHeadTransform( )); glTranslatef( translation.x(), translation.y(), translation.z() ); glMultMatrixf( rotation.array ); Pipe* pipe = static_cast<Pipe*>( getPipe( )); Renderer* renderer = pipe->getRenderer(); EQASSERT( renderer ); eq::Matrix4f modelviewM; // modelview matrix eq::Matrix3f modelviewITM; // modelview inversed transposed matrix _calcMVandITMV( modelviewM, modelviewITM ); const eq::Range& range = getRange(); renderer->render( range, modelviewM, modelviewITM, invRotationM ); checkError( "error during rendering " ); _drawRange = range; #ifndef NDEBUG outlineViewport(); #endif }