Open/Close FullScreen die. unichrome and savage implemented, code is ifdef'd out

This commit is contained in:
Jon Smirl 2004-06-03 02:34:31 +00:00
parent ba3d643c49
commit 8f980b0e74
18 changed files with 77 additions and 180 deletions

View file

@ -168,36 +168,6 @@ struct __DriverAPIRec {
*/
GLboolean (*UnbindContext)(__DRIcontextPrivate *driContextPriv);
/**
* Full screen mode opening callback.
*
* \deprecated
* Full screen functionality is no longer used by DRI. Drivers should
* simply install a function returning \c GL_TRUE for backwards
* compatability.
*
* \todo
* Nothing calls this function anymore. Since this data structure is only
* accessed with in the driver (i.e., libGL never sees it), we need to
* remove the other cases that set this field and remove the field.
*/
GLboolean (*OpenFullScreen)(__DRIcontextPrivate *driContextPriv);
/**
* Full screen mode closing callback.
*
* \deprecated
* Full screen functionality is no longer used by DRI. Drivers should
* simply install a function returning \c GL_TRUE for backwards
* compatability.
*
* \todo
* Nothing calls this function anymore. Since this data structure is only
* accessed with in the driver (i.e., libGL never sees it), we need to
* remove the other cases that set this field and remove the field.
*/
GLboolean (*CloseFullScreen)(__DRIcontextPrivate *driContextPriv);
/**
* Retrieves statistics about buffer swap operations. Required if
* GLX_OML_sync_control or GLX_MESA_swap_frame_usage is supported.

View file

@ -557,12 +557,6 @@ fbUnbindContext( __DRIcontextPrivate *driContextPriv )
return GL_TRUE;
}
static GLboolean
fbOpenCloseFullScreen( __DRIcontextPrivate *driContextPriv )
{
return GL_TRUE;
}
static struct __DriverAPIRec fbAPI = {
fbInitDriver,
fbDestroyScreen,
@ -572,12 +566,16 @@ static struct __DriverAPIRec fbAPI = {
fbDestroyBuffer,
fbSwapBuffers,
fbMakeCurrent,
fbUnbindContext,
fbOpenCloseFullScreen,
fbOpenCloseFullScreen
fbUnbindContext
};
void
__driRegisterExtensions( void )
{
}
/*
* This is the bootstrap function for the driver.
* The __driCreateScreen name is the symbol that libGL.so fetches.

View file

@ -541,18 +541,6 @@ ffbUnbindContext(__DRIcontextPrivate *driContextPriv)
return GL_TRUE;
}
static GLboolean
ffbOpenFullScreen(__DRIcontextPrivate *driContextPriv)
{
return GL_TRUE;
}
static GLboolean
ffbCloseFullScreen(__DRIcontextPrivate *driContextPriv)
{
return GL_TRUE;
}
void ffbXMesaUpdateState(ffbContextPtr fmesa)
{
__DRIdrawablePrivate *dPriv = fmesa->driDrawable;
@ -581,9 +569,7 @@ static struct __DriverAPIRec ffbAPI = {
ffbDestroyBuffer,
ffbSwapBuffers,
ffbMakeCurrent,
ffbUnbindContext,
ffbOpenFullScreen,
ffbCloseFullScreen
ffbUnbindContext
};

View file

@ -243,19 +243,6 @@ gammaUnbindContext( __DRIcontextPrivate *driContextPriv )
return GL_TRUE;
}
static GLboolean
gammaOpenFullScreen(__DRIcontextPrivate *driContextPriv)
{
return GL_TRUE;
}
static GLboolean
gammaCloseFullScreen(__DRIcontextPrivate *driContextPriv)
{
return GL_TRUE;
}
static struct __DriverAPIRec gammaAPI = {
gammaInitDriver,
gammaDestroyScreen,
@ -265,9 +252,7 @@ static struct __DriverAPIRec gammaAPI = {
gammaDestroyBuffer,
gammaSwapBuffers,
gammaMakeCurrent,
gammaUnbindContext,
gammaOpenFullScreen,
gammaCloseFullScreen
gammaUnbindContext
};

View file

@ -360,12 +360,6 @@ i810DestroyBuffer(__DRIdrawablePrivate *driDrawPriv)
}
static GLboolean
i810OpenCloseFullScreen(__DRIcontextPrivate *driContextPriv)
{
return GL_TRUE;
}
static const struct __DriverAPIRec i810API = {
.InitDriver = i810InitDriver,
.DestroyScreen = i810DestroyScreen,
@ -376,8 +370,6 @@ static const struct __DriverAPIRec i810API = {
.SwapBuffers = i810SwapBuffers,
.MakeCurrent = i810MakeCurrent,
.UnbindContext = i810UnbindContext,
.OpenFullScreen = i810OpenCloseFullScreen,
.CloseFullScreen = i810OpenCloseFullScreen,
.GetSwapInfo = NULL,
.GetMSC = NULL,
.WaitForMSC = NULL,

View file

@ -350,8 +350,6 @@ static const struct __DriverAPIRec i830API = {
.SwapBuffers = i830SwapBuffers,
.MakeCurrent = i830MakeCurrent,
.UnbindContext = i830UnbindContext,
.OpenFullScreen = NULL,
.CloseFullScreen = NULL,
.GetSwapInfo = NULL,
.GetMSC = NULL,
.WaitForMSC = NULL,

View file

@ -26,7 +26,7 @@
* Authors:
* Gareth Hughes <gareth@valinux.com>
* Leif Delgass <ldelgass@retinalburn.net>
* José Fonseca <j_r_fonseca@yahoo.co.uk>
* Jos<EFBFBD>Fonseca <j_r_fonseca@yahoo.co.uk>
*/
#include "mach64_context.h"
@ -359,23 +359,6 @@ mach64DestroyScreen( __DRIscreenPrivate *driScreen )
driScreen->private = NULL;
}
/* Initialize the fullscreen mode.
*/
static GLboolean
mach64OpenFullScreen( __DRIcontextPrivate *driContextPriv )
{
return GL_TRUE;
}
/* Shut down the fullscreen mode.
*/
static GLboolean
mach64CloseFullScreen( __DRIcontextPrivate *driContextPriv )
{
return GL_TRUE;
}
/* Create and initialize the Mesa and driver specific pixmap buffer
* data.
*/
@ -443,6 +426,32 @@ mach64InitDriver( __DRIscreenPrivate *driScreen )
return GL_TRUE;
}
#ifndef _SOLO
/* This function is called by libGL.so as soon as libGL.so is loaded.
* This is where we register new extension functions with the dispatcher.
*/
void __driRegisterExtensions( void )
{
#if 0
/* KW: This is handled differently in the other drivers, not sure
* what to do here.
*/
PFNGLXENABLEEXTENSIONPROC glx_enable_extension;
if ( driCompareGLXAPIVersion( 20030317 ) >= 0 ) {
glx_enable_extension = (PFNGLXENABLEEXTENSIONPROC)
glXGetProcAddress( (const GLubyte *) "__glXEnableExtension" );
if ( glx_enable_extension != NULL ) {
glx_enable_extension( "GLX_SGI_swap_control", GL_FALSE );
glx_enable_extension( "GLX_SGI_video_sync", GL_FALSE );
glx_enable_extension( "GLX_MESA_swap_control", GL_FALSE );
}
}
#endif
}
#endif
static struct __DriverAPIRec mach64API = {
.InitDriver = mach64InitDriver,
.DestroyScreen = mach64DestroyScreen,
@ -453,8 +462,6 @@ static struct __DriverAPIRec mach64API = {
.SwapBuffers = mach64SwapBuffers,
.MakeCurrent = mach64MakeCurrent,
.UnbindContext = mach64UnbindContext,
.OpenFullScreen = mach64OpenFullScreen,
.CloseFullScreen = mach64CloseFullScreen,
.GetSwapInfo = NULL,
.GetMSC = driGetMSC32,
.WaitForMSC = driWaitForMSC32,

View file

@ -814,13 +814,6 @@ mgaUnbindContext(__DRIcontextPrivate *driContextPriv)
return GL_TRUE;
}
static GLboolean
mgaOpenCloseFullScreen(__DRIcontextPrivate *driContextPriv)
{
return GL_TRUE;
}
/* This looks buggy to me - the 'b' variable isn't used anywhere...
* Hmm - It seems that the drawable is already hooked in to
* driDrawablePriv.
@ -906,8 +899,6 @@ static const struct __DriverAPIRec mgaAPI = {
.SwapBuffers = mgaSwapBuffers,
.MakeCurrent = mgaMakeCurrent,
.UnbindContext = mgaUnbindContext,
.OpenFullScreen = mgaOpenCloseFullScreen,
.CloseFullScreen = mgaOpenCloseFullScreen,
.GetSwapInfo = getSwapInfo,
.GetMSC = driGetMSC32,
.WaitForMSC = driWaitForMSC32,

View file

@ -254,15 +254,6 @@ r128DestroyScreen( __DRIscreenPrivate *sPriv )
}
/* Initialize the fullscreen mode.
*/
static GLboolean
r128OpenCloseFullScreen( __DRIcontextPrivate *driContextPriv )
{
return GL_TRUE;
}
/* Create and initialize the Mesa and driver specific pixmap buffer
* data.
*/
@ -335,6 +326,36 @@ r128InitDriver( __DRIscreenPrivate *sPriv )
return GL_TRUE;
}
#ifndef _SOLO
/**
* This function is called by libGL.so as soon as libGL.so is loaded.
* This is where we register new extension functions with the dispatcher.
*
* \todo This interface has been deprecated, so we should probably remove
* this function before the next XFree86 release.
*/
void __driRegisterExtensions( void )
{
#if 0
/* KW: This is done slightly differently to the other drivers and
dri_interface.h doesn't seem to cope.
*/
PFNGLXENABLEEXTENSIONPROC
glx_enable_extension;
if ( driCompareGLXAPIVersion( 20030317 ) >= 0 ) {
glx_enable_extension = (PFNGLXENABLEEXTENSIONPROC)
glXGetProcAddress( (const GLubyte *) "__glXEnableExtension" );
if ( glx_enable_extension != NULL ) {
glx_enable_extension( "GLX_SGI_swap_control", GL_FALSE );
glx_enable_extension( "GLX_SGI_video_sync", GL_FALSE );
glx_enable_extension( "GLX_MESA_swap_control", GL_FALSE );
}
}
#endif
}
#endif
static struct __DriverAPIRec r128API = {
.InitDriver = r128InitDriver,
@ -346,8 +367,6 @@ static struct __DriverAPIRec r128API = {
.SwapBuffers = r128SwapBuffers,
.MakeCurrent = r128MakeCurrent,
.UnbindContext = r128UnbindContext,
.OpenFullScreen = r128OpenCloseFullScreen,
.CloseFullScreen = r128OpenCloseFullScreen,
.GetSwapInfo = NULL,
.GetMSC = driGetMSC32,
.WaitForMSC = driWaitForMSC32,

View file

@ -610,8 +610,6 @@ static const struct __DriverAPIRec r200API = {
.SwapBuffers = r200SwapBuffers,
.MakeCurrent = r200MakeCurrent,
.UnbindContext = r200UnbindContext,
.OpenFullScreen = NULL,
.CloseFullScreen = NULL,
.GetSwapInfo = getSwapInfo,
.GetMSC = driGetMSC32,
.WaitForMSC = driWaitForMSC32,

View file

@ -526,9 +526,6 @@ radeonDestroyBuffer(__DRIdrawablePrivate *driDrawPriv)
_mesa_destroy_framebuffer((GLframebuffer *) (driDrawPriv->driverPrivate));
}
static struct __DriverAPIRec radeonAPI = {
.InitDriver = radeonInitDriver,
.DestroyScreen = radeonDestroyScreen,
@ -539,8 +536,6 @@ static struct __DriverAPIRec radeonAPI = {
.SwapBuffers = radeonSwapBuffers,
.MakeCurrent = radeonMakeCurrent,
.UnbindContext = radeonUnbindContext,
.OpenFullScreen = NULL,
.CloseFullScreen = NULL,
.GetSwapInfo = getSwapInfo,
.GetMSC = driGetMSC32,
.WaitForMSC = driWaitForMSC32,
@ -549,7 +544,6 @@ static struct __DriverAPIRec radeonAPI = {
};
/*
* This is the bootstrap function for the driver.
* The __driCreateScreen name is the symbol that libGL.so fetches.

View file

@ -640,6 +640,7 @@ savageUnbindContext(__DRIcontextPrivate *driContextPriv)
return GL_TRUE;
}
#if 0
static GLboolean
savageOpenFullScreen(__DRIcontextPrivate *driContextPriv)
{
@ -673,7 +674,7 @@ savageCloseFullScreen(__DRIcontextPrivate *driContextPriv)
}
return GL_TRUE;
}
#endif
static GLboolean
savageMakeCurrent(__DRIcontextPrivate *driContextPriv,
@ -807,9 +808,7 @@ static const struct __DriverAPIRec savageAPI = {
savageDestroyBuffer,
savageSwapBuffers,
savageMakeCurrent,
savageUnbindContext,
savageOpenFullScreen,
savageCloseFullScreen
savageUnbindContext
};

View file

@ -214,7 +214,7 @@ struct savage_context_t {
/* use this bit to support single/double buffer */
GLuint IsDouble;
/* use this to indicate Fullscreen mode */
GLuint IsFullScreen;
GLuint IsFullScreen; /* FIXME - open/close fullscreen is gone, is this needed? */
GLuint backup_frontOffset;
GLuint backup_backOffset;
GLuint backup_frontBitmapDesc;

View file

@ -315,7 +315,6 @@ struct sis_context
GLint GlobalFlag;
/* Stereo */
GLboolean isFullScreen;
GLboolean useStereo;
GLboolean stereoEnabled;
int stereo_drawIndex;

View file

@ -251,14 +251,6 @@ sisInitDriver( __DRIscreenPrivate *sPriv )
return GL_TRUE;
}
/* Fullscreen mode change stub
*/
static GLboolean
sisOpenCloseFullScreen( __DRIcontextPrivate *driContextPriv )
{
return GL_TRUE;
}
static struct __DriverAPIRec sisAPI = {
.InitDriver = sisInitDriver,
.DestroyScreen = sisDestroyScreen,
@ -269,8 +261,6 @@ static struct __DriverAPIRec sisAPI = {
.SwapBuffers = sisSwapBuffers,
.MakeCurrent = sisMakeCurrent,
.UnbindContext = sisUnbindContext,
.OpenFullScreen = sisOpenCloseFullScreen,
.CloseFullScreen = sisOpenCloseFullScreen,
.GetSwapInfo = NULL,
.GetMSC = NULL,
.WaitForMSC = NULL,

View file

@ -262,13 +262,6 @@ tdfxSwapBuffers( __DRIdrawablePrivate *driDrawPriv )
}
static GLboolean
tdfxOpenCloseFullScreen(__DRIcontextPrivate *driContextPriv)
{
return GL_TRUE;
}
static const struct __DriverAPIRec tdfxAPI = {
.InitDriver = tdfxInitDriver,
.DestroyScreen = tdfxDestroyScreen,
@ -279,8 +272,6 @@ static const struct __DriverAPIRec tdfxAPI = {
.SwapBuffers = tdfxSwapBuffers,
.MakeCurrent = tdfxMakeCurrent,
.UnbindContext = tdfxUnbindContext,
.OpenFullScreen = tdfxOpenCloseFullScreen,
.CloseFullScreen = tdfxOpenCloseFullScreen,
.GetSwapInfo = NULL,
.GetMSC = NULL,
.WaitForMSC = NULL,

View file

@ -265,21 +265,6 @@ XMesaCloseFullScreen(__DRIcontextPrivate *driContextPriv)
vmesa->Setup[VIA_DESTREG_DI0] = vmesa->driScreen->front_offset;
return GL_TRUE;
}
#else
static GLboolean
viaOpenFullScreen(__DRIcontextPrivate *driContextPriv)
{
return GL_TRUE;
}
static GLboolean
viaCloseFullScreen(__DRIcontextPrivate *driContextPriv)
{
return GL_TRUE;
}
#endif
@ -292,9 +277,7 @@ static struct __DriverAPIRec viaAPI = {
viaDestroyBuffer,
viaSwapBuffers,
viaMakeCurrent,
viaUnbindContext,
viaOpenFullScreen,
viaCloseFullScreen
viaUnbindContext
};

View file

@ -430,12 +430,6 @@ x11UnbindContext(__DRIcontextPrivate *driContextPriv)
return GL_TRUE;
}
static GLboolean
x11OpenCloseFullScreen(__DRIcontextPrivate *driContextPriv)
{
return GL_TRUE;
}
static struct __DriverAPIRec x11API = {
x11InitDriver,
x11DestroyScreen,
@ -445,11 +439,14 @@ static struct __DriverAPIRec x11API = {
x11DestroyBuffer,
x11SwapBuffers,
x11MakeCurrent,
x11UnbindContext,
x11OpenCloseFullScreen,
x11OpenCloseFullScreen
x11UnbindContext
};
void
__driRegisterExtensions(void)
{
}
/*
* This is the bootstrap function for the driver.
* The __driCreateScreen name is the symbol that libGL.so fetches.