mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 00:59:44 -06:00
Substantial XFB speedup. There's more to get though, for example by using a shader for color conversion instead - but i like having a fast CPU implementation too. Also adds some sanity checks. PAL games still have problems.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@885 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -126,6 +126,8 @@ namespace EmuWindow
|
||||
break;
|
||||
|
||||
case WM_CLOSE:
|
||||
ExitProcess(0);
|
||||
|
||||
//Core::SetState(Core::CORE_UNINITIALIZED);
|
||||
return 0;
|
||||
|
||||
|
@ -27,7 +27,9 @@
|
||||
|
||||
enum {
|
||||
XFB_WIDTH = 640,
|
||||
XFB_HEIGHT = 480,
|
||||
XFB_HEIGHT = 480, //480,
|
||||
XFB_BUF_HEIGHT = 538, //480,
|
||||
// TODO: figure out what to do with PAL
|
||||
};
|
||||
|
||||
static GLuint xfb_texture;
|
||||
@ -39,8 +41,8 @@ static GLuint s_xfbRenderBuffer = 0;
|
||||
void XFB_Init()
|
||||
{
|
||||
// used to render XFB
|
||||
xfb_buffer = new u8[XFB_WIDTH * XFB_HEIGHT * 4];
|
||||
memset(xfb_buffer, 0, XFB_WIDTH * XFB_HEIGHT * 4);
|
||||
xfb_buffer = new u8[XFB_WIDTH * XFB_BUF_HEIGHT * 4];
|
||||
memset(xfb_buffer, 0, XFB_WIDTH * XFB_BUF_HEIGHT * 4);
|
||||
glGenTextures(1, &xfb_texture);
|
||||
glBindTexture(GL_TEXTURE_RECTANGLE_ARB, xfb_texture);
|
||||
glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, 4, XFB_WIDTH, XFB_HEIGHT, 0, GL_BGRA, GL_UNSIGNED_BYTE, xfb_buffer);
|
||||
|
@ -37,6 +37,7 @@
|
||||
#include "PixelShaderManager.h"
|
||||
#include "VertexShaderManager.h"
|
||||
#include "XFB.h"
|
||||
#include "XFBConvert.h"
|
||||
|
||||
#include "VideoState.h"
|
||||
#include "Debugger/Debugger.h" // for the CDebugger class
|
||||
@ -182,6 +183,7 @@ void Video_Initialize(SVideoInitialize* _pVideoInitialize)
|
||||
frameCount = 0;
|
||||
g_VideoInitialize = *_pVideoInitialize;
|
||||
InitLUTs();
|
||||
InitXFBConvTables();
|
||||
g_Config.Load();
|
||||
|
||||
if (!OpenGL_Create(g_VideoInitialize, 640, 480)) { //640x480 will be the default if all else fails//
|
||||
|
Reference in New Issue
Block a user