Index: branches/new_class_id/src/lib/graphics/Makefile.am
===================================================================
--- branches/new_class_id/src/lib/graphics/Makefile.am	(revision 9819)
+++ branches/new_class_id/src/lib/graphics/Makefile.am	(revision 9820)
@@ -10,4 +10,5 @@
 		shader.cc \
 		shader_data.cc \
+		resource_shader.cc \
 		\
 		render2D/render_2d.cc \
@@ -28,4 +29,5 @@
 		shader.h \
 		shader_data.h \
+		resource_shader.h \
 		\
 		render2D/render_2d.h \
Index: branches/new_class_id/src/lib/graphics/resource_shader.cc
===================================================================
--- branches/new_class_id/src/lib/graphics/resource_shader.cc	(revision 9820)
+++ branches/new_class_id/src/lib/graphics/resource_shader.cc	(revision 9820)
@@ -0,0 +1,38 @@
+
+#include "resource_shader.h"
+#include "debug.h"
+
+
+ResourceShader::ResourceShader(const std::string& vertexShaderName, const std::string& fragmentShaderName)
+    : NewResource(&ResourceShader::type)
+{
+  Resources::StorePointer* ptr = this->acquireResource(vertexShaderName +'|'+fragmentShaderName);
+
+  if (ptr)
+  {
+    PRINTF(5)("FOUND SHADER: %s\n", vertexShaderName.c_str());
+    this->acquireData(static_cast<ResourceShader::ShaderResourcePointer*>(ptr)->ptr());
+  }
+  else
+  {
+    PRINTF(5)("NOT FOUND SHADER: %s\n", vertexShaderName.c_str());
+    std::string vertexFileName = this->NewResource::locateFile(vertexShaderName);
+    std::string fragmentFileName;
+    if (!fragmentShaderName.empty())
+      fragmentFileName = this->NewResource::locateFile(fragmentShaderName);
+
+    this->Shader::load(vertexFileName, fragmentFileName);
+    this->NewResource::addResource(new ResourceShader::ShaderResourcePointer(vertexShaderName+'|'+fragmentShaderName, Resources::KeepLevel(0), this->Shader::dataPointer()));
+  }
+}
+
+
+Resources::Type ResourceShader::type("Shader");
+
+
+
+
+
+ResourceShader::ShaderResourcePointer::ShaderResourcePointer(const std::string& loadString, const Resources::KeepLevel& keepLevel, const ShaderData::Pointer& data)
+    : Resources::StorePointer(loadString, keepLevel) , pointer(data)
+{}
Index: branches/new_class_id/src/lib/graphics/resource_shader.h
===================================================================
--- branches/new_class_id/src/lib/graphics/resource_shader.h	(revision 9820)
+++ branches/new_class_id/src/lib/graphics/resource_shader.h	(revision 9820)
@@ -0,0 +1,35 @@
+/*!
+ * @file resource_shader.h
+ * @brief Contains the ResourceShader class, that handles the Resource-specific loading part of the Shader.
+ *
+ */
+
+#ifndef _RESOURCE_SHADER_H
+#define _RESOURCE_SHADER_H
+
+#include "util/loading/resource.h"
+#include "shader.h"
+
+
+class ResourceShader : public Shader, public Resources::NewResource
+{
+public:
+  ResourceShader(const std::string& vertexShaderName, const std::string& fragmentShaderName);
+
+
+private:
+class ShaderResourcePointer : public Resources::StorePointer
+  {
+  public:
+    ShaderResourcePointer(const std::string& loadString, const Resources::KeepLevel& keepLevel, const ShaderData::Pointer& data);
+    inline const ShaderData::Pointer& ptr() const { return pointer; }
+  private:
+    ShaderData::Pointer pointer;
+  };
+
+private:
+  static Resources::Type type;
+};
+
+
+#endif /* _RESOURCE_SHADER_H */
Index: branches/new_class_id/src/world_entities/environments/mapped_water.cc
===================================================================
--- branches/new_class_id/src/world_entities/environments/mapped_water.cc	(revision 9819)
+++ branches/new_class_id/src/world_entities/environments/mapped_water.cc	(revision 9820)
@@ -164,5 +164,6 @@
 {
   // load shader files
-  shader = Shader( ResourceManager::getInstance()->getDataDir() + "/shaders/mapped_water.vert", ResourceManager::getInstance()->getDataDir() +"/shaders/mapped_water.frag");
+  shader = Shader( ResourceManager::getInstance()->getDataDir() + "/shaders/mapped_water.vert",
+		   ResourceManager::getInstance()->getDataDir() +"/shaders/mapped_water.frag");
 
   this->shader.activateShader();
