本文整理汇总了C++中Controller::drawBubbles方法的典型用法代码示例。如果您正苦于以下问题:C++ Controller::drawBubbles方法的具体用法?C++ Controller::drawBubbles怎么用?C++ Controller::drawBubbles使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Controller
的用法示例。
在下文中一共展示了Controller::drawBubbles方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: drawGuts
void BubbleChamberApp::drawGuts(Area area)
{
float power = mRoom.getPower();
Color powerColor = Color( power, power, power );
drawIntoRoomFbo();
gl::setMatricesWindow( getWindowSize(), false );
//gl::setViewport( getWindowBounds() );
gl::setViewport( area );
gl::disableDepthRead();
gl::disableDepthWrite();
gl::enableAlphaBlending();
gl::enable( GL_TEXTURE_2D );
gl::color( ColorA( 1.0f, 1.0f, 1.0f, 1.0f ) );
// ROOM
mRoomFbo.bindTexture();
gl::drawSolidRect( getWindowBounds() );
//mActiveCam.setFixedPipeline();
// PANEL
drawInfoPanel();
gl::pushMatrices();
gl::setMatrices( mActiveCam.getCam() );
glMatrixMode(GL_PROJECTION);
glLoadIdentity(); // zero it out
glMultMatrixf(mActiveCam.mProjectionMatrix); // Apply the matrix to the loaded projection matrix
glMatrixMode(GL_MODELVIEW); // Return to our modelview matrix
gl::disable( GL_TEXTURE_2D );
gl::enableDepthWrite();
gl::enableDepthRead();
gl::enableAlphaBlending();
gl::color( ColorA( powerColor, 1.0f ) );
// PARTICLES
mController.drawParticles( power );
// DRAW GIBS
mController.drawGibs();
// BUBBLES
mController.drawBubbles( power );
gl::enable( GL_TEXTURE_2D );
gl::disableDepthWrite();
// DECALS
gl::color( powerColor );
mDecalTex.bind( 0 );
mController.drawDecals();
// SMOKES
Vec3f right, up;
mActiveCam.getCam().getBillboardVectors( &right, &up );
mSmokeTex.bind( 0 );
mController.drawSmokes( right, up );
gl::disable( GL_TEXTURE_2D );
gl::enableDepthWrite();
gl::color( powerColor );
// MOTHS
mController.drawMoths();
// GLOWCUBES
mGlowCubeShader.bind();
mGlowCubeShader.uniform( "eyePos", mActiveCam.getEye() );
mGlowCubeShader.uniform( "power", mRoom.getPower() );
mGlowCubeShader.uniform( "mvpMatrix", mActiveCam.mMvpMatrix );
mController.drawGlowCubes( &mGlowCubeShader );
mGlowCubeShader.unbind();
if( mSaveFrames ){
// writeImage( getHomeDirectory() + "BubbleChamber/" + toString( mNumSaveFrames ) + ".png", copyWindowSurface() );
mNumSaveFrames ++;
}
gl::popMatrices();
}
示例2: draw
void BubbleChamberApp::draw()
{
float power = mRoom.getPower();
Color powerColor = Color( power, power, power );
gl::clear( ColorA( 0.1f, 0.1f, 0.1f, 0.0f ), true );
gl::setMatricesWindow( getWindowSize(), false );
gl::setViewport( getWindowBounds() );
gl::disableDepthRead();
gl::disableDepthWrite();
gl::enableAlphaBlending();
gl::enable( GL_TEXTURE_2D );
gl::color( ColorA( 1.0f, 1.0f, 1.0f, 1.0f ) );
// ROOM
mRoomFbo.bindTexture();
gl::drawSolidRect( getWindowBounds() );
gl::setMatrices( mSpringCam.getCam() );
// PANEL
drawInfoPanel();
gl::disable( GL_TEXTURE_2D );
gl::enableDepthWrite();
gl::enableDepthRead();
gl::enableAlphaBlending();
gl::color( ColorA( powerColor, 1.0f ) );
// PARTICLES
mController.drawParticles( power );
// DRAW GIBS
mController.drawGibs();
// BUBBLES
mController.drawBubbles( power );
gl::enable( GL_TEXTURE_2D );
gl::disableDepthWrite();
// DECALS
gl::color( powerColor );
mDecalTex.bind( 0 );
mController.drawDecals();
// SMOKES
Vec3f right, up;
mSpringCam.getCam().getBillboardVectors( &right, &up );
mSmokeTex.bind( 0 );
mController.drawSmokes( right, up );
gl::disable( GL_TEXTURE_2D );
gl::enableDepthWrite();
gl::color( powerColor );
// MOTHS
mController.drawMoths();
// GLOWCUBES
mGlowCubeShader.bind();
mGlowCubeShader.uniform( "eyePos", mSpringCam.getEye() );
mGlowCubeShader.uniform( "power", mRoom.getPower() );
mGlowCubeShader.uniform( "mvpMatrix", mSpringCam.mMvpMatrix );
mController.drawGlowCubes( &mGlowCubeShader );
mGlowCubeShader.unbind();
if( mSaveFrames ){
writeImage( *getHomeDirectory().c_str() + "BubbleChamber/" + toString( mNumSaveFrames ) + ".png", copyWindowSurface() );
mNumSaveFrames ++;
}
}