mirror of
https://github.com/jmarshall23/DoomRTX.git
synced 2026-08-17 11:00:38 +02:00
New editor tabs.
This commit is contained in:
@@ -84,21 +84,25 @@ extern std::mutex g_graphicsDeviceContextMutex;
|
||||
class idGraphicsDeviceContextHelper
|
||||
{
|
||||
public:
|
||||
idGraphicsDeviceContextHelper(HDC inDC, HGLRC inRC)
|
||||
idGraphicsDeviceContextHelper(HDC inDC, HGLRC inRC, bool tsaaEnabled = false)
|
||||
: dc(inDC)
|
||||
, rc(inRC)
|
||||
{
|
||||
this->tsaaEnabled = tsaaEnabled;
|
||||
g_graphicsDeviceContextMutex.lock();
|
||||
wglMakeCurrent(dc, rc);
|
||||
}
|
||||
|
||||
~idGraphicsDeviceContextHelper()
|
||||
{
|
||||
QD3D12_EnableTAA(tsaaEnabled);
|
||||
SwapBuffers(dc);
|
||||
QD3D12_EnableTAA(true);
|
||||
g_graphicsDeviceContextMutex.unlock();
|
||||
}
|
||||
|
||||
private:
|
||||
bool tsaaEnabled = false;
|
||||
HDC dc = nullptr;
|
||||
HGLRC rc = nullptr;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user