diff options
| author | donkopunchstania <donkopunchstania@gmail.com> | 2009-05-15 02:39:55 +0000 |
|---|---|---|
| committer | donkopunchstania <donkopunchstania@gmail.com> | 2009-05-15 02:39:55 +0000 |
| commit | 14a67bc8bc5d663b5cd2d1d324d76444be3602d7 (patch) | |
| tree | 19511fe94b78527c1b35317821fedc4229c860ea /Source/Plugins/Plugin_VideoOGL/Src/TextureConverter.cpp | |
| parent | 034e3c72a22601e2bfe2d43f72d2a16c8f2c6e96 (diff) | |
Changing where depth is read. Trying to use the same depth buffer GL uses when copying depth to a texture. This eliminates some quirky code and gets depth copies working in AA, but may not work on older graphics cards.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3234 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Plugins/Plugin_VideoOGL/Src/TextureConverter.cpp')
| -rw-r--r-- | Source/Plugins/Plugin_VideoOGL/Src/TextureConverter.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/TextureConverter.cpp b/Source/Plugins/Plugin_VideoOGL/Src/TextureConverter.cpp index 5a70a0088a..b6b51b2321 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/TextureConverter.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/TextureConverter.cpp @@ -160,8 +160,6 @@ void Shutdown() void EncodeToRamUsingShader(FRAGMENTSHADER& shader, GLuint srcTexture, const TRectangle& sourceRc, u8* destAddr, int dstWidth, int dstHeight, bool linearFilter) { - Renderer::SetRenderMode(Renderer::RM_Normal); - Renderer::ResetGLState(); // switch to texture converter frame buffer @@ -243,7 +241,7 @@ void EncodeToRam(u32 address, bool bFromZBuffer, bool bIsIntensityFmt, u32 copyf u8 *dest_ptr = Memory_GetPtr(address); - u32 source_texture = bFromZBuffer ? Renderer::ResolveAndGetFakeZTarget(source) : Renderer::ResolveAndGetRenderTarget(source); + u32 source_texture = bFromZBuffer ? Renderer::ResolveAndGetDepthTarget(source) : Renderer::ResolveAndGetRenderTarget(source); int width = source.right - source.left; int height = source.bottom - source.top; @@ -288,9 +286,6 @@ void EncodeToRam(u32 address, bool bFromZBuffer, bool bIsIntensityFmt, u32 copyf scaledSource.right = expandedWidth / samples; EncodeToRamUsingShader(texconv_shader, source_texture, scaledSource, dest_ptr, expandedWidth / samples, expandedHeight, bScaleByHalf); - - if (bFromZBuffer) - Renderer::SetZBufferRender(); // notify for future settings } void EncodeToRamYUYV(GLuint srcTexture, const TRectangle& sourceRc, @@ -303,7 +298,6 @@ void EncodeToRamYUYV(GLuint srcTexture, const TRectangle& sourceRc, // Should be scale free. void DecodeToTexture(u8* srcAddr, int srcWidth, int srcHeight, GLuint destTexture) { - Renderer::SetRenderMode(Renderer::RM_Normal); Renderer::ResetGLState(); float srcFormatFactor = 0.5f; |
