Index: trunk/tests/gui_test/gui.frag
===================================================================
--- trunk/tests/gui_test/gui.frag	(revision 239)
+++ trunk/tests/gui_test/gui.frag	(revision 267)
@@ -2,8 +2,8 @@
 varying vec4 v_color;
 varying vec2 v_texcoord;
-uniform sampler2D tex;
+uniform sampler2D nv_t_diffuse;
  
 void main(void) {
-	vec4 texture = texture2D(tex,v_texcoord);
+	vec4 texture = texture2D(nv_t_diffuse,v_texcoord);
 	gl_FragColor = v_color * texture;
 }
Index: trunk/tests/gui_test/gui.vert
===================================================================
--- trunk/tests/gui_test/gui.vert	(revision 239)
+++ trunk/tests/gui_test/gui.vert	(revision 267)
@@ -3,5 +3,5 @@
 attribute vec2 nv_texcoord;
 attribute vec4 nv_color;
-uniform mat4 nv_projection;
+uniform mat4 nv_m_projection;
 varying vec4 v_color;
 varying vec2 v_texcoord;
@@ -10,4 +10,4 @@
 	v_color     = nv_color;
 	v_texcoord  = nv_texcoord;
-	gl_Position = nv_projection * vec4( nv_position.x, nv_position.y, 0.0, 1.0 );
+	gl_Position = nv_m_projection * vec4( nv_position.x, nv_position.y, 0.0, 1.0 );
 }
Index: trunk/tests/gui_test/nv_gui_test.cc
===================================================================
--- trunk/tests/gui_test/nv_gui_test.cc	(revision 239)
+++ trunk/tests/gui_test/nv_gui_test.cc	(revision 267)
@@ -16,4 +16,5 @@
 	void spawn_window();
 	void recolor_window();
+//	void bring_to_front( int i );
 	~application();
 protected:
@@ -64,4 +65,9 @@
 					switch (event.key.code) 
 					{
+// 					case nv::KEY_1      : bring_to_front(0); break;
+// 					case nv::KEY_2      : bring_to_front(1); break;
+// 					case nv::KEY_3      : bring_to_front(2); break;
+// 					case nv::KEY_4      : bring_to_front(3); break;
+// 					case nv::KEY_5      : bring_to_front(4); break;
 					case nv::KEY_N      : spawn_window(); break;
 					case nv::KEY_K      : kill_window(); break;
@@ -80,8 +86,7 @@
 	glm::ivec2 a( std::rand() % 600, std::rand() % 400 );
 	glm::ivec2 b( std::rand() % 200 + 40, std::rand() % 200 + 40 );
-	nv::gui::element* e = new nv::gui::element( m_guienv, nv::rectangle(a).dim(b) );
+	nv::gui::element* e = m_guienv->create_element( nullptr, nv::rectangle(a).dim(b) );
 	e->set_class( "window" );
 	e->set_text("Window "+nv::to_string(m_windows.size()+1) );
-	m_guienv->add_child( e );
 	NV_LOG( nv::LOG_INFO, "Spawn (" << a.x << "," << a.y << "x" << b.x << "," << b.y << ")" );
 	m_windows.push_back( e );
@@ -92,5 +97,5 @@
 	if ( m_windows.size() == 0 ) return;
 	size_t index = rand() % m_windows.size();
-	delete m_windows[ index ];
+	m_guienv->destroy_element( m_windows[index] );
 	m_windows.erase( m_windows.begin() + index );
 }
@@ -102,4 +107,12 @@
 	delete m_device;
 }
+
+// void application::bring_to_front( int i )
+// {
+// 	if ( i >= 0 && i < m_windows.size() )
+// 	{
+// 		m_guienv->bring_to_front( m_windows[i] );
+// 	}
+// }
 
 int main(int, char* [])
