GL: Improve error handling with texture creation

This commit is contained in:
Connor McLaughlin
2019-12-11 00:01:29 +10:00
parent 05e6d4c401
commit 6f78fea159
8 changed files with 328 additions and 213 deletions

View File

@ -339,8 +339,8 @@ void main()
glGenVertexArrays(1, &m_display_vao);
m_app_icon_texture =
std::make_unique<GL::Texture>(APP_ICON_WIDTH, APP_ICON_HEIGHT, GL_RGBA, GL_UNSIGNED_BYTE, APP_ICON_DATA, true);
if (!m_app_icon_texture.Create(APP_ICON_WIDTH, APP_ICON_HEIGHT, GL_RGBA, GL_UNSIGNED_BYTE, APP_ICON_DATA, true))
return false;
// samplers
glGenSamplers(1, &m_display_nearest_sampler);

View File

@ -52,7 +52,7 @@ private:
int m_window_width = 0;
int m_window_height = 0;
std::unique_ptr<GL::Texture> m_app_icon_texture = nullptr;
GL::Texture m_app_icon_texture;
GL::Program m_display_program;
GLuint m_display_vao = 0;