Eliminated texture name allocation race condition
This commit is contained in:
parent
65ab79cf69
commit
fb18c07722
2 changed files with 19 additions and 2 deletions
|
@ -0,0 +1,14 @@
|
|||
--- ../src-base/minecraft/net/minecraft/client/renderer/texture/TextureUtil.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/renderer/texture/TextureUtil.java
|
||||
@@ -201,8 +201,11 @@
|
||||
|
||||
public static void func_147946_a(int p_147946_0_, int p_147946_1_, int p_147946_2_, int p_147946_3_, float p_147946_4_)
|
||||
{
|
||||
+ synchronized(cpw.mods.fml.client.SplashProgress.class)
|
||||
+ {
|
||||
func_147942_a(p_147946_0_);
|
||||
func_94277_a(p_147946_0_);
|
||||
+ }
|
||||
|
||||
if (OpenGlHelper.field_148825_d)
|
||||
{
|
|
@ -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);
|
||||
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);
|
||||
|
|
Loading…
Reference in a new issue