From 7c069241318b7133ac2df65ee13cb1d2968c5974 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Wed, 31 Mar 2021 17:54:13 +0300 Subject: [PATCH] Rename size to array_size in Program variable info structs --- source/core/program.cpp | 8 ++++---- source/core/program.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/source/core/program.cpp b/source/core/program.cpp index dd155d5c..dd22033e 100644 --- a/source/core/program.cpp +++ b/source/core/program.cpp @@ -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 &uniforms_by_inde indices2.clear(); for(vector::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_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); } diff --git a/source/core/program.h b/source/core/program.h index 40c1d320..33413eb0 100644 --- a/source/core/program.h +++ b/source/core/program.h @@ -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; }; -- 2.43.0