gl: fix mysterious texture mess with some drivers on windows
commit2bd9decc2ff85dfd9cb8afec2c7b57641968bffa
authorDeaDDooMER <deaddoomer@deadsoftware.ru>
Fri, 22 Mar 2024 16:05:48 +0000 (22 19:05 +0300)
committerDeaDDooMER <deaddoomer@deadsoftware.ru>
Fri, 22 Mar 2024 16:05:48 +0000 (22 19:05 +0300)
tree59e1cff61ae2b46a5c58aca478382e63dd294935
parent666f7703aa1f0347f02c690648e863069926dbe1
gl: fix mysterious texture mess with some drivers on windows
I accidently found that drawing textures without exact following this pattern may lead to mess on screen.

glBindTexture(GL_TEXTURE_2D, id);
glEnable(GL_TEXTURE_2D);
...
glDisable(GL_TEXTURE_2D);

If you enable textures before bind -> you will get a mess.
If you forget to disable textures after draw -> you may get a mess.

This bug present on Win7 with drivers which reports Microsoft GDI Generic renderer.
This bug not reproduced on WinXP.
src/engine/e_graphics.pas
src/flexui/fui_gfx_gl.pas
src/flexui/fui_gfx_gl_cursor.inc
src/game/g_game.pas