mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-29 23:25:59 +00:00
Fix offscreen rendering mode
This commit is contained in:
parent
5edbf6d63d
commit
dbe3ee5d9e
1 changed files with 14 additions and 4 deletions
|
@ -627,9 +627,11 @@ bool CDriverGL::setDisplay(nlWindow wnd, const GfxMode &mode, bool show, bool re
|
|||
// Offscreen mode ?
|
||||
if (_CurrentMode.OffScreen)
|
||||
{
|
||||
#if 0
|
||||
if (!createWindow(mode))
|
||||
return false;
|
||||
HWND tmpHWND = _win;
|
||||
int width = mode.Width;
|
||||
int height = mode.Height;
|
||||
|
||||
// resize the window
|
||||
RECT rc;
|
||||
|
@ -908,7 +910,6 @@ bool CDriverGL::setDisplay(nlWindow wnd, const GfxMode &mode, bool show, bool re
|
|||
_hDC = NULL;
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1437,8 +1438,17 @@ bool CDriverGL::createWindow(const GfxMode &mode)
|
|||
#ifdef NL_OS_WINDOWS
|
||||
|
||||
// create the OpenGL window
|
||||
window = CreateWindowW(L"NLClass", L"NeL Window", WS_OVERLAPPEDWINDOW|WS_CLIPCHILDREN|WS_CLIPSIBLINGS,
|
||||
CW_USEDEFAULT, CW_USEDEFAULT, mode.Width, mode.Height, HWND_DESKTOP, NULL, GetModuleHandle(NULL), NULL);
|
||||
DWORD dwStyle = WS_OVERLAPPEDWINDOW|WS_CLIPCHILDREN|WS_CLIPSIBLINGS;
|
||||
int pos = CW_USEDEFAULT;
|
||||
HWND hwndParent = HWND_DESKTOP;
|
||||
if (mode.OffScreen)
|
||||
{
|
||||
dwStyle &= ~WS_VISIBLE;
|
||||
pos = 0;
|
||||
hwndParent = NULL;
|
||||
}
|
||||
window = CreateWindowW(L"NLClass", L"NeL Window", dwStyle,
|
||||
pos, pos, mode.Width, mode.Height, hwndParent, NULL, GetModuleHandle(NULL), NULL);
|
||||
|
||||
if (window == EmptyWindow)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue