summaryrefslogtreecommitdiffstats
path: root/tools/gfx/render-gl.cpp
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2018-09-17 09:18:57 -0400
committerGitHub <noreply@github.com>2018-09-17 09:18:57 -0400
commit24ad492a98dc99abfbf7523b50bbdb13274c097e (patch)
treea84e609f8bf2e5add2b5e009b42fa564149cefdd /tools/gfx/render-gl.cpp
parent3c505c22673701339d35eb2151f01c16eb3c78c3 (diff)
Hotfix/fixing warnings (#636)
* * Remove dispose from IRInst * Use MemoryArena instead of MemoryPool * Make all IRInst not require Dtor - by having ref counted array store ptrs that need freeing * Increase block size - typically compilation is 2Mb of IR space(!) * Fix issues around StringRepresentation::equal because null has special meaning. * Don't bother to construct as String to compare StringRepresentation, just used UnownedStringSlice. * Added fromLiteral support to UnownedStringSlice and use instead of strlen version. * Use more conventional way to test StringRepresentation against a String. * Fix gcc/clang template problem with cast. * Fix warnings.
Diffstat (limited to 'tools/gfx/render-gl.cpp')
-rw-r--r--tools/gfx/render-gl.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/gfx/render-gl.cpp b/tools/gfx/render-gl.cpp
index d77271702..879ff7a3c 100644
--- a/tools/gfx/render-gl.cpp
+++ b/tools/gfx/render-gl.cpp
@@ -490,7 +490,7 @@ void GLRenderer::flushStateForDraw()
for(Int ii = 0; ii < count; ++ii)
{
auto bufferImpl = descriptorSet->m_constantBuffers[ii];
- glBindBufferBase(GL_UNIFORM_BUFFER, ii, bufferImpl->m_handle);
+ glBindBufferBase(GL_UNIFORM_BUFFER, GLuint(ii), bufferImpl->m_handle);
}
}
@@ -511,10 +511,10 @@ void GLRenderer::flushStateForDraw()
auto textureViewImpl = descriptorSet->m_textures[ii];
auto samplerImpl = descriptorSet->m_samplers[ii];
- glActiveTexture(GL_TEXTURE0 + ii);
+ glActiveTexture(GLuint(GL_TEXTURE0 + ii));
glBindTexture(GL_TEXTURE_2D, textureViewImpl->m_textureID);
- glBindSampler(baseIndex + ii, samplerImpl->m_samplerID);
+ glBindSampler(GLuint(baseIndex + ii), samplerImpl->m_samplerID);
}
}
}
@@ -1059,10 +1059,10 @@ void GLRenderer::setScissorRects(UInt count, ScissorRect const* rects)
//
auto rect = rects[0];
glScissor(
- rect.minX,
- rect.minY,
- rect.maxX - rect.minX,
- rect.maxY - rect.minY);
+ GLint(rect.minX),
+ GLint(rect.minY),
+ GLsizei(rect.maxX - rect.minX),
+ GLsizei(rect.maxY - rect.minY));
glEnable(GL_SCISSOR_TEST);
}