Commit 21806e70 authored by Jan Möbius's avatar Jan Möbius
Browse files

More size_t warnings fixed

parent 94948f98
Pipeline #3321 passed with stage
in 36 minutes and 19 seconds
......@@ -256,23 +256,23 @@ void MeshCompiler::computeAdjacency(bool _forceRecompute)
}
void MeshCompiler::setVertices( int _num, const void* _data, int _stride, bool _internalCopy /*= false*/, GLuint _fmt, int _elementSize )
void MeshCompiler::setVertices( size_t _num, const void* _data, size_t _stride, bool _internalCopy /*= false*/, GLuint _fmt, int _elementSize )
{
setAttribVec(inputIDPos_, _num, _data, _stride, _internalCopy, _fmt, _elementSize);
}
void MeshCompiler::setNormals( int _num, const void* _data, int _stride, bool _internalCopy /*= false*/, GLuint _fmt, int _elementSize )
void MeshCompiler::setNormals( size_t _num, const void* _data, size_t _stride, bool _internalCopy /*= false*/, GLuint _fmt, int _elementSize )
{
setAttribVec(inputIDNorm_, _num, _data, _stride, _internalCopy, _fmt, _elementSize);
}
void MeshCompiler::setTexCoords( int _num, const void* _data, int _stride, bool _internalCopy /*= false*/, GLuint _fmt, int _elementSize )
void MeshCompiler::setTexCoords( size_t _num, const void* _data, size_t _stride, bool _internalCopy /*= false*/, GLuint _fmt, int _elementSize )
{
setAttribVec(inputIDTexC_, _num, _data, _stride, _internalCopy, _fmt, _elementSize);
}
void MeshCompiler::setAttribVec(int _attrIdx, int _num, const void* _data, int _stride, bool _internalCopy /*= false*/, GLuint _fmt, int _elementSize)
void MeshCompiler::setAttribVec(int _attrIdx, size_t _num, const void* _data, size_t _stride, bool _internalCopy /*= false*/, GLuint _fmt, int _elementSize)
{
// sets vertex data for each attribute individually
// Example:
......@@ -307,7 +307,7 @@ void MeshCompiler::setAttribVec(int _attrIdx, int _num, const void* _data, int _
if (_data)
{
// copy elementwise because of striding
for (int i = 0; i < _num; ++i)
for (size_t i = 0; i < _num; ++i)
{
memcpy(inbuf->internalBuf + (size_t)(size * i),
(const char*)_data + (size_t)(_stride * i),
......
......@@ -265,7 +265,7 @@ public:
* @param _fmt data format of one element (must be set if input data does not match vertex declaration)
* @param _elementSize number of elements per attribute (i.e. 3 for vec3 .., -1 if unknown)
*/
void setVertices(int _num, const void* _data, int _stride = 0, bool _internalCopy = false, GLuint _fmt = 0, int _elementSize = -1);
void setVertices(size_t _num, const void* _data, size_t _stride = 0, bool _internalCopy = false, GLuint _fmt = 0, int _elementSize = -1);
/** set input normals
*
......@@ -276,7 +276,7 @@ public:
* @param _fmt data format of one element (must be set if input data does not match vertex declaration)
* @param _elementSize number of elements per attribute (i.e. 3 for vec3 .., -1 if unknown)
*/
void setNormals(int _num, const void* _data, int _stride = 0, bool _internalCopy = false, GLuint _fmt = 0, int _elementSize = -1);
void setNormals(size_t _num, const void* _data, size_t _stride = 0, bool _internalCopy = false, GLuint _fmt = 0, int _elementSize = -1);
/** set input texture coords
*
......@@ -287,7 +287,7 @@ public:
* @param _fmt data format of one element (must be set if input data does not match vertex declaration)
* @param _elementSize number of elements per attribute (i.e. 3 for vec3 .., -1 if unknown)
*/
void setTexCoords(int _num, const void* _data, int _stride = 0, bool _internalCopy = false, GLuint _fmt = 0, int _elementSize = -1);
void setTexCoords(size_t _num, const void* _data, size_t _stride = 0, bool _internalCopy = false, GLuint _fmt = 0, int _elementSize = -1);
/** Set custom input attribute.
*
......@@ -300,7 +300,7 @@ public:
* @param _fmt data format of one element (must be set if input data does not match vertex declaration)
* @param _elementSize number of elements per attribute (i.e. 3 for vec3 .., -1 if unknown)
*/
void setAttribVec(int _attrIdx, int _num, const void* _data, int _stride = 0, bool _internalCopy = false, GLuint _fmt = 0, int _elementSize = -1);
void setAttribVec(int _attrIdx, size_t _num, const void* _data, size_t _stride = 0, bool _internalCopy = false, GLuint _fmt = 0, int _elementSize = -1);
/** Set single custom input attributes.
*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment