Ooops. We don't want people to be able to create a subwindow of an
offscreen window. (^& This is no longer permitted. (Actually, it would be nice if it would work, but I don't think that you can subwindow a pixmap in UNIX_X11, and assume that subwindowing offscreen doesn't work on WIN32, either.) git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@456 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
parent
401cff3240
commit
5f324aa73b
@ -645,14 +645,20 @@ int FGAPIENTRY glutCreateWindow( const char* title )
|
|||||||
*/
|
*/
|
||||||
int FGAPIENTRY glutCreateSubWindow( int parentID, int x, int y, int w, int h )
|
int FGAPIENTRY glutCreateSubWindow( int parentID, int x, int y, int w, int h )
|
||||||
{
|
{
|
||||||
SFG_Window* window = NULL;
|
int ret = 0;
|
||||||
SFG_Window* parent = NULL;
|
|
||||||
|
|
||||||
freeglut_assert_ready;
|
if( GL_FALSE == fgStructure.Window->State.IsOffscreen )
|
||||||
parent = fgWindowByID( parentID );
|
{
|
||||||
freeglut_return_val_if_fail( parent != NULL, 0 );
|
SFG_Window* window = NULL;
|
||||||
window = fgCreateWindow( parent, "", x, y, w, h, GL_FALSE, GL_FALSE );
|
SFG_Window* parent = NULL;
|
||||||
return window->ID;
|
|
||||||
|
freeglut_assert_ready;
|
||||||
|
parent = fgWindowByID( parentID );
|
||||||
|
freeglut_return_val_if_fail( parent != NULL, 0 );
|
||||||
|
window = fgCreateWindow( parent, "", x, y, w, h, GL_FALSE, GL_FALSE );
|
||||||
|
ret = window->ID;
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user