add direct3D

This commit is contained in:
2025-09-10 15:24:32 +02:00
parent ed7b1816e9
commit 3bda921efb
3 changed files with 58 additions and 2 deletions
+5 -1
View File
@@ -12,17 +12,21 @@ INT Window::init(HINSTANCE hInstance, UINT width, UINT height)
wc.hbrBackground = CreateSolidBrush(RGB(0, 255, 0));
wc.hCursor = LoadCursor(nullptr, IDC_ARROW);
wc.hIcon = LoadIcon(nullptr, IDI_APPLICATION);
wc.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC; // technical behaviour
// 2. register window class
if (!RegisterClass(&wc)) return 100;
// 3. adjust window size (optional)
DWORD style = {};
style = WS_OVERLAPPEDWINDOW; // window with border & title
//style = WS_POPUP; // window without any border or title
// 4. create window instance
_hWnd = CreateWindow(
wc.lpszClassName, // class name of window class to be instantiated
wc.lpszClassName, // window title
WS_OVERLAPPEDWINDOW, // visual style
style, // visual style
100, 100, // window position (left-top corner)
width, height, // window size
nullptr, // handle to parent window