diff options
| author | Pierre Bourdon <delroth@gmail.com> | 2014-03-10 23:40:16 +0100 |
|---|---|---|
| committer | Pierre Bourdon <delroth@gmail.com> | 2014-03-10 23:40:16 +0100 |
| commit | ede46556d9b5043113e19359fee97eb09f9c872c (patch) | |
| tree | 54442e504fc06d44e80a7351be46a1fead5ad356 /Source/Core/VideoBackends/OGL/TextureCache.cpp | |
| parent | 52ed10213d085caec6007ae3b3856e50f282c756 (diff) | |
| parent | 31cfc73a09a8685cbab20502b4bc132e98e2feb5 (diff) | |
Merge pull request #155 from Parlane/codestyle_fixes
Fixes spacing for "for", "while", "switch" and "if"
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); } |
