summaryrefslogtreecommitdiff
path: root/indra/newview/gltf
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/gltf')
-rw-r--r--indra/newview/gltf/accessor.cpp10
-rw-r--r--indra/newview/gltf/animation.cpp6
-rw-r--r--indra/newview/gltf/asset.cpp4
-rw-r--r--indra/newview/gltf/primitive.cpp6
4 files changed, 13 insertions, 13 deletions
diff --git a/indra/newview/gltf/accessor.cpp b/indra/newview/gltf/accessor.cpp
index 55d36b7a32..8559656b40 100644
--- a/indra/newview/gltf/accessor.cpp
+++ b/indra/newview/gltf/accessor.cpp
@@ -41,9 +41,9 @@ const Buffer& Buffer::operator=(const tinygltf::Buffer& src)
const BufferView& BufferView::operator=(const tinygltf::BufferView& src)
{
mBuffer = src.buffer;
- mByteLength = src.byteLength;
- mByteOffset = src.byteOffset;
- mByteStride = src.byteStride;
+ mByteLength = (S32)src.byteLength;
+ mByteOffset = (S32)src.byteOffset;
+ mByteStride = (S32)src.byteStride;
mTarget = src.target;
mName = src.name;
return *this;
@@ -52,9 +52,9 @@ const BufferView& BufferView::operator=(const tinygltf::BufferView& src)
const Accessor& Accessor::operator=(const tinygltf::Accessor& src)
{
mBufferView = src.bufferView;
- mByteOffset = src.byteOffset;
+ mByteOffset = (S32)src.byteOffset;
mComponentType = src.componentType;
- mCount = src.count;
+ mCount = (S32)src.count;
mType = src.type;
mNormalized = src.normalized;
mName = src.name;
diff --git a/indra/newview/gltf/animation.cpp b/indra/newview/gltf/animation.cpp
index da6d02b356..d6a899ad4c 100644
--- a/indra/newview/gltf/animation.cpp
+++ b/indra/newview/gltf/animation.cpp
@@ -110,15 +110,15 @@ void Animation::Sampler::getFrameInfo(Asset& asset, F32 time, U32& frameIndex, F
{
if (time > mMaxTime)
{
- frameIndex = mFrameTimes.size() - 2;
+ frameIndex = (U32)mFrameTimes.size() - 2;
t = 1.0f;
return;
}
- frameIndex = mFrameTimes.size() - 2;
+ frameIndex = (U32)mFrameTimes.size() - 2;
t = 1.f;
- for (U32 i = 0; i < mFrameTimes.size() - 1; i++)
+ for (U32 i = 0; i < (U32)mFrameTimes.size() - 1; i++)
{
if (time >= mFrameTimes[i] && time < mFrameTimes[i + 1])
{
diff --git a/indra/newview/gltf/asset.cpp b/indra/newview/gltf/asset.cpp
index 313e82bf01..fbc3648fd2 100644
--- a/indra/newview/gltf/asset.cpp
+++ b/indra/newview/gltf/asset.cpp
@@ -657,8 +657,8 @@ void Skin::uploadMatrixPalette(Asset& asset, Node& node)
}
LLGLSLShader::sCurBoundShaderPtr->uniformMatrix3x4fv(LLViewerShaderMgr::AVATAR_MATRIX,
- mJoints.size(),
- FALSE,
+ (U32)mJoints.size(),
+ GL_FALSE,
(GLfloat*)glmp.data());
}
diff --git a/indra/newview/gltf/primitive.cpp b/indra/newview/gltf/primitive.cpp
index b57a0af18d..d536f6a4cd 100644
--- a/indra/newview/gltf/primitive.cpp
+++ b/indra/newview/gltf/primitive.cpp
@@ -93,7 +93,7 @@ void Primitive::allocateGLResources(Asset& asset)
}
mVertexBuffer = new LLVertexBuffer(mask);
- mVertexBuffer->allocateBuffer(mPositions.size(), mIndexArray.size()*2); // double the size of the index buffer for 32-bit indices
+ mVertexBuffer->allocateBuffer((U32)mPositions.size(), (U32)mIndexArray.size()*2); // double the size of the index buffer for 32-bit indices
mVertexBuffer->setBuffer();
mVertexBuffer->setPositionData(mPositions.data());
@@ -332,8 +332,8 @@ const LLVolumeTriangle* Primitive::lineSegmentIntersect(const LLVector4a& start,
face.mTangents = mTangents.data();
face.mIndices = nullptr; // unreferenced
- face.mNumIndices = mIndexArray.size();
- face.mNumVertices = mPositions.size();
+ face.mNumIndices = (S32)mIndexArray.size();
+ face.mNumVertices = (S32)mPositions.size();
LLOctreeTriangleRayIntersect intersect(start, dir, &face, &closest_t, intersection, tex_coord, normal, tangent_out);
intersect.traverse(mOctree);