Initial directx example.
This commit is contained in:
parent
1dfbcc61c4
commit
92d1f24613
28 changed files with 683 additions and 212 deletions
|
@ -4,36 +4,38 @@
|
|||
#include <Windows.h>
|
||||
|
||||
class Win32ApplicationContext;
|
||||
class Win32DxInterface;
|
||||
class Win32DxWindowInterface;
|
||||
class DesktopManager;
|
||||
|
||||
class Win32Window : public IPlatformWindow
|
||||
{
|
||||
public:
|
||||
Win32Window(mt::Window* window);
|
||||
Win32Window(mt::Window* window, Win32DxInterface* dxInterface = nullptr);
|
||||
virtual ~Win32Window() = default;
|
||||
|
||||
static std::unique_ptr<Win32Window> Create(mt::Window* window);
|
||||
static std::unique_ptr<Win32Window> Create(mt::Window* window, Win32DxInterface* dxInterface = nullptr);
|
||||
|
||||
LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
HWND GetHandle() const;
|
||||
HWND getHandle() const;
|
||||
|
||||
void SetHandle(HWND handle)
|
||||
void setHandle(HWND handle)
|
||||
{
|
||||
mHandle = handle;
|
||||
}
|
||||
|
||||
int GetCmdShow() const
|
||||
int getCmdShow() const
|
||||
{
|
||||
return mCmdShow;
|
||||
}
|
||||
|
||||
void SetCmdShow(int cmdShow)
|
||||
void setCmdShow(int cmdShow)
|
||||
{
|
||||
mCmdShow = cmdShow;
|
||||
}
|
||||
|
||||
void CreateNative(Win32ApplicationContext* context, DesktopManager* desktopManager);
|
||||
void createNative(Win32ApplicationContext* context, DesktopManager* desktopManager);
|
||||
|
||||
void show() {};
|
||||
|
||||
|
@ -43,10 +45,7 @@ public:
|
|||
|
||||
void onResize(unsigned width, unsigned height) {};
|
||||
|
||||
void beforePaint(mt::Screen* screen)
|
||||
{
|
||||
|
||||
}
|
||||
void beforePaint(mt::Screen* screen);
|
||||
|
||||
void afterPaint(mt::Screen* screen)
|
||||
{
|
||||
|
@ -56,5 +55,6 @@ public:
|
|||
private:
|
||||
HWND mHandle{ 0 };
|
||||
int mCmdShow{ 0 };
|
||||
DesktopManager* mDesktopManager;
|
||||
DesktopManager* mDesktopManager{ nullptr };
|
||||
std::unique_ptr<Win32DxWindowInterface> mDxInterface;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue