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 ?
|
// Offscreen mode ?
|
||||||
if (_CurrentMode.OffScreen)
|
if (_CurrentMode.OffScreen)
|
||||||
{
|
{
|
||||||
#if 0
|
|
||||||
if (!createWindow(mode))
|
if (!createWindow(mode))
|
||||||
return false;
|
return false;
|
||||||
|
HWND tmpHWND = _win;
|
||||||
|
int width = mode.Width;
|
||||||
|
int height = mode.Height;
|
||||||
|
|
||||||
// resize the window
|
// resize the window
|
||||||
RECT rc;
|
RECT rc;
|
||||||
|
@ -908,7 +910,6 @@ bool CDriverGL::setDisplay(nlWindow wnd, const GfxMode &mode, bool show, bool re
|
||||||
_hDC = NULL;
|
_hDC = NULL;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1437,8 +1438,17 @@ bool CDriverGL::createWindow(const GfxMode &mode)
|
||||||
#ifdef NL_OS_WINDOWS
|
#ifdef NL_OS_WINDOWS
|
||||||
|
|
||||||
// create the OpenGL window
|
// create the OpenGL window
|
||||||
window = CreateWindowW(L"NLClass", L"NeL Window", WS_OVERLAPPEDWINDOW|WS_CLIPCHILDREN|WS_CLIPSIBLINGS,
|
DWORD dwStyle = WS_OVERLAPPEDWINDOW|WS_CLIPCHILDREN|WS_CLIPSIBLINGS;
|
||||||
CW_USEDEFAULT, CW_USEDEFAULT, mode.Width, mode.Height, HWND_DESKTOP, NULL, GetModuleHandle(NULL), NULL);
|
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)
|
if (window == EmptyWindow)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue