Adds specific flag for compressed animation buffers

This commit is contained in:
Marc Helbling
2016-07-05 16:37:46 +02:00
parent 67b17fa801
commit 67c301c236
2 changed files with 23 additions and 0 deletions

View File

@@ -240,6 +240,16 @@ static void addJSONChannel(osgAnimation::Channel* channel, JSONObject& anim, Wri
}
}
#ifdef USE_COMPRESSED_CHANNELS
{
osgAnimation::Vec3usLinearChannel* c = dynamic_cast<osgAnimation::Vec3usLinearChannel*>(channel);
if (c) {
if (addJSONChannel<osgAnimation::Vec3usLinearChannel>("osgAnimation.Vec3LerpChannelCompressed", c, true, anim, writer, parent))
return;
}
}
#endif
{
osgAnimation::QuatSphericalLinearChannel* c = dynamic_cast<osgAnimation::QuatSphericalLinearChannel*>(channel);
if (c) {
@@ -248,6 +258,16 @@ static void addJSONChannel(osgAnimation::Channel* channel, JSONObject& anim, Wri
}
}
#ifdef USE_COMPRESSED_CHANNELS
{
osgAnimation::Vec3usSphericalLinearChannel* c = dynamic_cast<osgAnimation::Vec3usSphericalLinearChannel*>(channel);
if (c) {
if (addJSONChannel<osgAnimation::Vec3usSphericalLinearChannel>("osgAnimation.QuatSlerpChannelCompressed", c, true, anim, writer, parent))
return;
}
}
#endif
{
osgAnimation::FloatCubicBezierChannel* c = dynamic_cast<osgAnimation::FloatCubicBezierChannel*>(channel);
if (c) {

View File

@@ -16,6 +16,9 @@ SET(TARGET_H
WriteVisitor
)
IF($ENV{SKETCHFAB_BUILD})
ADD_DEFINITIONS(-DUSE_COMPRESSED_CHANNELS)
ENDIF()
#### end var setup ###
SET(TARGET_ADDED_LIBRARIES