Index: trunk/src/gl/gl_device.cc
===================================================================
--- trunk/src/gl/gl_device.cc	(revision 346)
+++ 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 346)
+++ 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!
 	}
 }
Index: trunk/src/gui/gui_style.cc
===================================================================
--- trunk/src/gui/gui_style.cc	(revision 346)
+++ trunk/src/gui/gui_style.cc	(revision 350)
@@ -21,16 +21,16 @@
 }
 
-bool style::get( element* e, const std::string& entry, std::string& s )
+bool style::get( element* e, const char* centry, std::string& s )
 {
 	lua::stack_guard guard( m_lua );
-	if ( !resolve( e, entry, LUA_TSTRING ) ) return false;
+	if ( !resolve( e->m_id.c_str(), e->m_class.c_str(), centry, LUA_TSTRING ) ) return false;
 	s = lua_tostring( m_lua, -1 );
 	return true;
 }
 
-bool style::get( element* e, const std::string& entry, vec4& vec )
+bool style::get( element* e, const char* centry, vec4& vec )
 {
 	lua::stack_guard guard( m_lua );
-	if ( !resolve( e, entry, LUA_TTABLE ) ) return false;
+	if ( !resolve( e->m_id.c_str(), e->m_class.c_str(), centry, LUA_TTABLE ) ) return false;
 	vec = vec4();
 	for (size_t i = 0; i < 4; ++i )
@@ -44,16 +44,16 @@
 }
 
-bool style::get( element* e, const std::string& entry, int& i )
+bool style::get( element* e, const char* centry, int& i )
 {
 	lua::stack_guard guard( m_lua );
-	if ( !resolve( e, entry, LUA_TNUMBER ) ) return false;
+	if ( !resolve( e->m_id.c_str(), e->m_class.c_str(), centry, LUA_TNUMBER ) ) return false;
 	i = static_cast< int >( lua_tointeger( m_lua, -1 ) );
 	return true;
 }
 
-bool style::get( element* e, const std::string& entry, double& d )
+bool style::get( element* e, const char* centry, double& d )
 {
 	lua::stack_guard guard( m_lua );
-	if ( !resolve( e, entry, LUA_TNUMBER ) ) return false;
+	if ( !resolve( e->m_id.c_str(), e->m_class.c_str(), centry, LUA_TNUMBER ) ) return false;
 	d = lua_tonumber( m_lua, -1 );
 	return true;
@@ -64,9 +64,6 @@
 }
 
-bool style::resolve( element* e, const std::string& entry, int type )
+bool style::resolve( const char* cid, const char* cclass, const char* centry, int type )
 {
-	const char* centry = entry.c_str();
-	const char* cid    = e->m_id.c_str();
-	const char* cclass = e->m_class.c_str();
 	lua_getglobal( m_lua, "default" );
 	int global = lua_gettop( m_lua );
