diff options
| author | Ryan Houdek <Sonicadvance1@gmail.com> | 2011-08-25 04:28:29 -0500 |
|---|---|---|
| committer | Ryan Houdek <Sonicadvance1@gmail.com> | 2011-08-25 04:28:29 -0500 |
| commit | d021f9e3b65f507273d0a9b8bea2db46db9f062c (patch) | |
| tree | 15b51ee293d4f9cb53971e339981949c31d91116 /Source/Plugins/Plugin_VideoOGL/Src/TextureCache.cpp | |
| parent | 12a8f590f8f1300780ca2e8e3e46316a3cb4321b (diff) | |
Here we go with the texture cache
Diffstat (limited to 'Source/Plugins/Plugin_VideoOGL/Src/TextureCache.cpp')
| -rw-r--r-- | Source/Plugins/Plugin_VideoOGL/Src/TextureCache.cpp | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/TextureCache.cpp b/Source/Plugins/Plugin_VideoOGL/Src/TextureCache.cpp index 4a9431a563..55e20c0b05 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/TextureCache.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/TextureCache.cpp @@ -302,12 +302,24 @@ void TextureCache::TCacheEntry::FromRenderTarget(u32 dstAddr, unsigned int dstFo TargetRectangle targetSource = g_renderer->ConvertEFBRectangle(srcRect); - glBegin(GL_QUADS); - glTexCoord2f((GLfloat)targetSource.left, (GLfloat)targetSource.bottom); glVertex2f(-1, 1); - glTexCoord2f((GLfloat)targetSource.left, (GLfloat)targetSource.top ); glVertex2f(-1, -1); - glTexCoord2f((GLfloat)targetSource.right, (GLfloat)targetSource.top ); glVertex2f( 1, -1); - glTexCoord2f((GLfloat)targetSource.right, (GLfloat)targetSource.bottom); glVertex2f( 1, 1); - glEnd(); + GL_REPORT_ERRORD(); + + GLfloat tex1[] = { + (GLfloat)targetSource.left, (GLfloat)targetSource.bottom, + (GLfloat)targetSource.left, (GLfloat)targetSource.top, + (GLfloat)targetSource.right, (GLfloat)targetSource.top, + (GLfloat)targetSource.right, (GLfloat)targetSource.bottom + }; + GLfloat vtx1[] = { + -1, 1, 1, + -1, -1, 1, + 1, -1, 1, + 1, 1, 1 + }; + glTexCoordPointer(2, GL_FLOAT, 0, tex1); + glVertexPointer(3, GL_FLOAT, 0, vtx1); + glDrawArrays(GL_TRIANGLE_FAN, 0, 4); + GL_REPORT_ERRORD(); |
