mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 20:59:19 +02:00
gles doesn't support glGetTexLevelParameter (though it anyway doesn't work on ANGLE)
This commit is contained in:
@@ -52,6 +52,9 @@ void texture_window::threadfunc()
|
||||
vao.bind();
|
||||
|
||||
while (!m_exit)
|
||||
{
|
||||
// if texture resized, update window size (maybe not necessary?)
|
||||
if (GLAD_GL_VERSION_3_3 || GLAD_GL_ES_VERSION_3_1)
|
||||
{
|
||||
int w, h;
|
||||
glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_WIDTH, &w);
|
||||
@@ -64,6 +67,7 @@ void texture_window::threadfunc()
|
||||
m_win_h = h;
|
||||
glfwSetWindowSize(m_window, w, h); // eh, not thread-safe (but works?)
|
||||
}
|
||||
}
|
||||
|
||||
glViewport(0, 0, m_win_w, m_win_h);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user