Index: trunk/nv/gl/gl_context.hh
===================================================================
--- trunk/nv/gl/gl_context.hh	(revision 44)
+++ trunk/nv/gl/gl_context.hh	(revision 45)
@@ -22,4 +22,6 @@
 		gl_context();
 		virtual void clear( const clear_state& cs );
+		// temporary
+		virtual void draw( primitive prim, const render_state& rs, program* p, vertex_array* va, int count );
 		virtual const ivec4& get_viewport();
 		virtual void set_viewport( const ivec4& viewport );
Index: trunk/nv/gl/gl_device.hh
===================================================================
--- trunk/nv/gl/gl_device.hh	(revision 44)
+++ trunk/nv/gl/gl_device.hh	(revision 45)
@@ -26,4 +26,5 @@
 		virtual index_buffer* create_index_buffer( buffer_hint hint, int size, void* source = nullptr );
 		virtual vertex_array* create_vertex_array();
+		virtual texture2d* create_texture2d( ivec2 size, texture2d::format aformat, texture2d::datatype adatatype, texture2d_sampler sampler, void* data = nullptr );
 		virtual ~gl_device();
 	private:
Index: trunk/nv/gl/gl_enum.hh
===================================================================
--- trunk/nv/gl/gl_enum.hh	(revision 44)
+++ trunk/nv/gl/gl_enum.hh	(revision 45)
@@ -17,4 +17,5 @@
 #include <nv/interface/vertex_buffer.hh>
 #include <nv/interface/texture2d.hh>
+#include <nv/interface/context.hh>
 #include <nv/types.hh>
 
@@ -35,4 +36,5 @@
 	unsigned int texture_filter_to_enum( texture2d_sampler::filter filter );
 	unsigned int texture_wrap_to_enum( texture2d_sampler::wrap wrap );
+	unsigned int primitive_to_enum( primitive p );
 
 	unsigned int type_to_gl_enum( type type );
Index: trunk/nv/interface/context.hh
===================================================================
--- trunk/nv/interface/context.hh	(revision 44)
+++ trunk/nv/interface/context.hh	(revision 45)
@@ -14,4 +14,6 @@
 
 #include <nv/common.hh>
+#include <nv/interface/program.hh>
+#include <nv/interface/vertex_buffer.hh>
 #include <nv/interface/clear_state.hh>
 #include <nv/interface/render_state.hh>
@@ -19,8 +21,21 @@
 namespace nv
 {
+	enum primitive
+	{
+		POINTS,
+		LINES,
+		LINE_LOOP,
+		LINE_STRIP,
+		TRIANGLES,
+		TRIANGLE_STRIP,
+		TRIANGLE_FAN
+	};
+
 	class context
 	{
 	public:
 		virtual void clear( const clear_state& cs ) = 0;
+		// temporary
+		virtual void draw( primitive prim, const render_state& rs, program* p, vertex_array* va, int count ) = 0;
 		virtual void apply_render_state( const render_state& state ) = 0;
 		virtual const ivec4& get_viewport() = 0;
Index: trunk/nv/interface/device.hh
===================================================================
--- trunk/nv/interface/device.hh	(revision 44)
+++ trunk/nv/interface/device.hh	(revision 45)
@@ -16,4 +16,5 @@
 #include <nv/string.hh>
 #include <nv/interface/vertex_buffer.hh>
+#include <nv/interface/texture2d.hh>
 
 namespace nv
@@ -30,4 +31,5 @@
 		virtual index_buffer* create_index_buffer( buffer_hint hint, int size, void* source = nullptr ) = 0;
 		virtual vertex_array* create_vertex_array() = 0;
+		virtual texture2d* create_texture2d( ivec2 size, texture2d::format aformat, texture2d::datatype adatatype, texture2d_sampler sampler, void* data = nullptr ) = 0;
 	};
 
Index: trunk/src/gl/gl_context.cc
===================================================================
--- trunk/src/gl/gl_context.cc	(revision 44)
+++ trunk/src/gl/gl_context.cc	(revision 45)
@@ -353,2 +353,12 @@
 	force_apply_render_state( m_render_state );
 }
+
+void gl_context::draw( primitive prim, const render_state& rs, program* p, vertex_array* va, int count )
+{
+	apply_render_state( rs );
+	p->bind();
+	va->bind();
+	glDrawArrays( primitive_to_enum(prim), 0, count);
+	va->unbind();
+	p->unbind();
+}
Index: trunk/src/gl/gl_device.cc
===================================================================
--- trunk/src/gl/gl_device.cc	(revision 44)
+++ trunk/src/gl/gl_device.cc	(revision 45)
@@ -8,4 +8,5 @@
 #include "nv/gl/gl_program.hh"
 #include "nv/gl/gl_vertex_buffer.hh"
+#include "nv/gl/gl_texture2d.hh"
 #include "nv/logging.hh"
 #include "nv/lib/sdl12.hh"
@@ -66,7 +67,11 @@
 }
 
+texture2d* gl_device::create_texture2d( ivec2 size, texture2d::format aformat, texture2d::datatype adatatype, texture2d_sampler sampler, void* data /*= nullptr */ )
+{
+	return new gl_texture2d( size, aformat, adatatype, sampler, data );
+}
+
 gl_device::~gl_device()
 {
 	SDL_Quit();
 }
-
Index: trunk/src/gl/gl_enum.cc
===================================================================
--- trunk/src/gl/gl_enum.cc	(revision 44)
+++ trunk/src/gl/gl_enum.cc	(revision 45)
@@ -181,4 +181,18 @@
 }
 
+unsigned int nv::primitive_to_enum( primitive p )
+{
+	switch( p )
+	{
+	case POINTS         : return GL_POINTS;
+	case LINES          : return GL_LINES;
+	case LINE_LOOP      : return GL_LINE_LOOP;
+	case LINE_STRIP     : return GL_LINE_STRIP;
+	case TRIANGLES      : return GL_TRIANGLES;
+	case TRIANGLE_STRIP : return GL_TRIANGLE_STRIP;
+	case TRIANGLE_FAN   : return GL_TRIANGLE_FAN;
+	default : return 0; // TODO: throw!
+	}
+}
 
 unsigned int nv::type_to_gl_enum( type type )
Index: trunk/src/gl/texture_font.cc
===================================================================
--- trunk/src/gl/texture_font.cc	(revision 44)
+++ trunk/src/gl/texture_font.cc	(revision 45)
@@ -55,8 +55,8 @@
 
     FT_Size_Metrics metrics = ((FT_Face)(m_rface))->size->metrics; 
-    m_ascender = (metrics.ascender >> 6) / 100.0;
-    m_descender = (metrics.descender >> 6) / 100.0;
-    m_height = (metrics.height >> 6) / 100.0;
-    m_linegap = m_height - m_ascender + m_descender; 
+    m_ascender  = (float)(metrics.ascender >> 6) / 100.0f;
+    m_descender = (float)(metrics.descender >> 6) / 100.0f;
+    m_height    = (float)(metrics.height >> 6) / 100.0f;
+    m_linegap   = m_height - m_ascender + m_descender; 
 }
 
Index: trunk/src/resource_manager.cc
===================================================================
--- trunk/src/resource_manager.cc	(revision 44)
+++ trunk/src/resource_manager.cc	(revision 45)
@@ -24,5 +24,5 @@
 	if ( i != m_id_map.end() )
 	{
-		return m_data[ i->second ];
+		return m_data[ (unsigned int)i->second ];
 	}
 	return resource::ptr();
