Index: trunk/src/formats/md3_loader.cc
===================================================================
--- trunk/src/formats/md3_loader.cc	(revision 160)
+++ trunk/src/formats/md3_loader.cc	(revision 161)
@@ -313,7 +313,7 @@
 	}
 
-	vertex_attribute< vec3 >* position = m->add_attribute<vec3>("position");
-	vertex_attribute< vec3 >* normal   = m->add_attribute<vec3>("normal");
-	vertex_attribute< vec2 >* texcoord = m->add_attribute<vec2>("texcoord");
+	vertex_attribute< vec3 >* position = m->add_attribute<vec3>("nv_position");
+	vertex_attribute< vec3 >* normal   = m->add_attribute<vec3>("nv_normal");
+	vertex_attribute< vec2 >* texcoord = m->add_attribute<vec2>("nv_texcoord");
 	vertex_attribute< uint16 >* indices  = m->add_indices<uint16>();
 
Index: trunk/src/formats/obj_loader.cc
===================================================================
--- trunk/src/formats/obj_loader.cc	(revision 160)
+++ trunk/src/formats/obj_loader.cc	(revision 161)
@@ -140,13 +140,13 @@
 	if ( m_position == nullptr )
 	{
-		m_position  = m_mesh->add_attribute< vec3 >( "position" );
+		m_position  = m_mesh->add_attribute< vec3 >( "nv_position" );
 	}
 	if ( m_tex_coord == nullptr )
 	{
-		m_tex_coord = m_mesh->add_attribute< vec2 >( "texcoord" );
+		m_tex_coord = m_mesh->add_attribute< vec2 >( "nv_texcoord" );
 	}
 	if ( m_normal == nullptr && ni != nullptr )
 	{
-		m_normal = m_mesh->add_attribute< vec3 >( "normal" );
+		m_normal = m_mesh->add_attribute< vec3 >( "nv_normal" );
 	}
 
@@ -174,5 +174,5 @@
 void mesh_obj_reader::calculate_tangents()
 {
-	m_tangent = m_mesh->add_attribute< vec4 >( "tangent" );
+	m_tangent = m_mesh->add_attribute< vec4 >( "nv_tangent" );
 
 	std::vector< vec3 >& vp = m_position->get();
Index: trunk/src/gfx/keyframed_mesh.cc
===================================================================
--- trunk/src/gfx/keyframed_mesh.cc	(revision 160)
+++ trunk/src/gfx/keyframed_mesh.cc	(revision 161)
@@ -21,7 +21,5 @@
 	, m_va( nullptr )
 	, m_loc_next_position( 0 )
-	, m_loc_last_position( 0 )
 	, m_loc_next_normal( 0 )
-	, m_loc_last_normal( 0 )
 	, m_last_frame( 0 )
 	, m_next_frame( 0 )
@@ -37,19 +35,17 @@
 
 	nv::vertex_buffer* vb;
-	m_loc_next_position = m_program->get_attribute( "next_position" )->get_location();
-	m_loc_last_position = m_program->get_attribute( "last_position" )->get_location();
-	m_loc_next_normal   = m_program->get_attribute( "next_normal" )->get_location();
-	m_loc_last_normal   = m_program->get_attribute( "last_normal" )->get_location();
+	m_loc_next_position = m_program->get_attribute( "nv_next_position" )->get_location();
+	m_loc_next_normal   = m_program->get_attribute( "nv_next_normal" )->get_location();
 
 	vb = m_context->get_device()->create_vertex_buffer( nv::STATIC_DRAW, m_data->get_vertex_count() * sizeof( nv::vec3 ) * m_data->get_frame_count(), (void*)m_data->get_positions().data() );
 	m_va->add_vertex_buffer( m_loc_next_position, vb, nv::FLOAT, 3, 0, 0, false );
-	m_va->add_vertex_buffer( m_loc_last_position, vb, nv::FLOAT, 3 );
+	m_va->add_vertex_buffer( nv::POSITION, vb, nv::FLOAT, 3 );
 
 	vb = m_context->get_device()->create_vertex_buffer( nv::STATIC_DRAW, m_data->get_vertex_count() * sizeof( nv::vec3 ) * m_data->get_frame_count(), (void*)m_data->get_normals().data() );
 	m_va->add_vertex_buffer( m_loc_next_normal, vb, nv::FLOAT, 3, 0, 0, false );
-	m_va->add_vertex_buffer( m_loc_last_normal, vb, nv::FLOAT, 3 );
+	m_va->add_vertex_buffer( nv::NORMAL, vb, nv::FLOAT, 3 );
 
 	vb = m_context->get_device()->create_vertex_buffer( nv::STATIC_DRAW, m_data->get_vertex_count() * sizeof( nv::vec2 ), (void*)m_data->get_texcoords().data() );
-	m_va->add_vertex_buffer( m_program->get_attribute( "texcoord" )->get_location(), vb, nv::FLOAT, 2 );
+	m_va->add_vertex_buffer( nv::slot::TEXCOORD, vb, nv::FLOAT, 2 );
 	nv::index_buffer* ib = m_context->get_device()->create_index_buffer( nv::STATIC_DRAW, m_data->get_index_count() * sizeof( nv::uint16 ), (void*)m_data->get_indices().data() );
 	m_va->set_index_buffer( ib, nv::USHORT, true );
@@ -129,6 +125,6 @@
 	if ( m_gpu_last_frame != m_last_frame )
 	{
-		m_va->update_vertex_buffer( m_loc_last_position, m_last_frame * vtx_count * sizeof( nv::vec3 ) );
-		m_va->update_vertex_buffer( m_loc_last_normal,   m_last_frame * vtx_count * sizeof( nv::vec3 ) );
+		m_va->update_vertex_buffer( slot::POSITION, m_last_frame * vtx_count * sizeof( nv::vec3 ) );
+		m_va->update_vertex_buffer( slot::NORMAL,   m_last_frame * vtx_count * sizeof( nv::vec3 ) );
 		m_gpu_last_frame = m_last_frame;
 	}
@@ -139,5 +135,5 @@
 		m_gpu_next_frame = m_next_frame;
 	}
-	m_program->set_uniform( "interpolate", m_interpolation );
+	m_program->set_uniform( "nv_interpolate", m_interpolation );
 	m_context->draw( nv::TRIANGLES, rstate, m_program, m_va, m_data->get_index_count() );
 }
Index: trunk/src/gl/gl_device.cc
===================================================================
--- trunk/src/gl/gl_device.cc	(revision 160)
+++ trunk/src/gl/gl_device.cc	(revision 161)
@@ -44,6 +44,10 @@
 	SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, 8 );
 	SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, 8 );
-	SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, 16 );
+	SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, 24 );
 	SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 );
+
+	SDL_GL_SetAttribute( SDL_GL_MULTISAMPLEBUFFERS, 1 );
+	SDL_GL_SetAttribute( SDL_GL_MULTISAMPLESAMPLES, 4 );
+
 }
 
Index: trunk/src/gl/gl_program.cc
===================================================================
--- trunk/src/gl/gl_program.cc	(revision 160)
+++ trunk/src/gl/gl_program.cc	(revision 161)
@@ -105,4 +105,10 @@
 	if (!vertex_shader.compile( vertex_program )) { return false; }
 	if (!fragment_shader.compile( fragment_program )) { return false; }
+
+	glBindAttribLocation( m_name.get_value(), static_cast<GLuint>( slot::POSITION ), "nv_position" );
+	glBindAttribLocation( m_name.get_value(), static_cast<GLuint>( slot::TEXCOORD ), "nv_texcoord" );
+	glBindAttribLocation( m_name.get_value(), static_cast<GLuint>( slot::NORMAL   ), "nv_normal"   );
+	glBindAttribLocation( m_name.get_value(), static_cast<GLuint>( slot::COLOR    ), "nv_color"    );
+	glBindAttribLocation( m_name.get_value(), static_cast<GLuint>( slot::TANGENT  ), "nv_tangent"  );
 
 	glAttachShader( m_name.get_value(), fragment_shader.get_id() );
Index: trunk/src/gui/gui_renderer.cc
===================================================================
--- trunk/src/gui/gui_renderer.cc	(revision 160)
+++ trunk/src/gui/gui_renderer.cc	(revision 161)
@@ -81,8 +81,4 @@
 	nv::program*      shader;
 	nv::texture2d*    texture;
-
-	int loc_coord;
-	int loc_color;
-	int loc_tcoord;
 };
 
@@ -116,15 +112,12 @@
 	sr->varray     = m_window->get_device()->create_vertex_array();
 	sr->shader     = m_window->get_device()->create_program( nv::slurp( "gui.vert" ), nv::slurp( "gui.frag" ) );
-	sr->loc_coord  = sr->shader->get_attribute("coord")->get_location();
-	sr->loc_tcoord = sr->shader->get_attribute("tcoord")->get_location();
-	sr->loc_color  = sr->shader->get_attribute("color")->get_location();
 	sr->shader->set_uniform( "tex", 0 );
 	glm::mat4 projection = glm::ortho( 0.0f, float( m_window->get_width() ), float( m_window->get_height() ), 0.0f, -1.0f, 1.0f );
-	sr->shader->set_uniform( "projection", projection );
+	sr->shader->set_uniform( "nv_projection", projection );
 
 	vertex_buffer* vb = (vertex_buffer*)sr->buffer.get_buffer();
-	sr->varray->add_vertex_buffer( sr->loc_coord,  vb, nv::INT,   2, 0, sizeof( vertex ), false );
-	sr->varray->add_vertex_buffer( sr->loc_tcoord, vb, nv::FLOAT, 2, offset_of( &vertex::tcoord ), sizeof( vertex ), false );
-	sr->varray->add_vertex_buffer( sr->loc_color,  vb, nv::FLOAT, 4, offset_of( &vertex::color ), sizeof( vertex ), false );
+	sr->varray->add_vertex_buffer( slot::POSITION, vb, nv::INT,   2, 0, sizeof( vertex ), false );
+	sr->varray->add_vertex_buffer( slot::TEXCOORD, vb, nv::FLOAT, 2, offset_of( &vertex::tcoord ), sizeof( vertex ), false );
+	sr->varray->add_vertex_buffer( slot::COLOR,    vb, nv::FLOAT, 4, offset_of( &vertex::color ), sizeof( vertex ), false );
 
 	nv::sampler sampler( nv::sampler::LINEAR, nv::sampler::CLAMP_TO_EDGE );
@@ -277,7 +270,7 @@
 	{
 		nv::vertex_buffer* vb = (nv::vertex_buffer*)sr->buffer.get_buffer();
-		sr->varray->update_vertex_buffer( sr->loc_coord,  vb, false );
-		sr->varray->update_vertex_buffer( sr->loc_tcoord, vb, false );
-		sr->varray->update_vertex_buffer( sr->loc_color,  vb, false );
+		sr->varray->update_vertex_buffer( nv::POSITION, vb, false );
+		sr->varray->update_vertex_buffer( nv::TEXCOORD, vb, false );
+		sr->varray->update_vertex_buffer( nv::COLOR,    vb, false );
 	}
 	sr->texture->bind( 0 );
