diff options
-rw-r--r-- | src/core/config.h | 2 | ||||
-rw-r--r-- | src/fakerw/fake.cpp | 3 | ||||
-rw-r--r-- | src/fakerw/rwcore.h | 2 | ||||
-rw-r--r-- | src/rw/TexRead.cpp | 16 | ||||
-rw-r--r-- | src/skel/glfw/glfw.cpp | 5 | ||||
m--------- | vendor/librw | 0 |
6 files changed, 26 insertions, 2 deletions
diff --git a/src/core/config.h b/src/core/config.h index 6433a258..99c5f6ef 100644 --- a/src/core/config.h +++ b/src/core/config.h @@ -233,6 +233,7 @@ enum Config { #define PS2_ALPHA_TEST // emulate ps2 alpha test #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_VSYNC_ON_TEXTURE_CONVERSION // make texture conversion work faster by disabling vsync //#define USE_TEXTURE_POOL #ifdef LIBRW //#define EXTENDED_COLOURFILTER // more options for colour filter (replaces mblur) @@ -353,5 +354,4 @@ enum Config { #ifdef LIBRW // these are not supported with librw yet -# undef MULTISAMPLING #endif diff --git a/src/fakerw/fake.cpp b/src/fakerw/fake.cpp index 39606335..2e04aed2 100644 --- a/src/fakerw/fake.cpp +++ b/src/fakerw/fake.cpp @@ -601,6 +601,9 @@ void RwD3D8EngineSetRefreshRate(RwUInt32 refreshRate) {} RwBool RwD3D8DeviceSupportsDXTTexture(void) { return true; } +void RwD3D8EngineSetMultiSamplingLevels(RwUInt32 level) { Engine::setMultiSamplingLevels(level); } +RwUInt32 RwD3D8EngineGetMaxMultiSamplingLevels(void) { return Engine::getMaxMultiSamplingLevels(); } + RpMaterial *RpMaterialCreate(void) { return Material::create(); } RwBool RpMaterialDestroy(RpMaterial *material) { material->destroy(); return true; } diff --git a/src/fakerw/rwcore.h b/src/fakerw/rwcore.h index 31bc5541..e5d21865 100644 --- a/src/fakerw/rwcore.h +++ b/src/fakerw/rwcore.h @@ -411,3 +411,5 @@ RwFrame *RwCameraGetFrame(const RwCamera *camera); void RwD3D8EngineSetRefreshRate(RwUInt32 refreshRate); RwBool RwD3D8DeviceSupportsDXTTexture(void); +void RwD3D8EngineSetMultiSamplingLevels(RwUInt32 level); +RwUInt32 RwD3D8EngineGetMaxMultiSamplingLevels(void); diff --git a/src/rw/TexRead.cpp b/src/rw/TexRead.cpp index 72d2ae17..7403ae1d 100644 --- a/src/rw/TexRead.cpp +++ b/src/rw/TexRead.cpp @@ -18,6 +18,7 @@ #include "Sprite2d.h" #include "Text.h" #include "RwHelper.h" +#include "Frontend.h" #endif //GTA_PC float texLoadTime; @@ -357,6 +358,15 @@ CreateTxdImageForVideoCard() // so let's hope that is the case for all rw::gl3::needToReadBackTextures = true; #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; 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); delete []buf; diff --git a/src/skel/glfw/glfw.cpp b/src/skel/glfw/glfw.cpp index 0bde1282..56877d37 100644 --- a/src/skel/glfw/glfw.cpp +++ b/src/skel/glfw/glfw.cpp @@ -833,7 +833,10 @@ psSelectDevice() PSGLOBAL(fullScreen) = !FrontEndMenuManager.m_nPrefsWindowed; #endif - + +#ifdef MULTISAMPLING + RwD3D8EngineSetMultiSamplingLevels(1 << FrontEndMenuManager.m_nPrefsMSAALevel); +#endif return TRUE; } diff --git a/vendor/librw b/vendor/librw -Subproject e8990d5b3d50be72594f93dcc42d749f2976151 +Subproject 2066cf6634383e056cd5dda105e87f8da04b1ed |