Fixed some compiler warnings

This commit is contained in:
Alex Szpakowski
2013-12-07 05:07:54 -04:00
parent eadb718ade
commit 2ee869b0e8
9 changed files with 19 additions and 19 deletions
+2 -2
View File
@@ -94,7 +94,7 @@ Font::~Font()
unloadVolatile();
}
bool Font::initializeTexture(GLint format)
bool Font::initializeTexture(GLenum format)
{
GLint internalformat = (format == GL_LUMINANCE_ALPHA) ? GL_LUMINANCE8_ALPHA8 : GL_RGBA8;
@@ -130,7 +130,7 @@ void Font::createTexture()
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
GLint format = (type == FONT_TRUETYPE ? GL_LUMINANCE_ALPHA : GL_RGBA);
GLenum format = (type == FONT_TRUETYPE ? GL_LUMINANCE_ALPHA : GL_RGBA);
// Initialize the texture, attempting smaller sizes if initialization fails.
bool initialized = false;
+1 -1
View File
@@ -177,7 +177,7 @@ private:
};
};
bool initializeTexture(GLint format);
bool initializeTexture(GLenum format);
void createTexture();
Glyph *addGlyph(uint32 glyph);
Glyph *findGlyph(uint32 glyph);
+1 -1
View File
@@ -90,7 +90,7 @@ void OpenGL::initContext()
GLenum curgltextureunit;
glGetIntegerv(GL_ACTIVE_TEXTURE, (GLint *) &curgltextureunit);
state.curTextureUnit = curgltextureunit - GL_TEXTURE0;
state.curTextureUnit = (int) curgltextureunit - GL_TEXTURE0;
// Retrieve currently bound textures for each texture unit.
for (size_t i = 0; i < state.textureUnits.size(); i++)
+6 -6
View File
@@ -160,7 +160,7 @@ void *VBO::map()
if (is_dirty)
{
glGetBufferSubDataARB(getTarget(), 0, getSize(), memory_map);
glGetBufferSubDataARB(getTarget(), 0, (GLsizeiptr) getSize(), memory_map);
is_dirty = false;
}
@@ -184,8 +184,8 @@ void VBO::unmap()
// "orphan" current buffer to avoid implicit synchronisation on the GPU:
// http://www.seas.upenn.edu/~pcozzi/OpenGLInsights/OpenGLInsights-AsynchronousBufferTransfers.pdf
glBufferDataARB(getTarget(), getSize(), NULL, getUsage());
glBufferDataARB(getTarget(), getSize(), memory_map, getUsage());
glBufferDataARB(getTarget(), (GLsizeiptr) getSize(), NULL, getUsage());
glBufferDataARB(getTarget(), (GLsizeiptr) getSize(), memory_map, getUsage());
is_mapped = false;
}
@@ -225,7 +225,7 @@ void VBO::fill(size_t offset, size_t size, const void *data)
// Now we tell the driver it only needs to deal with the data
// we changed.
memcpy(static_cast<char *>(mapdata) + offset, data, size);
glFlushMappedBufferRangeAPPLE(getTarget(), offset, size);
glFlushMappedBufferRangeAPPLE(getTarget(), (GLintptr) offset, (GLsizei) size);
}
glUnmapBufferARB(getTarget());
@@ -233,7 +233,7 @@ void VBO::fill(size_t offset, size_t size, const void *data)
else
{
// Fall back to a possibly slower SubData (more chance of syncing.)
glBufferSubDataARB(getTarget(), offset, size, data);
glBufferSubDataARB(getTarget(), (GLintptr) offset, (GLsizeiptr) size, data);
}
if (getMemoryBacking() != BACKING_FULL)
@@ -275,7 +275,7 @@ bool VBO::load(bool restore)
glBufferParameteriAPPLE(getTarget(), GL_BUFFER_FLUSHING_UNMAP_APPLE, GL_FALSE);
// Note that if 'src' is '0', no data will be copied.
glBufferDataARB(getTarget(), getSize(), src, getUsage());
glBufferDataARB(getTarget(), (GLsizeiptr) getSize(), src, getUsage());
GLenum err = glGetError();
return (GL_NO_ERROR == err);