]> git.tdb.fi Git - libs/gl.git/commitdiff
Rename size to array_size in Program variable info structs
authorMikko Rasa <tdb@tdb.fi>
Wed, 31 Mar 2021 14:54:13 +0000 (17:54 +0300)
committerMikko Rasa <tdb@tdb.fi>
Wed, 31 Mar 2021 17:28:56 +0000 (20:28 +0300)
source/core/program.cpp
source/core/program.h

index dd155d5c5c9ed4c3296591bd1ea645b7018e46b8..dd22033e7e4369df1fa7818dbc59f70f29436bb1 100644 (file)
@@ -275,7 +275,7 @@ void Program::query_uniforms()
                        UniformInfo &info = uniforms[name];
                        info.block = 0;
                        info.name = name;
-                       info.size = size;
+                       info.array_size = size;
                        info.array_stride = 0;
                        info.matrix_stride = 0;
                        info.type = from_gl_type(type);
@@ -343,7 +343,7 @@ void Program::query_uniform_blocks(const vector<UniformInfo *> &uniforms_by_inde
 
                indices2.clear();
                for(vector<int>::iterator j=indices.begin(); j!=indices.end(); ++j)
-                       if(uniforms_by_index[*j]->size>1)
+                       if(uniforms_by_index[*j]->array_size>1)
                                indices2.push_back(*j);
                if(!indices2.empty())
                {
@@ -395,7 +395,7 @@ void Program::query_attributes()
                        AttributeInfo &info = attributes[name];
                        info.name = name;
                        info.location = glGetAttribLocation(id, name);
-                       info.size = size;
+                       info.array_size = size;
                        info.type = from_gl_type(type);
                }
        }
@@ -405,7 +405,7 @@ Program::LayoutHash Program::compute_layout_hash(const vector<const UniformInfo
 {
        string layout_descriptor;
        for(vector<const UniformInfo *>::const_iterator i = uniforms.begin(); i!=uniforms.end(); ++i)
-               layout_descriptor += format("%d:%s:%x:%d\n", (*i)->location, (*i)->name, (*i)->type, (*i)->size);
+               layout_descriptor += format("%d:%s:%x:%d\n", (*i)->location, (*i)->name, (*i)->type, (*i)->array_size);
        return hash32(layout_descriptor);
 }
 
index 40c1d320f861e81d662ec2aa8e118e3191a5c602..33413eb01da23eb035fa0fc04e1fc5c488d7c323 100644 (file)
@@ -65,7 +65,7 @@ public:
                std::string name;
                const UniformBlockInfo *block;
                unsigned location;
-               unsigned size;
+               unsigned array_size;
                unsigned array_stride;
                unsigned matrix_stride;
                DataType type;
@@ -84,7 +84,7 @@ public:
        {
                std::string name;
                unsigned location;
-               unsigned size;
+               unsigned array_size;
                DataType type;
        };