Mercurial > sdl-ios-xcode
diff src/video/windows/SDL_d3drender.c @ 5145:c8e049de174c
Making the API simpler, the renderer present semantics are always having a backbuffer and then discarding it. This is best for hardware accelerated rendering.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 01 Feb 2011 12:19:46 -0800 |
parents | 31e7f523ab3d |
children | 5429daf5e3f9 |
line wrap: on
line diff
--- a/src/video/windows/SDL_d3drender.c Mon Jan 31 23:37:30 2011 -0800 +++ b/src/video/windows/SDL_d3drender.c Tue Feb 01 12:19:46 2011 -0800 @@ -134,10 +134,7 @@ D3D_CreateRenderer, { "d3d", - (SDL_RENDERER_SINGLEBUFFER | SDL_RENDERER_PRESENTCOPY | - SDL_RENDERER_PRESENTFLIP2 | SDL_RENDERER_PRESENTFLIP3 | - SDL_RENDERER_PRESENTDISCARD | SDL_RENDERER_PRESENTVSYNC | - SDL_RENDERER_ACCELERATED), + (SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_ACCELERATED), 0, {0}, 0, @@ -472,19 +469,9 @@ } else { pparams.BackBufferFormat = D3DFMT_UNKNOWN; } - if (flags & SDL_RENDERER_PRESENTFLIP2) { - pparams.BackBufferCount = 2; - pparams.SwapEffect = D3DSWAPEFFECT_FLIP; - } else if (flags & SDL_RENDERER_PRESENTFLIP3) { - pparams.BackBufferCount = 3; - pparams.SwapEffect = D3DSWAPEFFECT_FLIP; - } else if (flags & SDL_RENDERER_PRESENTCOPY) { - pparams.BackBufferCount = 1; - pparams.SwapEffect = D3DSWAPEFFECT_COPY; - } else { - pparams.BackBufferCount = 1; - pparams.SwapEffect = D3DSWAPEFFECT_DISCARD; - } + pparams.BackBufferCount = 1; + pparams.SwapEffect = D3DSWAPEFFECT_DISCARD; + if (window->flags & SDL_WINDOW_FULLSCREEN) { pparams.Windowed = FALSE; pparams.FullScreen_RefreshRateInHz = @@ -534,24 +521,6 @@ return NULL; } IDirect3DSwapChain9_Release(chain); - switch (pparams.SwapEffect) { - case D3DSWAPEFFECT_COPY: - renderer->info.flags |= SDL_RENDERER_PRESENTCOPY; - break; - case D3DSWAPEFFECT_FLIP: - switch (pparams.BackBufferCount) { - case 2: - renderer->info.flags |= SDL_RENDERER_PRESENTFLIP2; - break; - case 3: - renderer->info.flags |= SDL_RENDERER_PRESENTFLIP3; - break; - } - break; - case D3DSWAPEFFECT_DISCARD: - renderer->info.flags |= SDL_RENDERER_PRESENTDISCARD; - break; - } if (pparams.PresentationInterval == D3DPRESENT_INTERVAL_ONE) { renderer->info.flags |= SDL_RENDERER_PRESENTVSYNC; }