mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 18:19:55 +00:00
Add const qualifiers
This commit is contained in:
parent
5d524a6a10
commit
4bef8260ab
3 changed files with 5 additions and 5 deletions
|
@ -31,7 +31,7 @@ void MorphGeometry::setSourceGeometry(osg::ref_ptr<osg::Geometry> sourceGeom)
|
||||||
{
|
{
|
||||||
mGeometry[i] = new osg::Geometry(*mSourceGeometry, osg::CopyOp::SHALLOW_COPY);
|
mGeometry[i] = new osg::Geometry(*mSourceGeometry, osg::CopyOp::SHALLOW_COPY);
|
||||||
|
|
||||||
osg::Geometry& from = *mSourceGeometry;
|
const osg::Geometry& from = *mSourceGeometry;
|
||||||
osg::Geometry& to = *mGeometry[i];
|
osg::Geometry& to = *mGeometry[i];
|
||||||
to.setSupportsDisplayList(false);
|
to.setSupportsDisplayList(false);
|
||||||
to.setUseVertexBufferObjects(true);
|
to.setUseVertexBufferObjects(true);
|
||||||
|
|
|
@ -35,7 +35,7 @@ void RigGeometry::setSourceGeometry(osg::ref_ptr<osg::Geometry> sourceGeometry)
|
||||||
|
|
||||||
for (unsigned int i=0; i<2; ++i)
|
for (unsigned int i=0; i<2; ++i)
|
||||||
{
|
{
|
||||||
osg::Geometry& from = *sourceGeometry;
|
const osg::Geometry& from = *sourceGeometry;
|
||||||
mGeometry[i] = new osg::Geometry(from, osg::CopyOp::SHALLOW_COPY);
|
mGeometry[i] = new osg::Geometry(from, osg::CopyOp::SHALLOW_COPY);
|
||||||
osg::Geometry& to = *mGeometry[i];
|
osg::Geometry& to = *mGeometry[i];
|
||||||
to.setSupportsDisplayList(false);
|
to.setSupportsDisplayList(false);
|
||||||
|
@ -54,7 +54,7 @@ void RigGeometry::setSourceGeometry(osg::ref_ptr<osg::Geometry> sourceGeometry)
|
||||||
to.setVertexArray(vertexArray);
|
to.setVertexArray(vertexArray);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (osg::Array* normals = from.getNormalArray())
|
if (const osg::Array* normals = from.getNormalArray())
|
||||||
{
|
{
|
||||||
osg::ref_ptr<osg::Array> normalArray = osg::clone(normals, osg::CopyOp::DEEP_COPY_ALL);
|
osg::ref_ptr<osg::Array> normalArray = osg::clone(normals, osg::CopyOp::DEEP_COPY_ALL);
|
||||||
if (normalArray)
|
if (normalArray)
|
||||||
|
@ -64,7 +64,7 @@ void RigGeometry::setSourceGeometry(osg::ref_ptr<osg::Geometry> sourceGeometry)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (osg::Vec4Array* tangents = dynamic_cast<osg::Vec4Array*>(from.getTexCoordArray(7)))
|
if (const osg::Vec4Array* tangents = dynamic_cast<const osg::Vec4Array*>(from.getTexCoordArray(7)))
|
||||||
{
|
{
|
||||||
mSourceTangents = tangents;
|
mSourceTangents = tangents;
|
||||||
osg::ref_ptr<osg::Array> tangentArray = osg::clone(tangents, osg::CopyOp::DEEP_COPY_ALL);
|
osg::ref_ptr<osg::Array> tangentArray = osg::clone(tangents, osg::CopyOp::DEEP_COPY_ALL);
|
||||||
|
|
|
@ -57,7 +57,7 @@ namespace SceneUtil
|
||||||
osg::Geometry* getGeometry(unsigned int frame) const;
|
osg::Geometry* getGeometry(unsigned int frame) const;
|
||||||
|
|
||||||
osg::ref_ptr<osg::Geometry> mSourceGeometry;
|
osg::ref_ptr<osg::Geometry> mSourceGeometry;
|
||||||
osg::ref_ptr<osg::Vec4Array> mSourceTangents;
|
osg::ref_ptr<const osg::Vec4Array> mSourceTangents;
|
||||||
Skeleton* mSkeleton;
|
Skeleton* mSkeleton;
|
||||||
|
|
||||||
osg::ref_ptr<osg::RefMatrix> mGeomToSkelMatrix;
|
osg::ref_ptr<osg::RefMatrix> mGeomToSkelMatrix;
|
||||||
|
|
Loading…
Reference in a new issue