mirror of
https://github.com/GTNewHorizons/Angelica.git
synced 2026-11-19 03:49:22 +00:00
Clear cache on reload shaders
This commit is contained in:
1 parent
aff5ff7e7b
commit
09cc557be0
2 files changed
+7
No files matched your search
@@ -78,6 +78,11 @@ public class FullScreenQuadRenderer {
|
||||
/** Per-program cached uniform locations: [mvLoc, projLoc]. Populated on first miss. */
|
||||
private static final Int2ObjectOpenHashMap<int[]> compositeLocCache = new Int2ObjectOpenHashMap<>();
|
||||
|
||||
/** Clear cached uniform locations. Must be called when composite programs are destroyed (e.g. shader reload). */
|
||||
public static void clearLocCache() {
|
||||
compositeLocCache.clear();
|
||||
}
|
||||
|
||||
public static void uploadCompositeMatrices() {
|
||||
final int program = GLStateManager.glGetInteger(GL20.GL_CURRENT_PROGRAM);
|
||||
if (program == 0) return;
|
||||
|
||||
Reference in new issue
Block a user