From 2cc3ae61ee06893f31662b961e637d1e9210580a Mon Sep 17 00:00:00 2001 From: Sven Panne Date: Mon, 16 Mar 2009 17:30:37 +0000 Subject: [PATCH] Added GLUT_AUX and GLUT_MULTISAMPLE as possible parameters for glutGet, making things more symmetric with glutSetOption. git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@801 7f0cb862-5218-0410-a997-914c9d46530a --- ChangeLog | 3 +++ NEWS | 10 ++++++---- src/freeglut_state.c | 8 ++++++-- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 51bb52a..70f4b9e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2009-03-16 Sven Panne + * src/freeglut_state.c: Added GLUT_AUX and GLUT_MULTISAMPLE as possible + parameters for glutGet, making things more symmetric with + glutSetOption. * src/freeglutdll.def: Added missing API entries. 2009-03-10 John F. Fay diff --git a/NEWS b/NEWS index 2b05756..643b480 100644 --- a/NEWS +++ b/NEWS @@ -37,7 +37,7 @@ Mar ??, 2009: * Added new API entry to de-initialize freeglut: - glutExit( void ); + void glutExit( void ); * Added more special keys: GLUT_KEY_NUM_LOCK, GLUT_KEY_BEGIN GLUT_KEY_DELETE @@ -45,9 +45,11 @@ Mar ??, 2009: constants GLUT_CAPTIONLESS and GLUT_BORDERLESS for glutInitDisplayMode (currently works for Windows only). - * Added support for multisampling: glutSetOption() accepts GLUT_MULTISAMPLE - now. The possible number of samples per pixels can be queried via the new - API entry + * Added support for multisampling: The number of samples per pixel to use + when GLUT_MULTISAMPLE is specified in glutInitDisplayMode() can be set via + glutSetOption() with parameter GLUT_MULTISAMPLE now. glutGetOption() with + the same token retrieves that value. The possible number of samples per + pixels can be queried via the new API entry int *glutGetModeValues( GLenum mode, int *size ); diff --git a/src/freeglut_state.c b/src/freeglut_state.c index 0ab3efa..64196b7 100644 --- a/src/freeglut_state.c +++ b/src/freeglut_state.c @@ -537,11 +537,15 @@ int FGAPIENTRY glutGet( GLenum eWhat ) case GLUT_DIRECT_RENDERING: return fgState.DirectContext; - break; case GLUT_FULL_SCREEN: return fghCheckFullScreen(); - break; + + case GLUT_AUX: + return fgState.AuxiliaryBufferNumber; + + case GLUT_MULTISAMPLE: + return fgState.SampleNumber; default: fgWarning( "glutGet(): missing enum handle %d", eWhat ); -- 1.7.10.4