namespace GL {
InstanceArray::InstanceArray(const Object &o):
- object(o),
- instance_buffer(0),
- matrix_location(-1),
- matrix_offset(0)
+ object(o)
{
const Technique *tech = object.get_technique();
for(const auto &kvp: tech->get_methods())
const Object &object;
std::vector<ObjectInstance *> instances;
VertexArray instance_data;
- Buffer *instance_buffer;
+ Buffer *instance_buffer = 0;
VertexSetup vtx_setup;
- int matrix_location;
- unsigned matrix_offset;
+ int matrix_location = -1;
+ unsigned matrix_offset = 0;
public:
InstanceArray(const Object &);
namespace GL {
ProgramData::ProgramData(const Program *p):
- tied_program(p),
- generation(0),
- last_buffer_block(0),
- buffer(0),
- dirty(0)
+ tied_program(p)
{ }
// Blocks are intentionally left uncopied
tied_program(other.tied_program),
uniforms(other.uniforms),
uniform_data(other.uniform_data),
- generation(other.generation),
- last_buffer_block(0),
- buffer(0),
- dirty(0)
+ generation(other.generation)
{ }
ProgramData::ProgramData(const ProgramData &other, const Program *p):
- tied_program(p),
- last_buffer_block(0),
- buffer(0),
- dirty(0)
+ tied_program(p)
{
if(tied_program)
{
const Program *tied_program;
std::vector<TaggedUniform> uniforms;
std::vector<char> uniform_data;
- unsigned generation;
+ unsigned generation = 0;
mutable std::vector<SharedBlock> blocks;
mutable std::vector<ProgramBlock> programs;
- mutable UniformBlock *last_buffer_block;
- mutable Buffer *buffer;
- mutable Mask dirty;
+ mutable UniformBlock *last_buffer_block = 0;
+ mutable Buffer *buffer = 0;
+ mutable Mask dirty = 0;
std::string debug_name;
public:
namespace Msp {
namespace GL {
-Renderer::Renderer():
- changed(0)
+Renderer::Renderer()
{
state_stack.reserve(16);
state_stack.push_back(State());
SHADER_DATA = 16
};
- unsigned char changed;
+ unsigned char changed = 0;
std::vector<State> state_stack;
State *state;
std::vector<BoundTexture> texture_stack;