Ivan Belyavtsev
23.06.2022
This part of course is going to be boring. There is plenty of preliminary work. We’ll get a somehow working application on Saturday only.
WNDCLASS
or WNDCLASSEX
instanceRegisterClass
or
RegisterClassEx
callCreateWindow
or CreateWindowEx
and
keep HWND
resultsShowWindows
to present [1]GetMessage
or
PeekMessage
TranslateMessage
to make the message readableDispatchMessage
to handling
(DispatchMessage
calls the windows procedure from
WNDCLASS
) [1]WinMain
procedure and
cg::utils::window
classmodel
and camera
creation code into
init
method of dx12_renderer
classThe Microsoft Component Object Model (COM) is a platform-independent, distributed, object-oriented system for creating binary software components that can interact[2].
All COM interfaces inherit from the IUnknown
interface.
IUnknown
interface has the next functions:
QueryInterface(REFIID riid, LPVOID *ppv)
AddRef()
Release()
[2]Use the IID_PPV_ARGS
macro to get both arguments
Microsoft::WRL::ComPtr is a C++ template smart-pointer for COM objects that is used extensively in Windows Runtime (WinRT) C++ programming.
wrl/client.h
Microsoft::WRL::ComPtr