GL: Improve error handling with texture creation
This commit is contained in:
@ -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);
|
||||
|
||||
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user