EGL is always double-buffered

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1688 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
beuc 2014-06-01 09:48:51 +00:00
parent 25be478938
commit 13416c05d6
2 changed files with 8 additions and 1 deletions

View File

@ -88,6 +88,9 @@ int fghPlatformGlutGetEGL ( GLenum eWhat )
return 0;
return fgPlatformGetConfig( EGL_NATIVE_VISUAL_ID );
case GLUT_WINDOW_DOUBLEBUFFER:
return 1; /* EGL is always double-buffered */
default:
fgWarning( "glutGet(): missing enum handle %d", eWhat );
break;

View File

@ -127,15 +127,19 @@ void fgOpenWindow( SFG_Window* window, const char* title,
fgSetWindow( window );
#ifndef EGL_VERSION_1_0
window->Window.DoubleBuffered =
( fgState.DisplayMode & GLUT_DOUBLE ) ? 1 : 0;
#ifndef EGL_VERSION_1_0 /* No glDrawBuffer/glReadBuffer in GLES */
if ( ! window->Window.DoubleBuffered )
{
glDrawBuffer ( GL_FRONT );
glReadBuffer ( GL_FRONT );
}
#else
/* - EGL is always double-buffered */
/* - No glDrawBuffer/glReadBuffer in GLES */
window->Window.DoubleBuffered = 1;
#endif
window->Window.attribute_v_coord = -1;
window->Window.attribute_v_normal = -1;