gl4es
gl4es copied to clipboard
Shader reloading issue
Hello, there is bug in openmw that making me crazy. There is in game option to change max lights count. When its changed openmw generate new, slightly modified shader source code and should recompile and relink them. All works fine on pc with desktop open gl. But with gl4es changing light limit broke shaders (it then use ffp, or objects simply disapear) and if light limit is changed more times aplication just crash. Any idea how to fix this?
Also if i start game with 16 lights limit, then change it to something different it breake them, but changing it back to 16 seems to fix it again. When changing it it triger shaderconv can see the sources with LIBGL_DBGSHADERCONV, but no compilation errors happen.
No, I don't see why it would crash / break. Shaders should be recompiled. I suppose there is an issue in gl4es with a Program that was previously successfully linked beeing changed are re-linked.
So if program is sucesfully compiled and linked, then its source is changed it need only recompile? Not link again? It seems to call gl4es_glLinkProgram when recompilation is trigered.
No, you need to link again.
What I mean is gl4es may have some bug in the re-linking phase, because gl4es does many think when a program links successfully (grabbing all attributes and uniform from that program mainly).