mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-27 01:26:30 +00:00
Fix offscreen rendering mode
--HG-- branch : develop
This commit is contained in:
parent
6db29c375a
commit
58590a9e7e
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