X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmswin%2Ffg_state_mswin.c;h=27a94616b1f7c7bbbf4852af12065864e57f3867;hb=a5b0c9c64f5c4a35b82af7156f90bbae59d9c405;hp=c4598d4ce01e673b96bd6557549309bc15d82dec;hpb=8281152cfb738a2740d16dfb3f7f816467a6b2ae;p=freeglut diff --git a/src/mswin/fg_state_mswin.c b/src/mswin/fg_state_mswin.c index c4598d4..27a9461 100644 --- a/src/mswin/fg_state_mswin.c +++ b/src/mswin/fg_state_mswin.c @@ -141,10 +141,20 @@ int fgPlatformGlutGet ( GLenum eWhat ) return returnValue; case GLUT_WINDOW_BUFFER_SIZE: - returnValue = 1 ; /* TODO????? */ - return returnValue; + { + PIXELFORMATDESCRIPTOR pfd; + HDC hdc = fgStructure.CurrentWindow->Window.pContext.Device; + int iPixelFormat = GetPixelFormat( hdc ); + DescribePixelFormat(hdc, iPixelFormat, sizeof(PIXELFORMATDESCRIPTOR), &pfd); + + returnValue = pfd.cColorBits; + if (pfd.iPixelType==PFD_TYPE_RGBA) + returnValue += pfd.cAlphaBits; + + return returnValue; + } case GLUT_WINDOW_STENCIL_SIZE: - returnValue = 0 ; /* TODO????? */ + glGetIntegerv ( GL_STENCIL_BITS, &returnValue ); return returnValue; case GLUT_WINDOW_X: