Index: /trunk/nv/gl/gl_device.hh
===================================================================
--- /trunk/nv/gl/gl_device.hh	(revision 48)
+++ /trunk/nv/gl/gl_device.hh	(revision 49)
@@ -26,5 +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 texture2d* create_texture2d( ivec2 size, image_format aformat, type adatatype, sampler asampler, void* data = nullptr );
 		virtual ~gl_device();
 	private:
Index: /trunk/nv/gl/gl_enum.hh
===================================================================
--- /trunk/nv/gl/gl_enum.hh	(revision 48)
+++ /trunk/nv/gl/gl_enum.hh	(revision 49)
@@ -32,8 +32,7 @@
 	unsigned int stencil_operation_to_enum( stencil_test_face::operation type );
 	unsigned int buffer_hint_to_enum( buffer_hint hint );
-	unsigned int texture_format_to_enum( texture2d::format format );
-	unsigned int texture_datatype_to_enum( texture2d::datatype datatype );
-	unsigned int texture_filter_to_enum( texture2d_sampler::filter filter );
-	unsigned int texture_wrap_to_enum( texture2d_sampler::wrap wrap );
+	unsigned int image_format_to_enum( image_format format );
+	unsigned int sampler_filter_to_enum( sampler::filter filter );
+	unsigned int sampler_wrap_to_enum( sampler::wrap wrap );
 	unsigned int primitive_to_enum( primitive p );
 
Index: /trunk/nv/gl/gl_texture2d.hh
===================================================================
--- /trunk/nv/gl/gl_texture2d.hh	(revision 48)
+++ /trunk/nv/gl/gl_texture2d.hh	(revision 49)
@@ -22,5 +22,5 @@
 	{
 	public:
-		gl_texture2d( ivec2 size, format aformat, datatype adatatype, texture2d_sampler sampler, void* data = nullptr );
+		gl_texture2d( ivec2 size, image_format aformat, type adatatype, sampler asampler, void* data = nullptr );
 		virtual void assign( void* data );
 		virtual void bind( int slot = 0 );
Index: /trunk/nv/interface/device.hh
===================================================================
--- /trunk/nv/interface/device.hh	(revision 48)
+++ /trunk/nv/interface/device.hh	(revision 49)
@@ -31,5 +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;
+		virtual texture2d* create_texture2d( ivec2 size, image_format aformat, type adatatype, sampler asampler, void* data = nullptr ) = 0;
 	};
 
Index: /trunk/nv/interface/texture2d.hh
===================================================================
--- /trunk/nv/interface/texture2d.hh	(revision 48)
+++ /trunk/nv/interface/texture2d.hh	(revision 49)
@@ -19,5 +19,5 @@
 {
 
-	struct texture2d_sampler
+	struct sampler
 	{
 		enum filter
@@ -43,28 +43,22 @@
 		wrap wrap_t;
 
-		texture2d_sampler( filter min, filter max, wrap s, wrap t )
+		sampler( filter min, filter max, wrap s, wrap t )
 			: filter_min( min ), filter_max( max ), wrap_s( s ), wrap_t( t ) {}
-		texture2d_sampler( filter f, wrap w )
+		sampler( filter f, wrap w )
 			: filter_min( f ), filter_max( f ), wrap_s( w ), wrap_t( w ) {}
 
 	};
 
+	enum image_format
+	{
+		RGB,
+		RGBA
+	};
 
 	class texture2d
 	{
 	public:
-		enum format
-		{
-			RGB,
-			RGBA
-		};
 
-		enum datatype
-		{
-			UINT,
-			UBYTE,
-			FLOAT
-		};
-		texture2d( ivec2 size, format aformat, datatype adatatype, texture2d_sampler asampler ) : 
+		texture2d( ivec2 size, image_format aformat, type adatatype, sampler asampler ) : 
 			m_size( size ), m_format( aformat ), m_datatype( adatatype ), m_sampler( asampler ) {}
 		virtual void assign( void* data ) = 0;
@@ -75,12 +69,12 @@
 		int get_width() const { return m_size.x; }
 		int get_height() const { return m_size.y; }
-		format get_format() const { return m_format; }
-		datatype get_datatype() const { return m_datatype; }
-		const texture2d_sampler& get_sampler() const { return m_sampler; }
+		image_format get_format() const { return m_format; }
+		type get_datatype() const { return m_datatype; }
+		const sampler& get_sampler() const { return m_sampler; }
 	protected:
-		ivec2             m_size;
-		format            m_format;
-		datatype          m_datatype;
-		texture2d_sampler m_sampler;
+		ivec2        m_size;
+		image_format m_format;
+		type         m_datatype;
+		sampler      m_sampler;
 	};
 
Index: /trunk/src/gl/gl_device.cc
===================================================================
--- /trunk/src/gl/gl_device.cc	(revision 48)
+++ /trunk/src/gl/gl_device.cc	(revision 49)
@@ -67,7 +67,7 @@
 }
 
-texture2d* gl_device::create_texture2d( ivec2 size, texture2d::format aformat, texture2d::datatype adatatype, texture2d_sampler sampler, void* data /*= nullptr */ )
+texture2d* gl_device::create_texture2d( ivec2 size, image_format aformat, type adatatype, sampler asampler, void* data /*= nullptr */ )
 {
-	return new gl_texture2d( size, aformat, adatatype, sampler, data );
+	return new gl_texture2d( size, aformat, adatatype, asampler, data );
 }
 
Index: /trunk/src/gl/gl_enum.cc
===================================================================
--- /trunk/src/gl/gl_enum.cc	(revision 48)
+++ /trunk/src/gl/gl_enum.cc	(revision 49)
@@ -134,47 +134,36 @@
 }
 
-unsigned int nv::texture_format_to_enum( texture2d::format format )
+unsigned int nv::image_format_to_enum( image_format format )
 {
 	switch( format )
 	{
-	case texture2d::RGB  : return GL_RGB;
-	case texture2d::RGBA : return GL_RGBA;
-	default : return 0; // TODO: throw!
-	}
-}
-
-unsigned int nv::texture_datatype_to_enum( texture2d::datatype datatype )
-{
-	switch( datatype )
-	{
-	case texture2d::UINT   : return GL_UNSIGNED_INT;
-	case texture2d::UBYTE  : return GL_UNSIGNED_BYTE;
-	case texture2d::FLOAT  : return GL_FLOAT;
-	default : return 0; // TODO: throw!
-	}
-}
-
-unsigned int nv::texture_filter_to_enum( texture2d_sampler::filter filter )
+	case RGB  : return GL_RGB;
+	case RGBA : return GL_RGBA;
+	default : return 0; // TODO: throw!
+	}
+}
+
+unsigned int nv::sampler_filter_to_enum( sampler::filter filter )
 {
 	switch( filter )
 	{
-	case texture2d_sampler::LINEAR                 : return GL_LINEAR;
-	case texture2d_sampler::NEAREST                : return GL_NEAREST;
-	case texture2d_sampler::NEAREST_MIPMAP_NEAREST : return GL_NEAREST_MIPMAP_NEAREST;
-	case texture2d_sampler::LINEAR_MIPMAP_NEAREST  : return GL_LINEAR_MIPMAP_NEAREST;
-	case texture2d_sampler::NEAREST_MIPMAP_LINEAR  : return GL_NEAREST_MIPMAP_LINEAR;
-	case texture2d_sampler::LINEAR_MIPMAP_LINEAR   : return GL_LINEAR_MIPMAP_LINEAR;
-	default : return 0; // TODO: throw!
-	}
-}
-
-unsigned int nv::texture_wrap_to_enum( texture2d_sampler::wrap wrap )
+	case sampler::LINEAR                 : return GL_LINEAR;
+	case sampler::NEAREST                : return GL_NEAREST;
+	case sampler::NEAREST_MIPMAP_NEAREST : return GL_NEAREST_MIPMAP_NEAREST;
+	case sampler::LINEAR_MIPMAP_NEAREST  : return GL_LINEAR_MIPMAP_NEAREST;
+	case sampler::NEAREST_MIPMAP_LINEAR  : return GL_NEAREST_MIPMAP_LINEAR;
+	case sampler::LINEAR_MIPMAP_LINEAR   : return GL_LINEAR_MIPMAP_LINEAR;
+	default : return 0; // TODO: throw!
+	}
+}
+
+unsigned int nv::sampler_wrap_to_enum( sampler::wrap wrap )
 {
 	switch( wrap )
 	{
-	case texture2d_sampler::CLAMP_TO_EDGE   : return GL_CLAMP_TO_EDGE;
-	case texture2d_sampler::CLAMP_TO_BORDER : return GL_CLAMP_TO_BORDER;
-	case texture2d_sampler::MIRRORED_REPEAT : return GL_MIRRORED_REPEAT;
-	case texture2d_sampler::REPEAT          : return GL_REPEAT;
+	case sampler::CLAMP_TO_EDGE   : return GL_CLAMP_TO_EDGE;
+	case sampler::CLAMP_TO_BORDER : return GL_CLAMP_TO_BORDER;
+	case sampler::MIRRORED_REPEAT : return GL_MIRRORED_REPEAT;
+	case sampler::REPEAT          : return GL_REPEAT;
 	default : return 0; // TODO: throw!
 	}
Index: /trunk/src/gl/gl_texture2d.cc
===================================================================
--- /trunk/src/gl/gl_texture2d.cc	(revision 48)
+++ /trunk/src/gl/gl_texture2d.cc	(revision 49)
@@ -10,13 +10,13 @@
 using namespace nv;
 
-nv::gl_texture2d::gl_texture2d( ivec2 size, format aformat, datatype adatatype, texture2d_sampler sampler, void* data /*= nullptr */ )
-	: texture2d( size, aformat, adatatype, sampler ), m_name()
+nv::gl_texture2d::gl_texture2d( ivec2 size, image_format aformat, type adatatype, sampler asampler, void* data /*= nullptr */ )
+	: texture2d( size, aformat, adatatype, asampler ), m_name()
 {
 	glBindTexture( GL_TEXTURE_2D, m_name.get_value() );
 
-	glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, nv::texture_filter_to_enum( m_sampler.filter_min ) );
-	glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, nv::texture_filter_to_enum( m_sampler.filter_max ) );
-	glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, nv::texture_wrap_to_enum( m_sampler.wrap_s) );
-	glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, nv::texture_wrap_to_enum( m_sampler.wrap_t) );
+	glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, nv::sampler_filter_to_enum( m_sampler.filter_min ) );
+	glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, nv::sampler_filter_to_enum( m_sampler.filter_max ) );
+	glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, nv::sampler_wrap_to_enum( m_sampler.wrap_s) );
+	glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, nv::sampler_wrap_to_enum( m_sampler.wrap_t) );
 
 	glBindTexture( GL_TEXTURE_2D, 0 );
@@ -31,5 +31,5 @@
 {
 	glBindTexture( GL_TEXTURE_2D, m_name.get_value() );
-	glTexImage2D( GL_TEXTURE_2D, 0, nv::texture_format_to_enum(m_format), m_size.x, m_size.y, 0, nv::texture_format_to_enum(m_format), nv::texture_datatype_to_enum(m_datatype), data );
+	glTexImage2D( GL_TEXTURE_2D, 0, nv::image_format_to_enum(m_format), m_size.x, m_size.y, 0, nv::image_format_to_enum(m_format), nv::type_to_gl_enum(m_datatype), data );
 	glBindTexture( GL_TEXTURE_2D, 0 );
 }
Index: /trunk/tests/render_test/rl.cc
===================================================================
--- /trunk/tests/render_test/rl.cc	(revision 48)
+++ /trunk/tests/render_test/rl.cc	(revision 49)
@@ -95,6 +95,6 @@
 	SDL_Surface* texture = IMG_Load( "spritesheet.png" );
 	nv::image sprites( glm::ivec2( texture->w, texture->h ), 4, (nv::uint8*)texture->pixels );
-	nv::texture2d_sampler sampler( nv::texture2d_sampler::NEAREST, nv::texture2d_sampler::REPEAT );
-	m_texture = m_device->create_texture2d( sprites.get_size(), nv::texture2d::RGBA, nv::texture2d::UBYTE, sampler, (void*)sprites.get_data() );
+	nv::sampler sampler( nv::sampler::NEAREST, nv::sampler::REPEAT );
+	m_texture = m_device->create_texture2d( sprites.get_size(), nv::RGBA, nv::UBYTE, sampler, (void*)sprites.get_data() );
 
 	m_clear_state.buffers = nv::clear_state::COLOR_AND_DEPTH_BUFFER;
