diff options
| author | Matthew Parlane <parlane@gmail.com> | 2014-03-11 00:30:55 +1300 |
|---|---|---|
| committer | Matthew Parlane <parlane@gmail.com> | 2014-03-11 00:35:07 +1300 |
| commit | 31cfc73a09a8685cbab20502b4bc132e98e2feb5 (patch) | |
| tree | c7eb3a0906bab0eb711bd7c79166c96fe97ec488 /Source/Core/VideoBackends/OGL/TextureCache.cpp | |
| parent | 4591464486d696a300cc914f6c2a3cce8af2d666 (diff) | |
Fixes spacing for "for", "while", "switch" and "if"
Also moved && and || to ends of lines instead of start.
Fixed misc vertical alignments and some { needed newlining.
Diffstat (limited to 'Source/Core/VideoBackends/OGL/TextureCache.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/OGL/TextureCache.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/Source/Core/VideoBackends/OGL/TextureCache.cpp b/Source/Core/VideoBackends/OGL/TextureCache.cpp index 9262f9f4d1..6a20813e80 100644 --- a/Source/Core/VideoBackends/OGL/TextureCache.cpp +++ b/Source/Core/VideoBackends/OGL/TextureCache.cpp @@ -84,8 +84,8 @@ TextureCache::TCacheEntry::~TCacheEntry() { if (texture) { - for(auto& gtex : s_Textures) - if(gtex == texture) + for (auto& gtex : s_Textures) + if (gtex == texture) gtex = 0; glDeleteTextures(1, &texture); texture = 0; @@ -282,14 +282,17 @@ void TextureCache::TCacheEntry::FromRenderTarget(u32 dstAddr, unsigned int dstFo glViewport(0, 0, virtual_width, virtual_height); - if(srcFormat == PIXELFMT_Z24) { + if (srcFormat == PIXELFMT_Z24) + { s_DepthMatrixProgram.Bind(); - if(s_DepthCbufid != cbufid) + if (s_DepthCbufid != cbufid) glUniform4fv(s_DepthMatrixUniform, 5, colmat); s_DepthCbufid = cbufid; - } else { + } + else + { s_ColorMatrixProgram.Bind(); - if(s_ColorCbufid != cbufid) + if (s_ColorCbufid != cbufid) glUniform4fv(s_ColorMatrixUniform, 7, colmat); s_ColorCbufid = cbufid; } @@ -391,7 +394,7 @@ TextureCache::TextureCache() s_DepthCopyPositionUniform = glGetUniformLocation(s_DepthMatrixProgram.glprogid, "copy_position"); s_ActiveTexture = -1; - for(auto& gtex : s_Textures) + for (auto& gtex : s_Textures) gtex = -1; } @@ -409,7 +412,7 @@ void TextureCache::DisableStage(unsigned int stage) void TextureCache::SetStage () { // -1 is the initial value as we don't know which testure should be bound - if(s_ActiveTexture != (u32)-1) + if (s_ActiveTexture != (u32)-1) glActiveTexture(GL_TEXTURE0 + s_ActiveTexture); } |
