Пример #1
0
void TutorialApp::draw()
{	
	gl::clear( Color( 0, 0, 0 ), true );
	gl::enableDepthRead();
	gl::enableDepthWrite();
	
	// DRAW PARTICLES
	mParticleController.draw();
	
	// DRAW ZONE DIAGRAM
	gl::disableDepthRead();
	gl::disableDepthWrite();
	gl::setMatricesWindow( getWindowSize() );
	gl::pushModelView();
        gl::translate( Vec3f( 117.0f, getWindowHeight() - 117.0f, 0.0f ) );
        
        gl::color( ColorA( 1.0f, 0.25f, 0.25f, 1.0f ) );
        gl::drawSolidCircle( Vec2f::zero(), mZoneRadius );
    
        gl::color( ColorA( 0.25f, 0.25f, 1.0f, 1.0f ) );
        gl::drawSolidCircle( Vec2f::zero(), mThresh * mZoneRadius );    
        
        gl::color( ColorA( 1.0f, 1.0f, 1.0f, 0.25f ) );
        gl::drawStrokedCircle( Vec2f::zero(), 100.0f );
	gl::popModelView();
	
	// DRAW PARAMS WINDOW
	params::InterfaceGl::draw();
}
Пример #2
0
void Box2DTestApp::draw()
{
	gl::clear( Color( 0, 0, 0 ) );
	gl::enableAlphaBlending();

	particleController.draw();
}
Пример #3
0
void TutorialApp::draw()
{
    if(isFirst) {
        gl::clear( Color( 0, 0, 0 ), true );
        isFirst = false;
    }

    gl::enableAlphaBlending();
	
	if( mDrawImage ){
		mTexture.enableAndBind();
		gl::draw( mTexture, getWindowBounds() );
	}
    
//	if( mDrawParticles ){
		glDisable( GL_TEXTURE_2D );
		mParticleController.draw();
//	}
    
    if( mDrawImage ){
        mOverlay.enableAndBind();
        gl::draw( mOverlay, getWindowBounds() );
    }

//	if( mSaveFrames ){
//		writeImage( getHomeDirectory() / ( "image_" + toString( getElapsedFrames() ) + ".png" ), copyWindowSurface() );
//	}
}
Пример #4
0
void JtChapterOneApp::draw()
{
    //float gray = sin( getElapsedSeconds() ) * 0.5f + 0.5f;
    //gl::clear( Color( gray, gray, gray ), true);

    myPController.draw();
}
void HellCinderApp::draw()
{
    
    gl::clear( Color( 0, 0, 0 ), true );
	
	glDisable( GL_TEXTURE_2D );
	//gl::draw( texture, getWindowBounds() );

	particleController.draw();
}
Пример #6
0
void Day57App::draw()
{
    gl::clear(Color(0, 0, 0), true);
    gl::enableDepthRead();
    gl::enableDepthWrite();
    
    gl::color(ColorA(1.0f, 1.0f, 1.0f, 1.0f));
    mParticleController.draw();
    //	mParticleController.drawConnections();
}
Пример #7
0
void TutorialApp::draw()
{	
	gl::clear( Color( 0, 0, 0 ), true );
	
	mImage.enableAndBind();
	gl::draw( mImage, getWindowBounds() );
	
	glDisable( GL_TEXTURE_2D );
	glColor3f( 1, 1, 1 );
	mParticleController.draw();
}
Пример #8
0
void VideoPanApp::draw()
{
	// clear out the window with black
	
	gl::clear( Color( 0, 0, 0 ) ); 
	
	gl::setMatricesWindow(getWindowSize(), true);

	gl::rotate(90);
	mParticleController.draw();
	params::InterfaceGl::draw();
}
Пример #9
0
void FlockingApp::draw()
{	
	gl::clear( Color( 0, 0, 0.01f ), true );
	gl::enableDepthRead();
	gl::enableDepthWrite();
	
	// DRAW PARTICLES
	glColor4f( ColorA( 1.0f, 1.0f, 1.0f, 1.0f ) );
	mParticleController.draw();
	
	// DRAW PARAMS WINDOW
	mParams->draw();
}
Пример #10
0
void TutorialApp::draw()
{	
	gl::clear( Color( 0, 0, 0 ), true );
	
	if( mDrawImage ){
		mTexture.enableAndBind();
		gl::draw( mTexture, getWindowBounds() );
	}
	
	if( mDrawParticles ){
		glDisable( GL_TEXTURE_2D );
		mParticleController.draw();
	}
}
Пример #11
0
void FlockingApp::draw()
{	
	gl::clear( Color( 0, 0, 0 ), true );
	gl::enableDepthRead();
	gl::enableDepthWrite();

	gl::color( ColorA( 1.0f, 1.0f, 1.0f, 1.0f ) );
	mParticleController.draw();
	
	if( mSaveFrames ){
		writeImage( getHomeDirectory() / "flocking" / ("image_" + toString( getElapsedFrames() ) + ".png"), copyWindowSurface() );
	}
	
	// DRAW PARAMS WINDOW
	params::InterfaceGl::draw();
}
Пример #12
0
void chapter3App::draw()
{
	// clear out the window with black
	gl::clear( Color( 0, 0, 0 ) ); 
        
    if(mDrawImage)
    {
        mColorTexture.enableAndBind();
        gl::draw( mColorTexture, getWindowBounds());
    }
    
    if ( mDrawParticles )
    {
        glDisable(GL_TEXTURE_2D);
        mParticleController.draw();
    }
}
Пример #13
0
void syphonImpApp::renderSceneToFbo()
{
	// this will restore the old framebuffer binding when we leave this function
	// on non-OpenGL ES platforms, you can just call mFbo.unbindFramebuffer() at the end of the function
	// but this will restore the "screen" FBO on OpenGL ES, and does the right thing on both platforms
	gl::SaveFramebufferBinding bindingSaver;
	
	// bind the framebuffer - now everything we draw will go there
	myFbo.bindFramebuffer();
    gl::setViewport(myFbo.getBounds() );
    gl::setMatricesWindow( myFbo.getSize(), false );
	
	// clear out the FBO with blue
	gl::clear();
   mParticleController.update();
    mParticleController.draw();
    
}
Пример #14
0
void TutorialApp::draw()
{	
	gl::clear( Color( 0, 0, 0 ), true );
	
	if( mDrawImage ){
		mTexture.enableAndBind();
		gl::draw( mTexture, getWindowBounds() );
	}
	
	if( mDrawParticles ){
		glDisable( GL_TEXTURE_2D );
		mParticleController.draw();
	}
	
	if( mSaveFrames ){
		writeImage( getHomeDirectory() + "image_" + toString( getElapsedFrames() ) + ".png", copyWindowSurface() );
	}
}
Пример #15
0
void matrixP::draw() {
	gl::clear();
	if(mRenderParticles) mParticleController.draw();
}
Пример #16
0
// Draw
void PixarDemo2012::draw()
{

    gl::clear( ColorA(0.0f,0.0f,0.0f,1.0f) );

    //render Gradient FBO
    if(!drawMindField && !drawCloth)
    {
        renderGradientFBO();
    }

    gl::setViewport( getWindowBounds() );
    gl::setMatricesWindow( getWindowSize(), true );

    gl::clear( ColorA(0.0f,0.0f,0.0f,1.0f) );

    // draw FBO bg
    gl::color(1.0f,1.0f,1.0f);
    gl::draw( mGradientFBO.getTexture(0), Rectf( 0, 0, getWindowWidth(), getWindowHeight()) );

    if ( drawTitle ) {
        if ( mTime > 10.0f ) drawTitle = false;
        theTitle.Render();
    }


    // FFT stuff
    generateWaveforms();

    if ( drawMindField ) {
        theMindField.Render();
        drawFader();
        return;
    }
    if ( drawCubes ) {
        gl::popMatrices();
        gl::setMatrices( theCubes.cubesCamera );
        theCubes.Render();
    }
    if ( drawCloth ) {

        theCloth.Render();
        drawFader();
        return;
    }


    // Balls
    if ( !drawCubes ) {
        gl::setMatricesWindow( getWindowSize(), true );
        if (makeBall > 0.075f) mParticleController.addParticles(1,makeBall*100.0f,mTime);
        mParticleController.draw();
    }
    if ( drawFPS ) {
        string mString;
        mString = str(boost::format("FRAMERATE: %f") % getAverageFps() );
        gl::drawString( mString, Vec2f( 10.0f, 10.0f ), Color::white(), mFont );
    }

    drawFader();

}
Пример #17
0
//------------------------------------------------------------
//--
//------------------------------------------------------------
void cdr_Snow::draw()
{
    // clear out the window with black
    gl::clear( Color( 0, 0, 0.2f ) );
    myParticles.draw();
}