context doesn't need to be recreated on resize

This commit is contained in:
IoIxD 2025-12-05 18:53:49 -07:00
commit 31e419a134

View file

@ -251,31 +251,6 @@ static MwBool egl_setup(MwLL self, int width, int height) {
static void egl_resetup(MwLL handle) {
int err;
if(!handle->wayland.egl_do_resetup) {
return;
}
if(!eglMakeCurrent(handle->wayland.egl_display, 0, 0, handle->wayland.egl_context)) {
printf("ERROR: eglMakeCurrent, %0X\n", eglGetError());
return;
}
if(!eglDestroySurface(handle->wayland.egl_display, handle->wayland.egl_surface)) {
printf("ERROR: eglDestroySurface, %0X\n", eglGetError());
return;
};
handle->wayland.egl_surface = eglCreateWindowSurface(handle->wayland.egl_display, handle->wayland.egl_config, handle->wayland.egl_window_native, NULL);
if(handle->wayland.egl_surface == EGL_NO_SURFACE) {
printf("ERROR: eglCreateWindowSurface, %0X\n", eglGetError());
return;
}
if(!eglMakeCurrent(handle->wayland.egl_display, handle->wayland.egl_surface, handle->wayland.egl_surface, handle->wayland.egl_context)) {
printf("ERROR: eglMakeCurrent, %0X\n", eglGetError());
return;
}
glDeleteTextures(1, &handle->wayland.fbo_texture);
glGenTextures(1, &handle->wayland.fbo_texture);
glBindTexture(GL_TEXTURE_2D, handle->wayland.fbo_texture);