]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/program.cpp
Give Program::Bindings a more generic name
[libs/gl.git] / source / core / program.cpp
index 9b5400a38122073af034eb05a17cdef434ad5820..39184bbd3b9b18304cc969ffd955cf8e3ed6f4eb 100644 (file)
@@ -71,7 +71,7 @@ void Program::init()
 
        id = glCreateProgram();
        module = 0;
-       bindings = 0;
+       transient = 0;
        linked = false;
 }
 
@@ -160,10 +160,10 @@ void Program::add_glsl_stages(const GlslModule &mod, const map<string, int> &spe
                compile_glsl_stage(stage_id);
        }
 
-       if(!bindings)
-               bindings = new Bindings;
-       bindings->textures = compiler.get_texture_bindings();
-       bindings->blocks = compiler.get_uniform_block_bindings();
+       if(!transient)
+               transient = new TransientData;
+       transient->textures = compiler.get_texture_bindings();
+       transient->blocks = compiler.get_uniform_block_bindings();
 }
 
 void Program::compile_glsl_stage(unsigned stage_id)
@@ -309,12 +309,12 @@ void Program::link()
        {
                query_uniforms();
                query_attributes();
-               if(bindings)
+               if(transient)
                {
                        for(unsigned i=0; i<uniform_blocks.size(); ++i)
                        {
-                               map<string, unsigned>::const_iterator j = bindings->blocks.find(uniform_blocks[i].name);
-                               if(j!=bindings->blocks.end())
+                               map<string, unsigned>::const_iterator j = transient->blocks.find(uniform_blocks[i].name);
+                               if(j!=transient->blocks.end())
                                {
                                        glUniformBlockBinding(id, i, j->second);
                                        uniform_blocks[i].bind_point = j->second;
@@ -322,7 +322,7 @@ void Program::link()
                        }
 
                        Conditional<BindRestore> _bind(!ARB_separate_shader_objects, this);
-                       for(map<string, unsigned>::const_iterator i=bindings->textures.begin(); i!=bindings->textures.end(); ++i)
+                       for(map<string, unsigned>::const_iterator i=transient->textures.begin(); i!=transient->textures.end(); ++i)
                        {
                                int location = get_uniform_location(i->first);
                                if(location>=0)
@@ -334,8 +334,8 @@ void Program::link()
                                }
                        }
 
-                       delete bindings;
-                       bindings = 0;
+                       delete transient;
+                       transient = 0;
                }
        }
        else if(module->get_format()==Module::SPIR_V)