diff --git a/Source/Plugins/Plugin_VideoOGL/Src/VertexLoader.cpp b/Source/Plugins/Plugin_VideoOGL/Src/VertexLoader.cpp index d665f25482..594d8b2b61 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/VertexLoader.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/VertexLoader.cpp @@ -305,20 +305,15 @@ void VertexLoader::ProcessFormat() //_assert_( VertexManager::s_pCurBufferPointer == s_pBaseBufferPointer ); - if (!m_AttrDirty) { - + if (!m_AttrDirty) + { if (m_VtxDesc.Hex0 == VertexManager::GetVtxDesc().Hex0 && (m_VtxDesc.Hex1&1)==(VertexManager::GetVtxDesc().Hex1&1)) - // same - return; - - m_VtxDesc.Hex = VertexManager::GetVtxDesc().Hex; + return; // same } - else { - // set anyway - m_VtxDesc.Hex = VertexManager::GetVtxDesc().Hex; + else m_AttrDirty = 0; - } - + + m_VtxDesc.Hex = VertexManager::GetVtxDesc().Hex; DVSTARTPROFILE(); // Reset pipeline @@ -1054,12 +1049,14 @@ void VertexManager::Flush() nonpow2tex |= 1<mode.wrap_s > 0 ) nonpow2tex |= 1<<(8+i); if( tentry->mode.wrap_t > 0 ) nonpow2tex |= 1<<(16+i); + TextureMngr::EnableTexRECT(i); } // if texture is power of two, set to ones (since don't need scaling) - else PixelShaderMngr::SetTexDims(i, tentry->w, tentry->h, 0, 0); - - if( tentry->isNonPow2 ) TextureMngr::EnableTexRECT(i); - else TextureMngr::EnableTex2D(i); + else + { + PixelShaderMngr::SetTexDims(i, tentry->w, tentry->h, 0, 0); + TextureMngr::EnableTex2D(i); + } if( g_Config.iLog & CONF_PRIMLOG ) { // save the textures diff --git a/Source/Plugins/Plugin_VideoOGL/Src/VertexShaderManager.cpp b/Source/Plugins/Plugin_VideoOGL/Src/VertexShaderManager.cpp index 069e753a9c..94182ca7a9 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/VertexShaderManager.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/VertexShaderManager.cpp @@ -324,7 +324,7 @@ void VertexShaderMngr::SetConstants(VERTEXSHADER& vs) INFO_LOG("view: topleft=(%f,%f), wh=(%f,%f), z=(%f,%f)\n",rawViewport[3]-rawViewport[0]-342,rawViewport[4]+rawViewport[1]-342, 2 * rawViewport[0], 2 * rawViewport[1], (rawViewport[5]-rawViewport[2])/16777215.0f, rawViewport[5]/16777215.0f); glViewport((int)(rawViewport[3]-rawViewport[0]-342) * MValueX,Renderer::GetTargetHeight()-((int)(rawViewport[4]-rawViewport[1]-342)) * MValueY, abs((int)(2 * rawViewport[0])) * MValueX, abs((int)(2 * rawViewport[1])) * MValueY); - glDepthRange((rawViewport[5]-rawViewport[2])/16777215.0f, rawViewport[5]/16777215.0f); + glDepthRange((rawViewport[5]-rawViewport[2])/-16777215.0f, rawViewport[5]/16777215.0f); } if (bProjectionChanged) {