Commit 49e8de70 by Jamie Madill

Fix remaining size_t conversion warnings.

BUG=angleproject:1120 Change-Id: If4fba903511dcd57d21f8f8178e772cf3cae4187 Reviewed-on: https://chromium-review.googlesource.com/293750Tested-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent 5cf0f982
......@@ -87,7 +87,9 @@ class MultipleDrawBuffersSample : public SampleApplication
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0_EXT + i, GL_TEXTURE_2D, mFramebufferTextures[i], 0);
glFramebufferTexture2D(GL_FRAMEBUFFER,
static_cast<GLenum>(GL_COLOR_ATTACHMENT0_EXT + i), GL_TEXTURE_2D,
mFramebufferTextures[i], 0);
}
glBindTexture(GL_TEXTURE_2D, 0);
......@@ -133,8 +135,8 @@ class MultipleDrawBuffersSample : public SampleApplication
mDrawBuffers(mFramebufferAttachmentCount, drawBuffers);
// Set the viewport
size_t width = getWindow()->getWidth();
size_t height = getWindow()->getHeight();
GLint width = static_cast<GLint>(getWindow()->getWidth());
GLint height = static_cast<GLint>(getWindow()->getHeight());
glViewport(0, 0, width, height);
// Clear the color buffer
......
......@@ -137,14 +137,15 @@ class PostSubBufferSample : public SampleApplication
glEnableVertexAttribArray(mTexcoordLoc);
// Draw the cube
glDrawElements(GL_TRIANGLES, mCube.indices.size(), GL_UNSIGNED_SHORT, mCube.indices.data());
glDrawElements(GL_TRIANGLES, static_cast<GLsizei>(mCube.indices.size()), GL_UNSIGNED_SHORT,
mCube.indices.data());
}
virtual void swap()
{
// Instead of letting the application call eglSwapBuffers, call eglPostSubBufferNV here instead
size_t windowWidth = getWindow()->getWidth();
size_t windowHeight = getWindow()->getHeight();
EGLint windowWidth = static_cast<EGLint>(getWindow()->getWidth());
EGLint windowHeight = static_cast<EGLint>(getWindow()->getHeight());
EGLDisplay display = getDisplay();
EGLSurface surface = getSurface();
mPostSubBufferNV(display, surface, 60, 60, windowWidth - 120, windowHeight - 120);
......
......@@ -66,7 +66,8 @@ GLuint CreateSimpleTextureCubemap()
for (size_t i = 0; i < 6; i++)
{
glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, GL_RGB, 1, 1, 0, GL_RGB, GL_UNSIGNED_BYTE, &pixels[i]);
glTexImage2D(static_cast<GLenum>(GL_TEXTURE_CUBE_MAP_POSITIVE_X + i), 0, GL_RGB, 1, 1, 0,
GL_RGB, GL_UNSIGNED_BYTE, &pixels[i]);
}
// Set the filtering mode
......
......@@ -162,7 +162,9 @@ class SimpleInstancingSample : public SampleApplication
glUniform1i(mSamplerLoc, 0);
// Do the instanced draw
mDrawElementsInstancedANGLE(GL_TRIANGLES, mIndices.size(), GL_UNSIGNED_SHORT, mIndices.data(), mInstances.size());
mDrawElementsInstancedANGLE(GL_TRIANGLES, static_cast<GLsizei>(mIndices.size()),
GL_UNSIGNED_SHORT, mIndices.data(),
static_cast<GLsizei>(mInstances.size()));
}
private:
......
......@@ -110,7 +110,8 @@ class SimpleTextureCubemapSample : public SampleApplication
// Set the texture sampler to texture unit to 0
glUniform1i(mSamplerLoc, 0);
glDrawElements(GL_TRIANGLES, mSphere.indices.size(), GL_UNSIGNED_SHORT, mSphere.indices.data());
glDrawElements(GL_TRIANGLES, static_cast<GLsizei>(mSphere.indices.size()),
GL_UNSIGNED_SHORT, mSphere.indices.data());
}
private:
......
......@@ -124,7 +124,8 @@ class SimpleVertexShaderSample : public SampleApplication
glEnableVertexAttribArray(mTexcoordLoc);
// Draw the cube
glDrawElements(GL_TRIANGLES, mCube.indices.size(), GL_UNSIGNED_SHORT, mCube.indices.data());
glDrawElements(GL_TRIANGLES, static_cast<GLsizei>(mCube.indices.size()), GL_UNSIGNED_SHORT,
mCube.indices.data());
}
private:
......
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