Baby Steps

11:39 AM

Baby Steps

I just added this:

void Basic3DApp::draw()
{
    // clear out the window with black
    gl::clear( Color( 0, 0, 0 ) );
    gl::rotate( Vec3f(0,1,0) );
    gl::drawCube(
             Vec3f(getWindowWidth()/2,getWindowHeight()/2,0),
             Vec3f(100,100,100) );
}

Now the cube is rotating in 3D space.

I have a solid cube rotating about the Y axis. This I achieved before lunchtime on my first day of experimenting with 3D in C++

Leave a Reply

Your email address will not be published. Required fields are marked *