]> git.lizzy.rs Git - minetest.git/blobdiff - src/client/shader.h
Add helpful error messages if Irrlicht library / include dir are set incorrectly...
[minetest.git] / src / client / shader.h
index d991826930c271d14767e8fa89a887d4509f790f..49a5631154a9b59a1632d534423a6e74b9b73a85 100644 (file)
@@ -20,8 +20,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 
 #pragma once
 
-#include <IMaterialRendererServices.h>
 #include "irrlichttypes_bloated.h"
+#include <IMaterialRendererServices.h>
 #include <string>
 #include "tile.h"
 #include "nodedef.h"
@@ -96,9 +96,10 @@ class CachedShaderSetting {
                if (has_been_set && std::equal(m_sent, m_sent + count, value))
                        return;
                if (is_pixel)
-                       services->setPixelShaderConstant(m_name, value, count);
+                       services->setPixelShaderConstant(services->getPixelShaderConstantID(m_name), value, count);
                else
-                       services->setVertexShaderConstant(m_name, value, count);
+                       services->setVertexShaderConstant(services->getVertexShaderConstantID(m_name), value, count);
+
                std::copy(value, value + count, m_sent);
                has_been_set = true;
        }