Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Cinder Tile Render example
void yourApp::renderTiles()
{
//the size here doesn't matter, but it will get distorted if it's not the same ratio as your window
gl::TileRender tr( getWindowWidth()*4, getWindowHeight()*4 );
//use the default cinder view to render from
tr.setMatricesWindow(getWindowWidth(), getWindowHeight());
while( tr.nextTile() ) {
draw();
}
writeImage( getHomeDirectory() + "appFolder" + getPathSeparator() + "output.png", tr.getSurface() );
//reset window matrix back to normal (if you aren't changing it with a camera)
gl::setMatricesWindow( getWindowWidth(), getWindowHeight(), true );
}
@sansumbrella

This comment has been minimized.

Copy link
Owner Author

commented May 7, 2010

Tile rendering using Cinder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.