зеркало из https://github.com/AvaloniaUI/angle.git
Fix compile warnings with attributes.
BUG=angle:676 Change-Id: I291c0b618854179f726cb4c969fb65182d3b591e Reviewed-on: https://chromium-review.googlesource.com/204340 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
This commit is contained in:
Родитель
2a59292dab
Коммит
1d4e38d364
|
@ -236,7 +236,8 @@ bool StaticVertexBufferInterface::lookupAttribute(const gl::VertexAttribute &att
|
|||
mCache[element].normalized == attrib.normalized &&
|
||||
mCache[element].pureInteger == attrib.pureInteger)
|
||||
{
|
||||
if (mCache[element].attributeOffset == attrib.offset % ComputeVertexAttributeStride(attrib))
|
||||
size_t offset = (static_cast<size_t>(attrib.offset) % ComputeVertexAttributeStride(attrib));
|
||||
if (mCache[element].attributeOffset == offset)
|
||||
{
|
||||
if (outStreamOffset)
|
||||
{
|
||||
|
@ -275,7 +276,7 @@ bool StaticVertexBufferInterface::storeVertexAttributes(const gl::VertexAttribut
|
|||
unsigned int streamOffset;
|
||||
if (VertexBufferInterface::storeVertexAttributes(attrib, currentValue, start, count, instances, &streamOffset))
|
||||
{
|
||||
int attributeOffset = attrib.offset % ComputeVertexAttributeStride(attrib);
|
||||
size_t attributeOffset = static_cast<size_t>(attrib.offset) % ComputeVertexAttributeStride(attrib);
|
||||
VertexElement element = { attrib.type, attrib.size, ComputeVertexAttributeStride(attrib), attrib.normalized, attrib.pureInteger, attributeOffset, streamOffset };
|
||||
mCache.push_back(element);
|
||||
|
||||
|
|
|
@ -110,7 +110,7 @@ class StaticVertexBufferInterface : public VertexBufferInterface
|
|||
~StaticVertexBufferInterface();
|
||||
|
||||
bool storeVertexAttributes(const gl::VertexAttribute &attrib, const gl::VertexAttribCurrentValueData ¤tValue,
|
||||
GLint start, GLsizei count, GLsizei instances, unsigned int *outStreamOffset);
|
||||
GLint start, GLsizei count, GLsizei instances, unsigned int *outStreamOffset);
|
||||
|
||||
bool lookupAttribute(const gl::VertexAttribute &attribute, unsigned int* outStreamFffset);
|
||||
|
||||
|
@ -121,11 +121,11 @@ class StaticVertexBufferInterface : public VertexBufferInterface
|
|||
struct VertexElement
|
||||
{
|
||||
GLenum type;
|
||||
GLint size;
|
||||
GLsizei stride;
|
||||
GLuint size;
|
||||
GLuint stride;
|
||||
bool normalized;
|
||||
bool pureInteger;
|
||||
int attributeOffset;
|
||||
size_t attributeOffset;
|
||||
|
||||
unsigned int streamOffset;
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче