mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-12 08:05:18 +02:00
Driver: Change the texture check condition
The return value of 'ensureTexture' is unsuited for the texture "".
This fixes an undesired side-effect introduced by 9213b7f1
.
This commit is contained in:
@@ -85,8 +85,8 @@ void TextureBuffer::reset(PipelineContext &context)
|
|||||||
// change textures to match definitions
|
// change textures to match definitions
|
||||||
for (u32 i = 0; i < m_definitions.size(); i++) {
|
for (u32 i = 0; i < m_definitions.size(); i++) {
|
||||||
video::ITexture **ptr = &m_textures[i];
|
video::ITexture **ptr = &m_textures[i];
|
||||||
|
ensureTexture(ptr, m_definitions[i], context);
|
||||||
if (!ensureTexture(ptr, m_definitions[i], context)) {
|
if (m_definitions[i].valid && !*ptr) {
|
||||||
throw ShaderException(
|
throw ShaderException(
|
||||||
fmtgettext("Failed to create the texture \"%s\" for the rendering pipeline.",
|
fmtgettext("Failed to create the texture \"%s\" for the rendering pipeline.",
|
||||||
m_definitions[i].name.c_str()) +
|
m_definitions[i].name.c_str()) +
|
||||||
|
Reference in New Issue
Block a user