mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-20 20:22:28 +00:00
Eliminated texture name allocation race condition
This commit is contained in:
1 parent
65ab79cf69
commit
fb18c07722
2 files changed
+19
-2
No files matched your search
@@ -534,9 +534,12 @@ public class SplashProgress
|
||||
height = images[0].getHeight();
|
||||
while((size / width) * (size / height) < frames) size *= 2;
|
||||
this.size = size;
|
||||
name = glGenTextures();
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
glBindTexture(GL_TEXTURE_2D, name);
|
||||
synchronized(SplashProgress.class)
|
||||
{
|
||||
name = glGenTextures();
|
||||
glBindTexture(GL_TEXTURE_2D, name);
|
||||
}
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, size, size, 0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, (IntBuffer)null);
|
||||
|
||||
Reference in new issue
Block a user