mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-26 16:10:05 +00:00
Merge pull request #16 from Sethpaien/master
Update FlipFramebuffer - makes converting the raw framebuffer slightly faster
This commit is contained in:
commit
d4bf68b650
@ -58,15 +58,14 @@ void RendererOpenGL::SwapBuffers() {
|
|||||||
* @todo Early on hack... I'd like to find a more efficient way of doing this /bunnei
|
* @todo Early on hack... I'd like to find a more efficient way of doing this /bunnei
|
||||||
*/
|
*/
|
||||||
void RendererOpenGL::FlipFramebuffer(const u8* in, u8* out) {
|
void RendererOpenGL::FlipFramebuffer(const u8* in, u8* out) {
|
||||||
for (int y = 0; y < VideoCore::kScreenTopHeight; y++) {
|
int in_coord = 0;
|
||||||
for (int x = 0; x < VideoCore::kScreenTopWidth; x++) {
|
for (int x = 0; x < VideoCore::kScreenTopWidth; x++) {
|
||||||
int in_coord = (VideoCore::kScreenTopHeight * 3 * x) + (VideoCore::kScreenTopHeight * 3)
|
for (int y = VideoCore::kScreenTopHeight-1; y >= 0; y--) {
|
||||||
- (3 * y + 3);
|
int out_coord = (x + y * VideoCore::kScreenTopWidth) * 3;
|
||||||
int out_coord = (VideoCore::kScreenTopWidth * y * 3) + (x * 3);
|
out[out_coord] = in[in_coord];
|
||||||
|
|
||||||
out[out_coord + 0] = in[in_coord + 0];
|
|
||||||
out[out_coord + 1] = in[in_coord + 1];
|
out[out_coord + 1] = in[in_coord + 1];
|
||||||
out[out_coord + 2] = in[in_coord + 2];
|
out[out_coord + 2] = in[in_coord + 2];
|
||||||
|
in_coord+=3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user