]> git.tdb.fi Git - libs/gl.git/blobdiff - source/renderpass.cpp
Derive ProgramCompiler::DeclarationCombiner from BlockModifier
[libs/gl.git] / source / renderpass.cpp
index 448db60a91f967cca6362a2ad9e5c41ff5afdc68..4063df5fcf27ea5c56069cd8621473f181e9a3ce 100644 (file)
@@ -6,7 +6,6 @@
 #include "program.h"
 #include "programdata.h"
 #include "renderer.h"
-#include "texenv.h"
 #include "texture.h"
 #include "texture2d.h"
 #include "texturing.h"
@@ -33,6 +32,17 @@ RenderPass::RenderPass(const RenderPass &other):
        back_faces(other.back_faces)
 { }
 
+RenderPass &RenderPass::operator=(const RenderPass &other)
+{
+       shprog = other.shprog;
+       shdata = other.shdata ? new ProgramData(*other.shdata) : 0;
+       material = other.material;
+       texturing = other.texturing ? new Texturing(*other.texturing) : 0;
+       tex_names = other.tex_names;
+       back_faces = other.back_faces;
+       return *this;
+}
+
 RenderPass::~RenderPass()
 {
        delete texturing;
@@ -151,22 +161,11 @@ void RenderPass::TextureLoader::finish()
 {
        if(tex)
        {
-               if(env)
-                       obj.attach(index, *tex, *env);
-               else
-                       obj.attach(index, *tex);
+               obj.attach(index, *tex);
                tex.release();
-               env.release();
        }
 }
 
-void RenderPass::TextureLoader::texenv()
-{
-       throw runtime_error("TexEnvs can't be loaded yet");
-       /*env = new TexEnv;
-       load_sub(*env);*/
-}
-
 void RenderPass::TextureLoader::texture(const string &name)
 {
        tex = &get_collection().get<Texture>(name);