Mostly formatting, with a few cleanups of unnecessary things.
sequences = []
for s in ctx.context.blend_data.scenes:
subtask = task.next_slice(s)
- if s.export_disposition=='IGNORE':
- continue
-
if s.export_disposition=='SEQUENCE':
scene = create_scene_chain(s, scenes)
sequences.append(scene)
resources[scene_name] = scene_res
dummy_res.create_reference_statement("ref", scene_res)
+ task = ctx.task("Exporting sequences", 1.0)
for s in sequences:
subtask = task.task(s, 0.5)
seq_name = s.name+".seq"
spec_values = {}
- color_prop = material.properties[0]
if material.cast_shadows and material.alpha_cutoff>0.0:
spec_values["use_alpha_cutoff"] = True
variant += "_masked"
{
private:
Msp::DataFile::DirectorySource source;
- Msp::GL::ResourceManager res_mgr;
public:
Resources(Msp::GL::ResourceManager *);
unsigned get_gl_type(DataType type)
{
const MappedType *end = type_map+type_map_size;
- const MappedType *ptr = lower_bound(type_map, end, type, type_compare);
+ const MappedType *ptr = std::lower_bound(type_map, end, type, type_compare);
if(ptr==end || ptr->type!=type)
throw invalid_argument("get_gl_type");
return ptr->gl_type;
Batch::Batch(PrimitiveType t):
BatchBackend(t),
prim_type(t),
- index_type(VOID),
- max_index(0)
+ index_type(VOID)
{
set_index_type(UNSIGNED_SHORT);
}
PrimitiveType prim_type;
DataType index_type;
std::vector<std::uint8_t> data;
- unsigned max_index;
+ unsigned max_index = 0;
unsigned patch_size = 3;
public:
}
r_any_resolved |= (resolved!=type);
- type=resolved;
+ type = resolved;
}
void TypeResolver::visit(Block &block)
void Renderer::pop_state()
{
- if(state_stack.size()==1)
+ if(state_stack.size()<=1)
throw stack_underflow("Renderer::pop_state");
uintptr_t old_pipeline = current_state->pipeline_key;
void push_state();
/** Restores a previously saved state. Must be matched with an earlier
- push_state call. */
+ push_state() call. */
void pop_state();
private:
/** Draws a batch of primitives. A shader must be active. */
void draw(const Batch &);
- /** Draws multiple instances of a batch of primitives. A shader must be active. */
+ /** Draws multiple instances of a batch of primitives. A shader must be
+ active. */
void draw_instanced(const Batch &, unsigned);
private:
layout(location=0) out vec2 _vs_out_texcoord;
void main()
{
- _vs_out_texcoord = texcoord;
- gl_Position = vp_matrix*transpose(mat4(instance_transform[0], instance_transform[1], instance_transform[2], vec4(0.0, 0.0, 0.0, 1.0)))*position;
+ _vs_out_texcoord = texcoord;
+ gl_Position = vp_matrix*transpose(mat4(instance_transform[0], instance_transform[1], instance_transform[2], vec4(0.0, 0.0, 0.0, 1.0)))*position;
}
*/
layout(location=0) in vec4 _vs_out_color;
void main()
{
- frag_color = vec4(1.0);
- if(use_texture)
- frag_color *= texture(tex, _vs_out_texcoord);
- if(use_vertex_color)
- frag_color *= _vs_out_color;
+ frag_color = vec4(1.0);
+ if(use_texture)
+ frag_color *= texture(tex, _vs_out_texcoord);
+ if(use_vertex_color)
+ frag_color *= _vs_out_color;
}
*/