Game Development Reference
In-Depth Information
void UIPGApp::draw()
{
// clear out the window with black
gl::clear( Color( 0, 0, 0 ) );
// apply the camera's transformation matrices
gl::setMatrices(m_camera);
// render a unit sphere at the origin
gl::drawSphere(Vec3f(0.f,0.f,0.f), 1.f, 24);
}
CINDER_APP_NATIVE(UIPGApp, RendererGl )
Thisisacomplete,albeitsimpleexampleofa Cinder projectthatplacesaperspectivecam-
era at the world space position, looking towards the origin. At the origin it renders a
white sphere. While this is a very simple example, it does show how little code is required
to begin implementing concepts or prototyping new ideas.
The Cinder library is far too extensive to present it in its entirety here, but it's definitely
worth checking it out. As a beginner it will give you a great head start by providing a less
intimidating experience, you can skip the complexity of configuring third party libraries
and get right down to coding.
Read more about it here: http://libcinder.org/
Search WWH ::




Custom Search