name[len-3] = 0;
UniformInfo &info = uniforms[name];
- info.block = 0;
info.name = name;
info.array_size = size;
- info.array_stride = 0;
- info.matrix_stride = 0;
info.type = from_gl_type(type);
uniforms_by_index[i] = &info;
}
query_uniform_blocks(uniforms_by_index);
UniformBlockInfo &default_block = uniform_blocks[string()];
- default_block.data_size = 0;
- default_block.bind_point = -1;
for(UniformMap::iterator i=uniforms.begin(); i!=uniforms.end(); ++i)
if(!i->second.block)
const SpirVModule &mod = static_cast<const SpirVModule &>(*module);
UniformBlockInfo &default_block = uniform_blocks[string()];
- default_block.data_size = 0;
- default_block.bind_point = -1;
const vector<SpirVModule::Variable> &variables = mod.get_variables();
for(vector<SpirVModule::Variable>::const_iterator i=variables.begin(); i!=variables.end(); ++i)
info.block = &default_block;
info.location = i->location;
info.array_size = i->array_size;
- info.array_stride = 0;
- info.matrix_stride = 0;
info.type = i->type;
default_block.uniforms.push_back(&info);
}
}
+Program::UniformInfo::UniformInfo():
+ block(0),
+ location(0),
+ array_size(0),
+ array_stride(0),
+ matrix_stride(0),
+ type(VOID)
+{ }
+
+
+Program::UniformBlockInfo::UniformBlockInfo():
+ data_size(0),
+ bind_point(-1),
+ layout_hash(0)
+{ }
+
+
+Program::AttributeInfo::AttributeInfo():
+ location(-1),
+ array_size(0),
+ type(VOID)
+{ }
+
+
Program::Loader::Loader(Program &p, Collection &c):
DataFile::CollectionObjectLoader<Program>(p, &c)
{