Index: trunk/src/gfx/keyframed_mesh.cc
===================================================================
--- trunk/src/gfx/keyframed_mesh.cc	(revision 395)
+++ trunk/src/gfx/keyframed_mesh.cc	(revision 406)
@@ -71,5 +71,5 @@
 	if ( m_active )
 	{
-		float tick_time = ( (float)a_anim_time * 0.001f ) * anim->get_frame_rate();
+		float tick_time = ( static_cast<float>( a_anim_time ) * 0.001f ) * anim->get_frame_rate();
 		float duration  = anim->is_looping() ? anim->get_duration() + 1.0f : anim->get_duration();
 		if ( tick_time >= duration )
@@ -82,5 +82,5 @@
 			{
 				m_active     = false;
-				m_last_frame = (uint32)anim->get_end();
+				m_last_frame = static_cast<uint32>( anim->get_end() );
 				m_next_frame = m_last_frame;
 				m_interpolation = 0.0f;
@@ -88,7 +88,7 @@
 			}
 		}
-		m_last_frame    = (uint32)( glm::floor( tick_time ) + anim->get_start() );
+		m_last_frame    = static_cast<uint32>( glm::floor( tick_time ) + anim->get_start() );
 		m_next_frame    = m_last_frame + 1;
-		if ( m_next_frame > (uint32)anim->get_end() ) m_next_frame = (uint32)anim->get_start();
+		if ( m_next_frame > static_cast<uint32>( anim->get_end() ) ) m_next_frame = static_cast<uint32>( anim->get_start() );
 		m_interpolation = tick_time - glm::floor( tick_time );
 	}
@@ -152,9 +152,9 @@
 	{
 		uint32 base_offset = m_next_frame * m_vertex_count * m_vsize; 
-		m_context->update_attribute_offset( m_va, (slot)m_loc_next_position, base_offset );
-		m_context->update_attribute_offset( m_va, (slot)m_loc_next_normal, base_offset + sizeof( vec3 ) );
+		m_context->update_attribute_offset( m_va, static_cast<slot>( m_loc_next_position ), base_offset );
+		m_context->update_attribute_offset( m_va, static_cast<slot>( m_loc_next_normal ), base_offset + sizeof( vec3 ) );
 		if ( m_has_tangent && m_loc_next_tangent != -1 )
 		{
-			m_context->update_attribute_offset( m_va, (slot)m_loc_next_tangent, base_offset + 2*sizeof( vec3 ) );
+			m_context->update_attribute_offset( m_va, static_cast<slot>( m_loc_next_tangent ), base_offset + 2*sizeof( vec3 ) );
 		}
 		m_gpu_next_frame = m_next_frame;
@@ -172,8 +172,8 @@
 			m_loc_next_tangent  = dev->get_attribute_location( a_program, "nv_next_tangent" );
 
-		m_context->add_vertex_buffer( m_va, (slot)m_loc_next_position, m_pbuffer, FLOAT, 3, 0, m_vsize, false );
-		m_context->add_vertex_buffer( m_va, (slot)m_loc_next_normal,   m_pbuffer, FLOAT, 3, sizeof( vec3 ), m_vsize, false );
+		m_context->add_vertex_buffer( m_va, static_cast<slot>( m_loc_next_position ), m_pbuffer, FLOAT, 3, 0, m_vsize, false );
+		m_context->add_vertex_buffer( m_va, static_cast<slot>( m_loc_next_normal ),   m_pbuffer, FLOAT, 3, sizeof( vec3 ), m_vsize, false );
 		if ( m_has_tangent )
-			m_context->add_vertex_buffer( m_va, (slot)m_loc_next_tangent, m_pbuffer, FLOAT, 4, 2*sizeof( vec3 ), m_vsize, false );
+			m_context->add_vertex_buffer( m_va, static_cast<slot>( m_loc_next_tangent ), m_pbuffer, FLOAT, 4, 2*sizeof( vec3 ), m_vsize, false );
 	}
 	keyframed_mesh::update( a_program );
@@ -184,11 +184,11 @@
 {
 	m_va      = m_context->create_vertex_array();
-	m_pbuffer = m_context->get_device()->create_buffer( VERTEX_BUFFER, STATIC_DRAW, m_vertex_count * m_vsize, (void*)m_vchannel->data );
+	m_pbuffer = m_context->get_device()->create_buffer( VERTEX_BUFFER, STATIC_DRAW, m_vertex_count * m_vsize, m_vchannel->data );
 	m_context->add_vertex_buffers( m_va, m_pbuffer, m_vchannel );
 
-	buffer  vb = m_context->get_device()->create_buffer( VERTEX_BUFFER, STATIC_DRAW, m_vertex_count * sizeof( vec2 ), (void*)m_mesh_data->get_channel<vertex_t>()->data );
+	buffer  vb = m_context->get_device()->create_buffer( VERTEX_BUFFER, STATIC_DRAW, m_vertex_count * sizeof( vec2 ), m_mesh_data->get_channel<vertex_t>()->data );
 	m_context->add_vertex_buffers( m_va, vb, m_mesh_data->get_channel<vertex_t>() );
 
-	buffer  ib = m_context->get_device()->create_buffer( INDEX_BUFFER, STATIC_DRAW, m_mesh_data->get_index_channel()->size(), (void*)m_mesh_data->get_index_channel()->data );
+	buffer  ib = m_context->get_device()->create_buffer( INDEX_BUFFER, STATIC_DRAW, m_mesh_data->get_index_channel()->size(), m_mesh_data->get_index_channel()->data );
 
 	m_context->set_index_buffer( m_va, ib, m_mesh_data->get_index_channel()->desc.slots[0].etype, true );
@@ -206,5 +206,5 @@
 		const vertex_pnt* prev = data + m_vertex_count * m_last_frame;
 		const vertex_pnt* next = data + m_vertex_count * m_next_frame;
-		      vertex_pnt* vtx  = (vertex_pnt*)m_data;
+		      vertex_pnt* vtx  = reinterpret_cast<vertex_pnt*>( m_data );
 		for ( size_t i = 0; i < m_vertex_count; ++i )
 		{
@@ -219,5 +219,5 @@
 		const vertex_pn* prev = data + m_vertex_count * m_last_frame;
 		const vertex_pn* next = data + m_vertex_count * m_next_frame;
-		      vertex_pn* vtx  = (vertex_pn*)m_data;
+		      vertex_pn* vtx  = reinterpret_cast<vertex_pn*>( m_data );
 
 		for ( size_t i = 0; i < m_vertex_count; ++i )
