summaryrefslogtreecommitdiff
path: root/indra/llrender/llrendertarget.cpp
diff options
context:
space:
mode:
authorAnsariel <ansariel.hiller@phoenixviewer.com>2024-06-01 15:49:26 +0200
committerAnsariel <ansariel.hiller@phoenixviewer.com>2024-06-01 15:49:26 +0200
commitb42f9d836b4c0f7fbd4bdae1734021e2a09fdbe8 (patch)
treed73404c2fbacce379a57e2d03a6cd54558590859 /indra/llrender/llrendertarget.cpp
parentcb3bd8865aa0f9fb8a247ea595cf1973057ba91f (diff)
Re-enable a lot of compiler warnings for MSVC and address the C4267 "possible loss of precision" warnings
Diffstat (limited to 'indra/llrender/llrendertarget.cpp')
-rw-r--r--indra/llrender/llrendertarget.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/indra/llrender/llrendertarget.cpp b/indra/llrender/llrendertarget.cpp
index 8c05a47c39..bd64ba84fb 100644
--- a/indra/llrender/llrendertarget.cpp
+++ b/indra/llrender/llrendertarget.cpp
@@ -208,7 +208,7 @@ bool LLRenderTarget::addColorAttachment(U32 color_fmt)
return true;
}
- U32 offset = mTex.size();
+ U32 offset = static_cast<U32>(mTex.size());
if( offset >= 4 )
{
@@ -378,11 +378,11 @@ void LLRenderTarget::release()
if (mFBO && (mTex.size() > 1))
{
glBindFramebuffer(GL_FRAMEBUFFER, mFBO);
- S32 z;
+ size_t z;
for (z = mTex.size() - 1; z >= 1; z--)
{
sBytesAllocated -= mResX*mResY*4;
- glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0+z, LLTexUnit::getInternalType(mUsage), 0, 0);
+ glFramebufferTexture2D(GL_FRAMEBUFFER, static_cast<GLenum>(GL_COLOR_ATTACHMENT0+z), LLTexUnit::getInternalType(mUsage), 0, 0);
LLImageGL::deleteTextures(1, &mTex[z]);
}
glBindFramebuffer(GL_FRAMEBUFFER, sCurFBO);
@@ -426,7 +426,7 @@ void LLRenderTarget::bindTarget()
GL_COLOR_ATTACHMENT1,
GL_COLOR_ATTACHMENT2,
GL_COLOR_ATTACHMENT3};
- glDrawBuffers(mTex.size(), drawbuffers);
+ glDrawBuffers(static_cast<GLsizei>(mTex.size()), drawbuffers);
if (mTex.empty())
{ //no color buffer to draw to
@@ -485,7 +485,7 @@ U32 LLRenderTarget::getTexture(U32 attachment) const
U32 LLRenderTarget::getNumTextures() const
{
- return mTex.size();
+ return static_cast<U32>(mTex.size());
}
void LLRenderTarget::bindTexture(U32 index, S32 channel, LLTexUnit::eTextureFilterOptions filter_options)