diff options
| author | shuffle2 <godisgovernment@gmail.com> | 2014-08-20 10:57:31 -0700 |
|---|---|---|
| committer | shuffle2 <godisgovernment@gmail.com> | 2014-08-20 10:57:31 -0700 |
| commit | d29e3331426823b0dcd49a7436a4a8a6bdf60dcf (patch) | |
| tree | 84bbe066f736929fc1b4e381f3c719006070d409 /Source/Core/VideoBackends/OGL/TextureCache.cpp | |
| parent | a09cf1d8f1bdc58de56b8fbb2d2282b8e59d2e69 (diff) | |
| parent | a9c33075f2f2b8ca6ffb699308a282e385a726b9 (diff) | |
Merge pull request #833 from shuffle2/msvc-improvements
misc improvements for msvc build. -Werror for msvc!
Diffstat (limited to 'Source/Core/VideoBackends/OGL/TextureCache.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/OGL/TextureCache.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/Core/VideoBackends/OGL/TextureCache.cpp b/Source/Core/VideoBackends/OGL/TextureCache.cpp index 38cbcc388a..1526294916 100644 --- a/Source/Core/VideoBackends/OGL/TextureCache.cpp +++ b/Source/Core/VideoBackends/OGL/TextureCache.cpp @@ -274,12 +274,14 @@ void TextureCache::TCacheEntry::FromRenderTarget(u32 dstAddr, unsigned int dstFo glViewport(0, 0, virtual_width, virtual_height); + GLuint uniform_location; if (srcFormat == PEControl::Z24) { s_DepthMatrixProgram.Bind(); if (s_DepthCbufid != cbufid) glUniform4fv(s_DepthMatrixUniform, 5, colmat); s_DepthCbufid = cbufid; + uniform_location = s_DepthCopyPositionUniform; } else { @@ -287,11 +289,12 @@ void TextureCache::TCacheEntry::FromRenderTarget(u32 dstAddr, unsigned int dstFo if (s_ColorCbufid != cbufid) glUniform4fv(s_ColorMatrixUniform, 7, colmat); s_ColorCbufid = cbufid; + uniform_location = s_ColorCopyPositionUniform; } TargetRectangle R = g_renderer->ConvertEFBRectangle(srcRect); - glUniform4f(srcFormat == PEControl::Z24 ? s_DepthCopyPositionUniform : s_ColorCopyPositionUniform, - R.left, R.top, R.right, R.bottom); + glUniform4f(uniform_location, static_cast<float>(R.left), static_cast<float>(R.top), + static_cast<float>(R.right), static_cast<float>(R.bottom)); GL_REPORT_ERRORD(); glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); |
