Index: trunk/tests/render_test/rl.cc
===================================================================
--- trunk/tests/render_test/rl.cc	(revision 71)
+++ trunk/tests/render_test/rl.cc	(revision 73)
@@ -66,5 +66,4 @@
 	application();
 	bool initialize();
-	bool init_program( const std::string& name, nv::program*& p, nv::vertex_array*& va, nv::mesh* m );
 	bool run();
 	~application();
@@ -117,6 +116,6 @@
 		vtx.emplace_back( x,   h, y );  
 		mat.insert( mat.end(), 6, nv::i8vec3( m, 1, 0 ) );
-
-		if (!init_program( "char", m_char_program, m_char_va, &cmesh ) ) return false;
+		m_char_program = m_device->create_program( nv::slurp( "char.vert" ), nv::slurp( "char.frag" ) );
+		m_char_va      = m_device->create_vertex_array( &cmesh, &(m_char_program->get_attributes()), nv::STATIC_DRAW );
 	}
 
@@ -175,22 +174,9 @@
 		}
 
-		m_count = vtx.size();
-		if (!init_program( "box",  m_box_program, m_box_va, &wmesh ) ) return false;
-	}
-
-	return true;
-}
-
-bool application::init_program( const std::string& name, nv::program*& p, nv::vertex_array*& va, nv::mesh* m )
-{
-	p  = m_device->create_program( nv::slurp( name+".vert" ), nv::slurp( name+".frag" ) );
-	va = m_device->create_vertex_array();
-	const nv::mesh::map& attrs = m->get_attributes();
-
-	for ( auto attr : attrs )
-	{
-		nv::vertex_buffer* vb = m_device->create_vertex_buffer( nv::STATIC_DRAW, attr.second->get_size(), attr.second->get_data() );
-		va->add_vertex_buffer( p->get_attribute( attr.first )->get_location(), vb, attr.second->get_base_type(), attr.second->get_components() );
-	}
+		m_count       = vtx.size();
+		m_box_program = m_device->create_program( nv::slurp( "box.vert" ), nv::slurp( "box.frag" ) );
+		m_box_va      = m_device->create_vertex_array( &wmesh, &(m_box_program->get_attributes()), nv::STATIC_DRAW );
+	}
+
 	return true;
 }
