pfd.cColorBits = (BYTE) GetDeviceCaps( window->Window.Device, BITSPIXEL );
ppfd = &pfd;
-
+
pixelformat = ChoosePixelFormat( window->Window.Device, ppfd );
if( pixelformat == 0 )
return GL_FALSE;
if ( window )
{
window->Window.Device = GetDC( window->Window.Handle );
- wglMakeCurrent(
- window->Window.Device,
+ wglMakeCurrent(
+ window->Window.Device,
window->Window.Context
);
}
window->Window.VisualInfo = fgChooseVisual( );
fgState.DisplayMode &= ~GLUT_DOUBLE;
}
-
+
/*
* GLUT also checks for multi-sampling, but I don't see that
* anywhere else in FREEGLUT so I won't bother with it for the moment.
&wmHints,
NULL
);
-
+
XSetWMProtocols( fgDisplay.Display, window->Window.Handle,
&fgDisplay.DeleteWindow, 1 );
-
+
XMapWindow( fgDisplay.Display, window->Window.Handle );
}
-
+
#elif TARGET_HOST_WIN32
WNDCLASS wc;
ATOM atom;
freeglut_assert_ready;
-
+
/*
* Grab the window class we have registered on glutInit():
*/
atom = GetClassInfo( fgDisplay.Instance, "FREEGLUT", &wc );
assert( atom != 0 );
-
+
if( gameMode )
{
assert( window->Parent == NULL );
int FGAPIENTRY glutCreateSubWindow( int parentID, int x, int y, int w, int h )
{
int ret = 0;
-
+
if( GL_FALSE == fgStructure.Window->State.IsOffscreen )
{
SFG_Window* window = NULL;
#if TARGET_HOST_UNIX_X11
XTextProperty text;
-
+
text.value = (unsigned char *) title;
text.encoding = XA_STRING;
text.format = 8;
text.nitems = strlen( title );
-
+
XSetWMName(
fgDisplay.Display,
fgStructure.Window->Window.Handle,
&text
);
-
+
XFlush( fgDisplay.Display ); /* XXX Shouldn't need this */
#elif TARGET_HOST_WIN32
#if TARGET_HOST_UNIX_X11
XTextProperty text;
-
+
text.value = (unsigned char *) title;
text.encoding = XA_STRING;
text.format = 8;
#elif TARGET_HOST_WIN32
RECT winRect;
-
+
GetWindowRect( fgStructure.Window->Window.Handle, &winRect );
MoveWindow(
fgStructure.Window->Window.Handle,
rect.bottom - rect.top,
SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOSENDCHANGING |
SWP_NOZORDER
- );
+ );
#endif
}
}