bpy.types.Mesh.winding_test = bpy.props.BoolProperty(name="Winding test", description="Perform winding test to skip back faces")
bpy.types.Object.technique = bpy.props.StringProperty(name="Technique", description="Name of the technique to use for rendering")
bpy.types.Object.inherit_tech = bpy.props.BoolProperty(name="Inherit technique", description="Inherit from the technique to customize textures")
- bpy.types.Object.override_material = bpy.props.BoolProperty(name="Override material", description="Override material in the inherited texture as well", default=True)
+ bpy.types.Object.override_material = bpy.props.BoolProperty(name="Override material", description="Override material in the inherited technique as well", default=True)
bpy.types.Object.compound = bpy.props.BoolProperty(name="Compound with parent", description="Join this object to its parent when exporting")
bpy.types.Object.lod_for_parent = bpy.props.BoolProperty(name="LoD for parent", description="This object is a level of detail for its parent")
bpy.types.Object.lod_index = bpy.props.IntProperty(name="LoD index", description="Index of the level of detail", min=1, default=1)
bool AnimationPlayer::tick_single(ObjectSlot &slot, const Time::TimeDelta &dt)
{
- AnimatedObject &obj = slot.object;
AnimationSlot &anim = slot.animations.front();
anim.iterator += dt;
- obj.set_matrix(anim.iterator.get_matrix());
+ slot.object.set_matrix(anim.iterator.get_matrix());
unsigned n_uniforms = anim.animation.get_n_uniforms();
for(unsigned i=0; i<n_uniforms; ++i)
- set_object_uniform(obj, anim.animation.get_uniform_name(i), anim.iterator.get_uniform(i));
+ set_object_uniform(slot.object, anim.animation.get_uniform_name(i), anim.iterator.get_uniform(i));
if(slot.armature)
{
unsigned max_index = slot.armature->get_max_link_index();
for(unsigned i=0; i<=max_index; ++i)
- obj.set_pose_matrix(i, anim.iterator.get_pose_matrix(i));
+ slot.object.set_pose_matrix(i, anim.iterator.get_pose_matrix(i));
}
return !anim.iterator.is_end();
void Buffer::set_usage(BufferUsage u)
{
+ // TODO OpenGL ES 2.0 doesn't support read or copy usages
usage = u;
}
-#ifndef MSP_GL_TYPES_H_
-#define MSP_GL_TYPES_H_
+#ifndef MSP_GL_DATATYPE_H_
+#define MSP_GL_DATATYPE_H_
#include "gl.h"
set_technique(t);
}
+// TODO should have copy-c'tor to set watch on lod0 mesh if necessary
+
Object::~Object()
{
if(lods[0].mesh && lod0_watched)
return;
const Framebuffer *out_fbo = Framebuffer::current();
- // These is a no-ops but will ensure the related state gets restored
+ // These are no-ops but will ensure the related state gets restored
BindRestore restore_fbo(out_fbo);
BindRestore restore_depth_test(DepthTest::current());
BindRestore restore_blend(Blend::current());
using namespace ProgramSyntax;
+// XXX For some reason global declarations are emitted for otherwise undeclared local variables
+
ProgramCompiler::ProgramCompiler():
resources(0),
module(0)
for(vector<const Program::UniformInfo *>::const_iterator i=block.uniforms.begin(); i!=block.uniforms.end(); ++i)
{
SlotMap::const_iterator j = uniform_slots.find((*i)->name);
+ /* TODO issue a warning (or even error?) either here or in update_block
+ if all uniforms for a buffer-backed block are not found */
if(j!=uniform_slots.end() && j->second<MASK_BITS)
mask |= 1<<j->second;
}
{
struct Qualifier
{
+ // TODO the standard calls this name, not identifier
std::string identifier;
std::string value;
};