remove ui namespace which is not really used, move CameraData in camera_modes.h to avoid the inclusion of canva.h
This commit is contained in:
@@ -53,7 +53,7 @@ bool Texture2D::create(int width, int height, GLint internal_format, GLint forma
|
||||
unbind();
|
||||
return true;
|
||||
}
|
||||
bool Texture2D::create(const ui::Image& img)
|
||||
bool Texture2D::create(const Image& img)
|
||||
{
|
||||
static GLint formats[] = { GL_RED, GL_RG, GL_RGB, GL_RGBA };
|
||||
static GLint iformats[] = { GL_R8, GL_RG8, GL_RGB8, GL_RGBA8 };
|
||||
@@ -80,7 +80,7 @@ void Texture2D::assign(GLuint tex, int w/* = -1*/, int h/* = -1*/, GLuint intern
|
||||
bool Texture2D::load(std::string filename)
|
||||
{
|
||||
LOG("load texture %s", filename.c_str());
|
||||
ui::Image img;
|
||||
Image img;
|
||||
if (!img.load(filename))
|
||||
return false;
|
||||
return create(img);
|
||||
@@ -89,7 +89,7 @@ bool Texture2D::load(std::string filename)
|
||||
bool Texture2D::load_file(std::string filename)
|
||||
{
|
||||
LOG("load texture %s", filename.c_str());
|
||||
ui::Image img;
|
||||
Image img;
|
||||
if (!img.load_file(filename))
|
||||
return false;
|
||||
return create(img);
|
||||
|
||||
Reference in New Issue
Block a user