wined3d: Make the offscreen render mode a registry setting.
This commit is contained in:
parent
44f4e254a6
commit
ad4c2bdb69
|
@ -71,9 +71,6 @@ inline static Display *get_display( HDC hdc )
|
|||
return display;
|
||||
}
|
||||
|
||||
/* TODO: setup some flags in the regestry to enable, disable pbuffer support */
|
||||
/* enable pbuffer support for offscreen textures */
|
||||
BOOL pbuffer_support = FALSE;
|
||||
/* allocate one pbuffer per surface */
|
||||
BOOL pbuffer_per_surface = FALSE;
|
||||
|
||||
|
@ -7414,7 +7411,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_ActiveRender(IWineD3DDevice* iface,
|
|||
|
||||
/* Offscreen rendering: PBuffers (currently disabled).
|
||||
* Also note that this path is never reached if FBOs are supported */
|
||||
} else if (pbuffer_support &&
|
||||
} else if (wined3d_settings.offscreen_rendering_mode == ORM_PBUFFER &&
|
||||
(cfgs = device_find_fbconfigs(This, implicitSwapchainImpl, RenderSurface)) != NULL) {
|
||||
|
||||
/** ********************************************************************
|
||||
|
|
|
@ -41,6 +41,7 @@ wined3d_settings_t wined3d_settings =
|
|||
VBO_HW, /* Hardware by default */
|
||||
FALSE, /* Use of GLSL disabled by default */
|
||||
NP2_NATIVE, /* Use native NPOT textures, when available */
|
||||
ORM_BACKBUFFER, /* Use the backbuffer to do offscreen rendering */
|
||||
RTL_AUTO, /* Automatically determine best locking method */
|
||||
64*1024*1024 /* 64MB texture memory by default */
|
||||
};
|
||||
|
@ -202,6 +203,19 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
|
|||
}
|
||||
/* There will be a couple of other choices for nonpow2, they are: TextureRecrangle and OpenGL 2 */
|
||||
}
|
||||
if ( !get_config_key( hkey, appkey, "OffscreenRenderingMode", buffer, size) )
|
||||
{
|
||||
if (!strcmp(buffer,"backbuffer"))
|
||||
{
|
||||
TRACE("Using the backbuffer for offscreen rendering\n");
|
||||
wined3d_settings.offscreen_rendering_mode = ORM_BACKBUFFER;
|
||||
}
|
||||
else if (!strcmp(buffer,"pbuffer"))
|
||||
{
|
||||
TRACE("Using PBuffers for offscreen rendering\n");
|
||||
wined3d_settings.offscreen_rendering_mode = ORM_PBUFFER;
|
||||
}
|
||||
}
|
||||
if ( !get_config_key( hkey, appkey, "RenderTargetLockMode", buffer, size) )
|
||||
{
|
||||
if (!strcmp(buffer,"disabled"))
|
||||
|
|
|
@ -135,6 +135,9 @@ static WINED3DGLTYPE const glTypeLookup[WINED3DDECLTYPE_UNUSED] = {
|
|||
#define NP2_REPACK 1
|
||||
#define NP2_NATIVE 2
|
||||
|
||||
#define ORM_BACKBUFFER 0
|
||||
#define ORM_PBUFFER 1
|
||||
|
||||
#define SHADER_SW 0
|
||||
#define SHADER_ARB 1
|
||||
#define SHADER_GLSL 2
|
||||
|
@ -160,6 +163,7 @@ typedef struct wined3d_settings_s {
|
|||
BOOL glslRequested;
|
||||
/* nonpower 2 function */
|
||||
int nonpower2_mode;
|
||||
int offscreen_rendering_mode;
|
||||
int rendertargetlock_mode;
|
||||
/* Memory tracking and object counting */
|
||||
unsigned int emulated_textureram;
|
||||
|
|
Loading…
Reference in New Issue