Implements Richard Rauch's request that the warning about indirect rendering contexts be suppressed for his BSD operating systems.

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@510 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
puggles 2004-08-05 01:12:50 +00:00
parent f20f677500
commit 34d1c10c25

View File

@ -415,6 +415,7 @@ void fgOpenWindow( SFG_Window* window, const char* title,
NULL, ( fgState.DirectContext != GLUT_FORCE_INDIRECT_CONTEXT ) NULL, ( fgState.DirectContext != GLUT_FORCE_INDIRECT_CONTEXT )
); );
#if !defined( __FreeBSD__ ) && !defined( __NetBSD__ )
if( !glXIsDirect( fgDisplay.Display, window->Window.Context ) ) if( !glXIsDirect( fgDisplay.Display, window->Window.Context ) )
{ {
if( fgState.DirectContext == GLUT_FORCE_DIRECT_CONTEXT ) if( fgState.DirectContext == GLUT_FORCE_DIRECT_CONTEXT )
@ -424,6 +425,13 @@ void fgOpenWindow( SFG_Window* window, const char* title,
fgWarning( "Unable to create direct context rendering for window '%s'\nThis may hurt performance.", fgWarning( "Unable to create direct context rendering for window '%s'\nThis may hurt performance.",
title ); title );
} }
#endif
glXMakeCurrent(
fgDisplay.Display,
window->Window.Handle,
window->Window.Context
);
/* /*
* XXX Assume the new window is visible by default * XXX Assume the new window is visible by default
@ -479,12 +487,6 @@ void fgOpenWindow( SFG_Window* window, const char* title,
XSetWMProtocols( fgDisplay.Display, window->Window.Handle, XSetWMProtocols( fgDisplay.Display, window->Window.Handle,
&fgDisplay.DeleteWindow, 1 ); &fgDisplay.DeleteWindow, 1 );
glXMakeCurrent(
fgDisplay.Display,
window->Window.Handle,
window->Window.Context
);
XMapWindow( fgDisplay.Display, window->Window.Handle ); XMapWindow( fgDisplay.Display, window->Window.Handle );
#elif TARGET_HOST_WIN32 || TARGET_HOST_WINCE #elif TARGET_HOST_WIN32 || TARGET_HOST_WINCE