Windows에서 할 일
CreateWindow()를 한 이후에 SetLayeredWindowAttributes()를 호출 할 것.
WS_EX_LAYERED를 꼭 넣어야 한다.
DWORD dwWindowStyle = WS_POPUPWINDOW | WS_CLIPCHILDREN | WS_CLIPSIBLINGS;
hWnd = CreateWindow(this->m_lpszTitle, this->m_lpszTitle, dwWindowStyle,
nStartX, nStartY, nWidth, nHeight, NULL, NULL, hInstance, NULL);
if (!hWnd)
{
return FALSE;
}
::SetWindowLong(hWnd, GWL_EXSTYLE, ::GetWindowLong(hWnd, GWL_EXSTYLE) | WS_EX_LAYERED | WS_EX_TOPMOST);
::SetWindowPos(hWnd, 0, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE);
::SetLayeredWindowAttributes(hWnd, 0x0000ff00, 255, LWA_COLORKEY);
DirectX9에서 할 일
CreateOffscreenPlainSurface()로 Surface를 생성.
Clear()를 할 때에는 SetLayeredWindowAttributes()에서 지정한 색상으로 할 것.
Present() 사용하지 말 것.
BitBlt()을 이용하여 윈도우 DC에 RenderTarget DC를 그릴 것.
소스 코드 :
'Visualization Programming > DirectX9' 카테고리의 다른 글
DirectX9 - Terrain Geomorphing (0) | 2021.12.13 |
---|---|
DirectX9 - Volume Rendering 적용해봤음 (0) | 2019.04.30 |
DirectX9 - DirectX SDK (June 2010) 설치할 때 Error Code S1023 (0) | 2018.08.08 |