mirror of
https://git.rip/DMCA_FUCKER/re3.git
synced 2024-10-31 23:05:55 +00:00
Make texture conversion work a bit faster
This commit is contained in:
parent
18d0fd2e48
commit
ad48b9cde0
|
@ -233,6 +233,7 @@ enum Config {
|
||||||
#define PS2_ALPHA_TEST // emulate ps2 alpha test
|
#define PS2_ALPHA_TEST // emulate ps2 alpha test
|
||||||
#define IMPROVED_VIDEOMODE // save and load videomode parameters instead of a magic number
|
#define IMPROVED_VIDEOMODE // save and load videomode parameters instead of a magic number
|
||||||
#define DISABLE_LOADING_SCREEN // disable the loading screen which vastly improves the loading time
|
#define DISABLE_LOADING_SCREEN // disable the loading screen which vastly improves the loading time
|
||||||
|
#define DISABLE_VSYNC_ON_TEXTURE_CONVERSION // make texture conversion work faster by disabling vsync
|
||||||
//#define USE_TEXTURE_POOL
|
//#define USE_TEXTURE_POOL
|
||||||
#ifdef LIBRW
|
#ifdef LIBRW
|
||||||
//#define EXTENDED_COLOURFILTER // more options for colour filter (replaces mblur)
|
//#define EXTENDED_COLOURFILTER // more options for colour filter (replaces mblur)
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
#include "Sprite2d.h"
|
#include "Sprite2d.h"
|
||||||
#include "Text.h"
|
#include "Text.h"
|
||||||
#include "RwHelper.h"
|
#include "RwHelper.h"
|
||||||
|
#include "Frontend.h"
|
||||||
#endif //GTA_PC
|
#endif //GTA_PC
|
||||||
|
|
||||||
float texLoadTime;
|
float texLoadTime;
|
||||||
|
@ -357,6 +358,15 @@ CreateTxdImageForVideoCard()
|
||||||
// so let's hope that is the case for all
|
// so let's hope that is the case for all
|
||||||
rw::gl3::needToReadBackTextures = true;
|
rw::gl3::needToReadBackTextures = true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef DISABLE_VSYNC_ON_TEXTURE_CONVERSION
|
||||||
|
// let's disable vsync and frame limiter to speed up texture conversion
|
||||||
|
// (actually we probably don't need to disable frame limiter in here, but let's do it just in case =P)
|
||||||
|
int8 vsyncState = CMenuManager::m_PrefsVsync;
|
||||||
|
int8 frameLimiterState = CMenuManager::m_PrefsFrameLimiter;
|
||||||
|
CMenuManager::m_PrefsVsync = 0;
|
||||||
|
CMenuManager::m_PrefsFrameLimiter = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
int32 i;
|
int32 i;
|
||||||
for (i = 0; i < TXDSTORESIZE; i++) {
|
for (i = 0; i < TXDSTORESIZE; i++) {
|
||||||
|
@ -411,6 +421,12 @@ CreateTxdImageForVideoCard()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef DISABLE_VSYNC_ON_TEXTURE_CONVERSION
|
||||||
|
// restore vsync and frame limiter states
|
||||||
|
CMenuManager::m_PrefsVsync = vsyncState;
|
||||||
|
CMenuManager::m_PrefsFrameLimiter = frameLimiterState;
|
||||||
|
#endif
|
||||||
|
|
||||||
RwStreamClose(img, nil);
|
RwStreamClose(img, nil);
|
||||||
delete []buf;
|
delete []buf;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue