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 ...@@ -87,7 +87,9 @@ class MultipleDrawBuffersSample : public SampleApplication
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); 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_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_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); glBindTexture(GL_TEXTURE_2D, 0);
...@@ -133,8 +135,8 @@ class MultipleDrawBuffersSample : public SampleApplication ...@@ -133,8 +135,8 @@ class MultipleDrawBuffersSample : public SampleApplication
mDrawBuffers(mFramebufferAttachmentCount, drawBuffers); mDrawBuffers(mFramebufferAttachmentCount, drawBuffers);
// Set the viewport // Set the viewport
size_t width = getWindow()->getWidth(); GLint width = static_cast<GLint>(getWindow()->getWidth());
size_t height = getWindow()->getHeight(); GLint height = static_cast<GLint>(getWindow()->getHeight());
glViewport(0, 0, width, height); glViewport(0, 0, width, height);
// Clear the color buffer // Clear the color buffer
......
...@@ -137,14 +137,15 @@ class PostSubBufferSample : public SampleApplication ...@@ -137,14 +137,15 @@ class PostSubBufferSample : public SampleApplication
glEnableVertexAttribArray(mTexcoordLoc); glEnableVertexAttribArray(mTexcoordLoc);
// Draw the cube // 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() virtual void swap()
{ {
// Instead of letting the application call eglSwapBuffers, call eglPostSubBufferNV here instead // Instead of letting the application call eglSwapBuffers, call eglPostSubBufferNV here instead
size_t windowWidth = getWindow()->getWidth(); EGLint windowWidth = static_cast<EGLint>(getWindow()->getWidth());
size_t windowHeight = getWindow()->getHeight(); EGLint windowHeight = static_cast<EGLint>(getWindow()->getHeight());
EGLDisplay display = getDisplay(); EGLDisplay display = getDisplay();
EGLSurface surface = getSurface(); EGLSurface surface = getSurface();
mPostSubBufferNV(display, surface, 60, 60, windowWidth - 120, windowHeight - 120); mPostSubBufferNV(display, surface, 60, 60, windowWidth - 120, windowHeight - 120);
......
...@@ -66,7 +66,8 @@ GLuint CreateSimpleTextureCubemap() ...@@ -66,7 +66,8 @@ GLuint CreateSimpleTextureCubemap()
for (size_t i = 0; i < 6; i++) 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 // Set the filtering mode
......
...@@ -162,7 +162,9 @@ class SimpleInstancingSample : public SampleApplication ...@@ -162,7 +162,9 @@ class SimpleInstancingSample : public SampleApplication
glUniform1i(mSamplerLoc, 0); glUniform1i(mSamplerLoc, 0);
// Do the instanced draw // 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: private:
......
...@@ -110,7 +110,8 @@ class SimpleTextureCubemapSample : public SampleApplication ...@@ -110,7 +110,8 @@ class SimpleTextureCubemapSample : public SampleApplication
// Set the texture sampler to texture unit to 0 // Set the texture sampler to texture unit to 0
glUniform1i(mSamplerLoc, 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: private:
......
...@@ -124,7 +124,8 @@ class SimpleVertexShaderSample : public SampleApplication ...@@ -124,7 +124,8 @@ class SimpleVertexShaderSample : public SampleApplication
glEnableVertexAttribArray(mTexcoordLoc); glEnableVertexAttribArray(mTexcoordLoc);
// Draw the cube // 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: 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