Cocoa Port:
- Add support for automatic texture upscaling and deposterization. (Related to r5384.)
This commit is contained in:
parent
485e2cc254
commit
a213a7aba7
|
@ -720,6 +720,10 @@
|
|||
<integer>1</integer>
|
||||
<key>Render3D_Textures</key>
|
||||
<true/>
|
||||
<key>Render3D_TextureDeposterize</key>
|
||||
<false/>
|
||||
<key>Render3D_TextureScalingFactor</key>
|
||||
<integer>1</integer>
|
||||
<key>Render3D_Threads</key>
|
||||
<integer>0</integer>
|
||||
<key>RomInfoPanel_SectionViewState</key>
|
||||
|
|
|
@ -61,6 +61,8 @@ class GPUEventHandlerOSX;
|
|||
@property (assign) NSUInteger render3DThreads;
|
||||
@property (assign) BOOL render3DLineHack;
|
||||
@property (assign) BOOL render3DMultisample;
|
||||
@property (assign) BOOL render3DTextureDeposterize;
|
||||
@property (assign) NSUInteger render3DTextureScalingFactor;
|
||||
@property (assign) BOOL render3DFragmentSamplingHack;
|
||||
|
||||
- (void) setOutputList:(NSMutableArray *)theOutputList mutexPtr:(pthread_mutex_t *)theMutex;
|
||||
|
|
|
@ -103,6 +103,8 @@ public:
|
|||
@dynamic render3DThreads;
|
||||
@dynamic render3DLineHack;
|
||||
@dynamic render3DMultisample;
|
||||
@dynamic render3DTextureDeposterize;
|
||||
@dynamic render3DTextureScalingFactor;
|
||||
@dynamic render3DFragmentSamplingHack;
|
||||
|
||||
|
||||
|
@ -411,6 +413,55 @@ public:
|
|||
return state;
|
||||
}
|
||||
|
||||
- (void) setRender3DTextureDeposterize:(BOOL)state
|
||||
{
|
||||
gpuEvent->Render3DLock();
|
||||
CommonSettings.GFX3D_Renderer_TextureDeposterize = state ? true : false;
|
||||
gpuEvent->Render3DUnlock();
|
||||
}
|
||||
|
||||
- (BOOL) render3DTextureDeposterize
|
||||
{
|
||||
gpuEvent->Render3DLock();
|
||||
const BOOL state = CommonSettings.GFX3D_Renderer_TextureDeposterize ? YES : NO;
|
||||
gpuEvent->Render3DUnlock();
|
||||
|
||||
return state;
|
||||
}
|
||||
|
||||
- (void) setRender3DTextureScalingFactor:(NSUInteger)scalingFactor
|
||||
{
|
||||
int newScalingFactor = (int)scalingFactor;
|
||||
|
||||
if (scalingFactor < 1)
|
||||
{
|
||||
newScalingFactor = 1;
|
||||
}
|
||||
else if (scalingFactor > 4)
|
||||
{
|
||||
newScalingFactor = 4;
|
||||
}
|
||||
|
||||
gpuEvent->Render3DLock();
|
||||
|
||||
if (newScalingFactor == 3)
|
||||
{
|
||||
newScalingFactor = (newScalingFactor < CommonSettings.GFX3D_Renderer_TextureScalingFactor) ? 2 : 4;
|
||||
}
|
||||
|
||||
CommonSettings.GFX3D_Renderer_TextureScalingFactor = newScalingFactor;
|
||||
gpuEvent->Render3DUnlock();
|
||||
}
|
||||
|
||||
- (NSUInteger) render3DTextureScalingFactor
|
||||
{
|
||||
gpuEvent->Render3DLock();
|
||||
const NSUInteger scalingFactor = (NSUInteger)CommonSettings.GFX3D_Renderer_TextureScalingFactor;
|
||||
gpuEvent->Render3DUnlock();
|
||||
|
||||
return scalingFactor;
|
||||
}
|
||||
|
||||
- (void) setRender3DFragmentSamplingHack:(BOOL)state
|
||||
{
|
||||
gpuEvent->Render3DLock();
|
||||
|
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
@ -952,6 +952,8 @@
|
|||
[[NSUserDefaults standardUserDefaults] setInteger:[[cdsCore cdsGPU] render3DThreads] forKey:@"Render3D_Threads"];
|
||||
[[NSUserDefaults standardUserDefaults] setBool:[[cdsCore cdsGPU] render3DLineHack] forKey:@"Render3D_LineHack"];
|
||||
[[NSUserDefaults standardUserDefaults] setBool:[[cdsCore cdsGPU] render3DMultisample] forKey:@"Render3D_Multisample"];
|
||||
[[NSUserDefaults standardUserDefaults] setBool:[[cdsCore cdsGPU] render3DTextureDeposterize] forKey:@"Render3D_TextureDeposterize"];
|
||||
[[NSUserDefaults standardUserDefaults] setInteger:[[cdsCore cdsGPU] render3DTextureScalingFactor] forKey:@"Render3D_TextureScalingFactor"];
|
||||
[[NSUserDefaults standardUserDefaults] setBool:[[cdsCore cdsGPU] render3DFragmentSamplingHack] forKey:@"Render3D_FragmentSamplingHack"];
|
||||
[[NSUserDefaults standardUserDefaults] setInteger:[[cdsCore cdsGPU] gpuScale] forKey:@"Render3D_ScalingFactor"];
|
||||
|
||||
|
@ -2203,6 +2205,8 @@
|
|||
[[cdsCore cdsGPU] setRender3DDepthComparisonThreshold:(NSUInteger)[[NSUserDefaults standardUserDefaults] integerForKey:@"Render3D_DepthComparisonThreshold"]];
|
||||
[[cdsCore cdsGPU] setRender3DLineHack:[[NSUserDefaults standardUserDefaults] boolForKey:@"Render3D_LineHack"]];
|
||||
[[cdsCore cdsGPU] setRender3DMultisample:[[NSUserDefaults standardUserDefaults] boolForKey:@"Render3D_Multisample"]];
|
||||
[[cdsCore cdsGPU] setRender3DTextureDeposterize:[[NSUserDefaults standardUserDefaults] boolForKey:@"Render3D_TextureDeposterize"]];
|
||||
[[cdsCore cdsGPU] setRender3DTextureScalingFactor:(NSUInteger)[[NSUserDefaults standardUserDefaults] integerForKey:@"Render3D_TextureScalingFactor"]];
|
||||
[[cdsCore cdsGPU] setRender3DFragmentSamplingHack:[[NSUserDefaults standardUserDefaults] boolForKey:@"Render3D_FragmentSamplingHack"]];
|
||||
[[cdsCore cdsGPU] setGpuScale:(NSUInteger)[[NSUserDefaults standardUserDefaults] integerForKey:@"Render3D_ScalingFactor"]];
|
||||
|
||||
|
|
Loading…
Reference in New Issue