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:
2018-11-27 14:24:01 +01:00
parent f34ffa825d
commit 0c6b409606
57 changed files with 538 additions and 597 deletions

View File

@@ -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);