Ver Fonte

-fixed old condition in TextureFrame that caused bugs in materials, closes #1742

Juan Linietsky há 10 anos atrás
pai
commit
c45ffc2ca9
2 ficheiros alterados com 2 adições e 3 exclusões
  1. 0 1
      drivers/gles2/rasterizer_gles2.cpp
  2. 2 2
      scene/gui/texture_frame.cpp

+ 0 - 1
drivers/gles2/rasterizer_gles2.cpp

@@ -1263,7 +1263,6 @@ void RasterizerGLES2::texture_set_flags(RID p_texture,uint32_t p_flags) {
 		p_flags&=VS::TEXTURE_FLAG_FILTER;//can change only filter
 		p_flags&=VS::TEXTURE_FLAG_FILTER;//can change only filter
 	}
 	}
 
 
-
 	glActiveTexture(GL_TEXTURE0);
 	glActiveTexture(GL_TEXTURE0);
 	glBindTexture(texture->target, texture->tex_id);
 	glBindTexture(texture->target, texture->tex_id);
 	uint32_t cube = texture->flags & VS::TEXTURE_FLAG_CUBEMAP;
 	uint32_t cube = texture->flags & VS::TEXTURE_FLAG_CUBEMAP;

+ 2 - 2
scene/gui/texture_frame.cpp

@@ -88,8 +88,8 @@ void TextureFrame::set_texture(const Ref<Texture>& p_tex) {
 
 
 	texture=p_tex;
 	texture=p_tex;
 	update();
 	update();
-	if (texture.is_valid())
-		texture->set_flags(texture->get_flags()&(~Texture::FLAG_REPEAT)); //remove repeat from texture, it looks bad in sprites
+	//if (texture.is_valid())
+	//	texture->set_flags(texture->get_flags()&(~Texture::FLAG_REPEAT)); //remove repeat from texture, it looks bad in sprites
 	minimum_size_changed();
 	minimum_size_changed();
 }
 }