Index: trunk/src/gl/gl_device.cc
===================================================================
--- trunk/src/gl/gl_device.cc	(revision 342)
+++ trunk/src/gl/gl_device.cc	(revision 350)
@@ -49,4 +49,22 @@
 	image_data* data = new image_data( format, glm::ivec2( image->w, image->h ), (nv::uint8*)image->pixels );
 	return data;
+}
+
+// this is a temporary function that will be removed once we find a way to 
+// pass binary file data around
+image_data* gl_device::create_image_data( const uint8* data, uint32 size )
+{
+	load_sdl_image_library();
+	SDL_Surface* image = IMG_LoadTyped_RW( SDL_RWFromMem( (void*)data, size ), 1, "tga" );
+	if ( !image )
+	{
+		NV_LOG( LOG_ERROR, "Image binary data cannot be loaded found!" );
+		return nullptr;
+	}
+	// TODO: BGR vs RGB, single channel
+	assert( image->format->BytesPerPixel > 2 );
+	image_format format( image->format->BytesPerPixel == 3 ? RGB : RGBA, UBYTE );
+	image_data* idata = new image_data( format, glm::ivec2( image->w, image->h ), ( nv::uint8* )image->pixels );
+	return idata;
 }
 
Index: trunk/src/gl/gl_enum.cc
===================================================================
--- trunk/src/gl/gl_enum.cc	(revision 342)
+++ trunk/src/gl/gl_enum.cc	(revision 350)
@@ -296,5 +296,9 @@
 	case BYTE_VECTOR_3  : return GL_INT_VEC3;
 	case BYTE_VECTOR_4  : return GL_INT_VEC4;
-	default : return 0; // TODO: throw!
+		// remove, error or ?
+	case UBYTE_VECTOR_2: return GL_INT_VEC2;
+	case UBYTE_VECTOR_3: return GL_INT_VEC3;
+	case UBYTE_VECTOR_4: return GL_INT_VEC4;
+	default: return 0; // TODO: throw!
 	}
 }
