Tripple buff + Multisample
This commit is contained in:
parent
80d4d772cd
commit
5714bbf085
@ -56,10 +56,10 @@ LRESULT CALLBACK WndProc(HWND hWnd,
|
|||||||
LPARAM lParam);
|
LPARAM lParam);
|
||||||
|
|
||||||
|
|
||||||
int WINAPI WinMain(HINSTANCE hInstance, //Main windows function
|
int WINAPI WinMain(_In_ HINSTANCE hInstance, //Main windows function
|
||||||
HINSTANCE hPrevInstance,
|
_In_opt_ HINSTANCE hPrevInstance,
|
||||||
LPSTR lpCmdLine,
|
_In_ LPSTR lpCmdLine,
|
||||||
int nShowCmd)
|
_In_ int nShowCmd)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!InitializeWindow(hInstance, nShowCmd, Width, Height, true))
|
if (!InitializeWindow(hInstance, nShowCmd, Width, Height, true))
|
||||||
@ -138,7 +138,7 @@ bool InitializeWindow(HINSTANCE hInstance,
|
|||||||
hwnd = CreateWindowEx(
|
hwnd = CreateWindowEx(
|
||||||
NULL,
|
NULL,
|
||||||
WndClassName,
|
WndClassName,
|
||||||
L"Window Title",
|
L"Khaotic Engine",
|
||||||
WS_OVERLAPPEDWINDOW,
|
WS_OVERLAPPEDWINDOW,
|
||||||
CW_USEDEFAULT, CW_USEDEFAULT,
|
CW_USEDEFAULT, CW_USEDEFAULT,
|
||||||
width, height,
|
width, height,
|
||||||
@ -184,10 +184,10 @@ bool InitializeDirect3d11App(HINSTANCE hInstance)
|
|||||||
ZeroMemory(&swapChainDesc, sizeof(DXGI_SWAP_CHAIN_DESC));
|
ZeroMemory(&swapChainDesc, sizeof(DXGI_SWAP_CHAIN_DESC));
|
||||||
|
|
||||||
swapChainDesc.BufferDesc = bufferDesc;
|
swapChainDesc.BufferDesc = bufferDesc;
|
||||||
swapChainDesc.SampleDesc.Count = 1;
|
swapChainDesc.SampleDesc.Count = 4; //multisampling standard
|
||||||
swapChainDesc.SampleDesc.Quality = 0;
|
swapChainDesc.SampleDesc.Quality = D3D11_STANDARD_MULTISAMPLE_PATTERN;
|
||||||
swapChainDesc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
|
swapChainDesc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
|
||||||
swapChainDesc.BufferCount = 1;
|
swapChainDesc.BufferCount = 2; // triple buffering
|
||||||
swapChainDesc.OutputWindow = hwnd;
|
swapChainDesc.OutputWindow = hwnd;
|
||||||
swapChainDesc.Windowed = TRUE;
|
swapChainDesc.Windowed = TRUE;
|
||||||
swapChainDesc.SwapEffect = DXGI_SWAP_EFFECT_DISCARD;
|
swapChainDesc.SwapEffect = DXGI_SWAP_EFFECT_DISCARD;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user