V2 working
This commit is contained in:
31
apps/RenderCadenceCompositor/platform/HiddenGlWindow.h
Normal file
31
apps/RenderCadenceCompositor/platform/HiddenGlWindow.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
class HiddenGlWindow
|
||||
{
|
||||
public:
|
||||
HiddenGlWindow() = default;
|
||||
HiddenGlWindow(const HiddenGlWindow&) = delete;
|
||||
HiddenGlWindow& operator=(const HiddenGlWindow&) = delete;
|
||||
~HiddenGlWindow();
|
||||
|
||||
bool Create(unsigned width, unsigned height, std::string& error);
|
||||
bool MakeCurrent() const;
|
||||
void ClearCurrent() const;
|
||||
void Destroy();
|
||||
|
||||
HDC DeviceContext() const { return mDc; }
|
||||
HGLRC Context() const { return mGlrc; }
|
||||
|
||||
private:
|
||||
static LRESULT CALLBACK WindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
HINSTANCE mInstance = nullptr;
|
||||
HWND mWindow = nullptr;
|
||||
HDC mDc = nullptr;
|
||||
HGLRC mGlrc = nullptr;
|
||||
ATOM mClassAtom = 0;
|
||||
};
|
||||
Reference in New Issue
Block a user