Commit 5c645123 authored by hybrid's avatar hybrid

Change the swap effect to DISCARD for windowed applications in d3d drivers.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2025 dfc29bdd-3216-0410-991c-e03cc46cb475
parent c3cfdcfa
This diff is collapsed.
...@@ -130,7 +130,6 @@ void CD3D9Driver::createMaterialRenderers() ...@@ -130,7 +130,6 @@ void CD3D9Driver::createMaterialRenderers()
MaterialRenderers[EMT_TRANSPARENT_VERTEX_ALPHA].Renderer); MaterialRenderers[EMT_TRANSPARENT_VERTEX_ALPHA].Renderer);
renderer->drop(); renderer->drop();
// add parallax map renderers // add parallax map renderers
renderer = new CD3D9ParallaxMapRenderer(pID3DDevice, this, tmp, renderer = new CD3D9ParallaxMapRenderer(pID3DDevice, this, tmp,
...@@ -145,10 +144,8 @@ void CD3D9Driver::createMaterialRenderers() ...@@ -145,10 +144,8 @@ void CD3D9Driver::createMaterialRenderers()
MaterialRenderers[EMT_TRANSPARENT_VERTEX_ALPHA].Renderer); MaterialRenderers[EMT_TRANSPARENT_VERTEX_ALPHA].Renderer);
renderer->drop(); renderer->drop();
// add basic 1 texture blending // add basic 1 texture blending
addAndDropMaterialRenderer(new CD3D9MaterialRenderer_ONETEXTURE_BLEND(pID3DDevice, this)); addAndDropMaterialRenderer(new CD3D9MaterialRenderer_ONETEXTURE_BLEND(pID3DDevice, this));
} }
...@@ -251,7 +248,7 @@ bool CD3D9Driver::initDriver(const core::dimension2d<s32>& screenSize, ...@@ -251,7 +248,7 @@ bool CD3D9Driver::initDriver(const core::dimension2d<s32>& screenSize,
else else
{ {
present.BackBufferFormat = d3ddm.Format; present.BackBufferFormat = d3ddm.Format;
present.SwapEffect = D3DSWAPEFFECT_COPY; present.SwapEffect = D3DSWAPEFFECT_DISCARD;
present.Windowed = TRUE; present.Windowed = TRUE;
} }
...@@ -303,9 +300,9 @@ bool CD3D9Driver::initDriver(const core::dimension2d<s32>& screenSize, ...@@ -303,9 +300,9 @@ bool CD3D9Driver::initDriver(const core::dimension2d<s32>& screenSize,
D3DMULTISAMPLE_NONMASKABLE, &qualityLevels))) D3DMULTISAMPLE_NONMASKABLE, &qualityLevels)))
{ {
// enable non maskable multi sampling // enable non maskable multi sampling
present.SwapEffect = D3DSWAPEFFECT_DISCARD;
present.MultiSampleType = D3DMULTISAMPLE_NONMASKABLE; present.MultiSampleType = D3DMULTISAMPLE_NONMASKABLE;
present.MultiSampleQuality = qualityLevels-1; present.MultiSampleQuality = qualityLevels-1;
present.SwapEffect = D3DSWAPEFFECT_DISCARD;
} }
else else
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment