fixed layout parser adding stack based recursion, code needs being cleaned up but layout works quite well now, added code draw while resizing

This commit is contained in:
2017-01-22 22:24:48 +00:00
parent 21622fd24c
commit e556cf4c61
7 changed files with 266 additions and 71 deletions

View File

@@ -15,7 +15,7 @@ bool Texture2D::create(int width, int height, GLint format, const uint8_t* data)
}
bool Texture2D::create(const Image& img)
{
static GLint formats[] = { GL_R, GL_RG, GL_RGB, GL_RGBA };
static GLint formats[] = { GL_RED, GL_RG, GL_RGB, GL_RGBA };
return create(img.width, img.height, formats[img.comp - 1], img.data());
}
bool Texture2D::load(std::string filename)