diff options
Diffstat (limited to 'src/mesa')
53 files changed, 126 insertions, 127 deletions
diff --git a/src/mesa/drivers/beos/GLView.cpp b/src/mesa/drivers/beos/GLView.cpp index 44082e47cf4..8ccb93d56b5 100644 --- a/src/mesa/drivers/beos/GLView.cpp +++ b/src/mesa/drivers/beos/GLView.cpp @@ -105,7 +105,7 @@ public: MesaDriver(); ~MesaDriver(); - void Init(BGLView * bglview, GLcontext * c, struct gl_config * v, GLframebuffer * b); + void Init(BGLView * bglview, GLcontext * c, struct gl_config * v, struct gl_framebuffer * b); void LockGL(); void UnlockGL(); @@ -122,7 +122,7 @@ private: GLcontext * m_glcontext; struct gl_config * m_glvisual; - GLframebuffer * m_glframebuffer; + struct gl_framebuffer * m_glframebuffer; BGLView * m_bglview; BBitmap * m_bitmap; @@ -147,9 +147,9 @@ private: static void Index(GLcontext *ctx, GLuint index); static void Color(GLcontext *ctx, GLubyte r, GLubyte g, GLubyte b, GLubyte a); - static void SetBuffer(GLcontext *ctx, GLframebuffer *colorBuffer, + static void SetBuffer(GLcontext *ctx, struct gl_framebuffer *colorBuffer, GLenum mode); - static void GetBufferSize(GLframebuffer * framebuffer, GLuint *width, + static void GetBufferSize(struct gl_framebuffer * framebuffer, GLuint *width, GLuint *height); static void Error(GLcontext *ctx); static const GLubyte * GetString(GLcontext *ctx, GLenum name); @@ -332,7 +332,7 @@ BGLView::BGLView(BRect rect, char *name, // create core framebuffer - GLframebuffer * buffer = _mesa_create_framebuffer(visual, + struct gl_framebuffer * buffer = _mesa_create_framebuffer(visual, depth > 0 ? GL_TRUE : GL_FALSE, stencil > 0 ? GL_TRUE: GL_FALSE, accum > 0 ? GL_TRUE : GL_FALSE, @@ -668,7 +668,7 @@ MesaDriver::~MesaDriver() } -void MesaDriver::Init(BGLView * bglview, GLcontext * ctx, struct gl_config * visual, GLframebuffer * framebuffer) +void MesaDriver::Init(BGLView * bglview, GLcontext * ctx, struct gl_config * visual, struct gl_framebuffer * framebuffer) { m_bglview = bglview; m_glcontext = ctx; @@ -984,7 +984,7 @@ void MesaDriver::ClearBack(GLcontext *ctx, } -void MesaDriver::SetBuffer(GLcontext *ctx, GLframebuffer *buffer, +void MesaDriver::SetBuffer(GLcontext *ctx, struct gl_framebuffer *buffer, GLenum mode) { /* TODO */ @@ -993,7 +993,7 @@ void MesaDriver::SetBuffer(GLcontext *ctx, GLframebuffer *buffer, (void) mode; } -void MesaDriver::GetBufferSize(GLframebuffer * framebuffer, GLuint *width, +void MesaDriver::GetBufferSize(struct gl_framebuffer * framebuffer, GLuint *width, GLuint *height) { GET_CURRENT_CONTEXT(ctx); diff --git a/src/mesa/drivers/dri/common/utils.c b/src/mesa/drivers/dri/common/utils.c index 3cc496c671f..bb7f07d8f41 100644 --- a/src/mesa/drivers/dri/common/utils.c +++ b/src/mesa/drivers/dri/common/utils.c @@ -337,7 +337,7 @@ driCheckDriDdxDrmVersions2(const char * driver_name, drmActual, drmExpected); } -GLboolean driClipRectToFramebuffer( const GLframebuffer *buffer, +GLboolean driClipRectToFramebuffer( const struct gl_framebuffer *buffer, GLint *x, GLint *y, GLsizei *width, GLsizei *height ) { diff --git a/src/mesa/drivers/dri/common/utils.h b/src/mesa/drivers/dri/common/utils.h index 01930d784ee..40344a1874b 100644 --- a/src/mesa/drivers/dri/common/utils.h +++ b/src/mesa/drivers/dri/common/utils.h @@ -94,7 +94,7 @@ extern GLboolean driCheckDriDdxDrmVersions3(const char * driver_name, const __DRIversion * ddxActual, const __DRIutilversion2 * ddxExpected, const __DRIversion * drmActual, const __DRIversion * drmExpected); -extern GLboolean driClipRectToFramebuffer( const GLframebuffer *buffer, +extern GLboolean driClipRectToFramebuffer( const struct gl_framebuffer *buffer, GLint *x, GLint *y, GLsizei *width, GLsizei *height ); diff --git a/src/mesa/drivers/dri/i810/i810context.c b/src/mesa/drivers/dri/i810/i810context.c index aaa97f017ad..35a4898aac6 100644 --- a/src/mesa/drivers/dri/i810/i810context.c +++ b/src/mesa/drivers/dri/i810/i810context.c @@ -96,7 +96,7 @@ static const GLubyte *i810GetString( GLcontext *ctx, GLenum name ) } } -static void i810BufferSize(GLframebuffer *buffer, GLuint *width, GLuint *height) +static void i810BufferSize(struct gl_framebuffer *buffer, GLuint *width, GLuint *height) { GET_CURRENT_CONTEXT(ctx); i810ContextPtr imesa = I810_CONTEXT(ctx); @@ -453,8 +453,8 @@ i810MakeCurrent(__DRIcontext *driContextPriv, imesa->driDrawable = driDrawPriv; _mesa_make_current(imesa->glCtx, - (GLframebuffer *) driDrawPriv->driverPrivate, - (GLframebuffer *) driReadPriv->driverPrivate); + (struct gl_framebuffer *) driDrawPriv->driverPrivate, + (struct gl_framebuffer *) driReadPriv->driverPrivate); /* Are these necessary? */ diff --git a/src/mesa/drivers/dri/i810/i810context.h b/src/mesa/drivers/dri/i810/i810context.h index 19529db0200..2a09cf88f59 100644 --- a/src/mesa/drivers/dri/i810/i810context.h +++ b/src/mesa/drivers/dri/i810/i810context.h @@ -146,7 +146,7 @@ struct i810_context_t { /* DRI stuff */ GLuint needClip; - GLframebuffer *glBuffer; + struct gl_framebuffer *glBuffer; GLboolean doPageFlip; /* These refer to the current draw (front vs. back) buffer: diff --git a/src/mesa/drivers/dri/i810/i810screen.c b/src/mesa/drivers/dri/i810/i810screen.c index 098d027771f..fc56b61b4e6 100644 --- a/src/mesa/drivers/dri/i810/i810screen.c +++ b/src/mesa/drivers/dri/i810/i810screen.c @@ -333,7 +333,7 @@ i810CreateBuffer( __DRIscreen *driScrnPriv, static void i810DestroyBuffer(__DRIdrawable *driDrawPriv) { - _mesa_reference_framebuffer((GLframebuffer **)(&(driDrawPriv->driverPrivate)), NULL); + _mesa_reference_framebuffer((struct gl_framebuffer **)(&(driDrawPriv->driverPrivate)), NULL); } const struct __DriverAPIRec driDriverAPI = { diff --git a/src/mesa/drivers/dri/mach64/mach64_context.c b/src/mesa/drivers/dri/mach64/mach64_context.c index 9d89cb8a486..0d4f895dd4a 100644 --- a/src/mesa/drivers/dri/mach64/mach64_context.c +++ b/src/mesa/drivers/dri/mach64/mach64_context.c @@ -334,8 +334,8 @@ mach64MakeCurrent( __DRIcontext *driContextPriv, } _mesa_make_current( newMach64Ctx->glCtx, - (GLframebuffer *) driDrawPriv->driverPrivate, - (GLframebuffer *) driReadPriv->driverPrivate ); + (struct gl_framebuffer *) driDrawPriv->driverPrivate, + (struct gl_framebuffer *) driReadPriv->driverPrivate ); newMach64Ctx->new_state |= MACH64_NEW_CLIP; diff --git a/src/mesa/drivers/dri/mach64/mach64_dd.c b/src/mesa/drivers/dri/mach64/mach64_dd.c index ca713e2de5e..d464f6c5189 100644 --- a/src/mesa/drivers/dri/mach64/mach64_dd.c +++ b/src/mesa/drivers/dri/mach64/mach64_dd.c @@ -41,7 +41,7 @@ /* Return the current color buffer size. */ -static void mach64DDGetBufferSize( GLframebuffer *buffer, +static void mach64DDGetBufferSize( struct gl_framebuffer *buffer, GLuint *width, GLuint *height ) { GET_CURRENT_CONTEXT(ctx); diff --git a/src/mesa/drivers/dri/mach64/mach64_screen.c b/src/mesa/drivers/dri/mach64/mach64_screen.c index 762ffe5e430..b5ed03910c9 100644 --- a/src/mesa/drivers/dri/mach64/mach64_screen.c +++ b/src/mesa/drivers/dri/mach64/mach64_screen.c @@ -369,7 +369,7 @@ mach64CreateBuffer( __DRIscreen *driScrnPriv, static void mach64DestroyBuffer(__DRIdrawable *driDrawPriv) { - _mesa_reference_framebuffer((GLframebuffer **)(&(driDrawPriv->driverPrivate)), NULL); + _mesa_reference_framebuffer((struct gl_framebuffer **)(&(driDrawPriv->driverPrivate)), NULL); } diff --git a/src/mesa/drivers/dri/mga/mga_xmesa.c b/src/mesa/drivers/dri/mga/mga_xmesa.c index 6daeb6a6bf7..7e923963701 100644 --- a/src/mesa/drivers/dri/mga/mga_xmesa.c +++ b/src/mesa/drivers/dri/mga/mga_xmesa.c @@ -812,7 +812,7 @@ mgaCreateBuffer( __DRIscreen *driScrnPriv, static void mgaDestroyBuffer(__DRIdrawable *driDrawPriv) { - _mesa_reference_framebuffer((GLframebuffer **)(&(driDrawPriv->driverPrivate)), NULL); + _mesa_reference_framebuffer((struct gl_framebuffer **)(&(driDrawPriv->driverPrivate)), NULL); } static void @@ -875,8 +875,8 @@ mgaMakeCurrent(__DRIcontext *driContextPriv, mmesa->driReadable = driReadPriv; _mesa_make_current(mmesa->glCtx, - (GLframebuffer *) driDrawPriv->driverPrivate, - (GLframebuffer *) driReadPriv->driverPrivate); + (struct gl_framebuffer *) driDrawPriv->driverPrivate, + (struct gl_framebuffer *) driReadPriv->driverPrivate); } else { _mesa_make_current(NULL, NULL, NULL); diff --git a/src/mesa/drivers/dri/mga/mgapixel.c b/src/mesa/drivers/dri/mga/mgapixel.c index 9cbdbe02c94..1b6fb7d6b35 100644 --- a/src/mesa/drivers/dri/mga/mgapixel.c +++ b/src/mesa/drivers/dri/mga/mgapixel.c @@ -170,7 +170,7 @@ check_stencil_per_fragment_ops( const GLcontext *ctx ) static GLboolean clip_pixelrect( const GLcontext *ctx, - const GLframebuffer *buffer, + const struct gl_framebuffer *buffer, GLint *x, GLint *y, GLsizei *width, GLsizei *height, GLint *skipPixels, GLint *skipRows, diff --git a/src/mesa/drivers/dri/r128/r128_context.c b/src/mesa/drivers/dri/r128/r128_context.c index bc25d7e8ca9..accd9a5ddbe 100644 --- a/src/mesa/drivers/dri/r128/r128_context.c +++ b/src/mesa/drivers/dri/r128/r128_context.c @@ -348,8 +348,8 @@ r128MakeCurrent( __DRIcontext *driContextPriv, newR128Ctx->driDrawable = driDrawPriv; _mesa_make_current( newR128Ctx->glCtx, - (GLframebuffer *) driDrawPriv->driverPrivate, - (GLframebuffer *) driReadPriv->driverPrivate ); + (struct gl_framebuffer *) driDrawPriv->driverPrivate, + (struct gl_framebuffer *) driReadPriv->driverPrivate ); newR128Ctx->new_state |= R128_NEW_WINDOW | R128_NEW_CLIP; } else { diff --git a/src/mesa/drivers/dri/r128/r128_dd.c b/src/mesa/drivers/dri/r128/r128_dd.c index 64dec70cdd5..7dcfa3b2854 100644 --- a/src/mesa/drivers/dri/r128/r128_dd.c +++ b/src/mesa/drivers/dri/r128/r128_dd.c @@ -45,7 +45,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. /* Return the width and height of the current color buffer. */ -static void r128GetBufferSize( GLframebuffer *buffer, +static void r128GetBufferSize( struct gl_framebuffer *buffer, GLuint *width, GLuint *height ) { GET_CURRENT_CONTEXT(ctx); diff --git a/src/mesa/drivers/dri/r128/r128_screen.c b/src/mesa/drivers/dri/r128/r128_screen.c index 29a4f74156e..43ab0fc64dd 100644 --- a/src/mesa/drivers/dri/r128/r128_screen.c +++ b/src/mesa/drivers/dri/r128/r128_screen.c @@ -349,7 +349,7 @@ r128CreateBuffer( __DRIscreen *driScrnPriv, static void r128DestroyBuffer(__DRIdrawable *driDrawPriv) { - _mesa_reference_framebuffer((GLframebuffer **)(&(driDrawPriv->driverPrivate)), NULL); + _mesa_reference_framebuffer((struct gl_framebuffer **)(&(driDrawPriv->driverPrivate)), NULL); } diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c b/src/mesa/drivers/dri/radeon/radeon_screen.c index f5b55ad9701..43ebc810939 100644 --- a/src/mesa/drivers/dri/radeon/radeon_screen.c +++ b/src/mesa/drivers/dri/radeon/radeon_screen.c @@ -1691,7 +1691,7 @@ radeonDestroyBuffer(__DRIdrawable *driDrawPriv) if (!rfb) return; radeon_cleanup_renderbuffers(rfb); - _mesa_reference_framebuffer((GLframebuffer **)(&(driDrawPriv->driverPrivate)), NULL); + _mesa_reference_framebuffer((struct gl_framebuffer **)(&(driDrawPriv->driverPrivate)), NULL); } diff --git a/src/mesa/drivers/dri/savage/savage_xmesa.c b/src/mesa/drivers/dri/savage/savage_xmesa.c index ab05fc8eb11..a8ba0334111 100644 --- a/src/mesa/drivers/dri/savage/savage_xmesa.c +++ b/src/mesa/drivers/dri/savage/savage_xmesa.c @@ -681,7 +681,7 @@ savageCreateBuffer( __DRIscreen *driScrnPriv, static void savageDestroyBuffer(__DRIdrawable *driDrawPriv) { - _mesa_reference_framebuffer((GLframebuffer **)(&(driDrawPriv->driverPrivate)), NULL); + _mesa_reference_framebuffer((struct gl_framebuffer **)(&(driDrawPriv->driverPrivate)), NULL); } #if 0 @@ -789,9 +789,9 @@ savageMakeCurrent(__DRIcontext *driContextPriv, savageContextPtr imesa = (savageContextPtr) driContextPriv->driverPrivate; struct gl_framebuffer *drawBuffer - = (GLframebuffer *) driDrawPriv->driverPrivate; + = (struct gl_framebuffer *) driDrawPriv->driverPrivate; struct gl_framebuffer *readBuffer - = (GLframebuffer *) driReadPriv->driverPrivate; + = (struct gl_framebuffer *) driReadPriv->driverPrivate; driRenderbuffer *frontRb = (driRenderbuffer *) drawBuffer->Attachment[BUFFER_FRONT_LEFT].Renderbuffer; driRenderbuffer *backRb = (driRenderbuffer *) diff --git a/src/mesa/drivers/dri/savage/savagecontext.h b/src/mesa/drivers/dri/savage/savagecontext.h index ba1e6e1e1ad..6723456ec98 100644 --- a/src/mesa/drivers/dri/savage/savagecontext.h +++ b/src/mesa/drivers/dri/savage/savagecontext.h @@ -226,7 +226,7 @@ struct savage_context_t { /* DRI stuff */ GLuint bufferSize; - GLframebuffer *glBuffer; + struct gl_framebuffer *glBuffer; /* Two flags to keep track of fallbacks. */ GLuint Fallback; diff --git a/src/mesa/drivers/dri/sis/sis_context.c b/src/mesa/drivers/dri/sis/sis_context.c index f460e89a561..07b363826dd 100644 --- a/src/mesa/drivers/dri/sis/sis_context.c +++ b/src/mesa/drivers/dri/sis/sis_context.c @@ -147,7 +147,7 @@ WaitingFor3dIdle(sisContextPtr smesa, int wLen) } } -void sisReAllocateBuffers(GLcontext *ctx, GLframebuffer *drawbuffer, +void sisReAllocateBuffers(GLcontext *ctx, struct gl_framebuffer *drawbuffer, GLuint width, GLuint height) { sisContextPtr smesa = SIS_CONTEXT(ctx); @@ -381,8 +381,8 @@ sisMakeCurrent( __DRIcontext *driContextPriv, newSisCtx->driDrawable = driDrawPriv; - drawBuffer = (GLframebuffer *)driDrawPriv->driverPrivate; - readBuffer = (GLframebuffer *)driReadPriv->driverPrivate; + drawBuffer = (struct gl_framebuffer *)driDrawPriv->driverPrivate; + readBuffer = (struct gl_framebuffer *)driReadPriv->driverPrivate; _mesa_make_current( newSisCtx->glCtx, drawBuffer, readBuffer ); diff --git a/src/mesa/drivers/dri/sis/sis_context.h b/src/mesa/drivers/dri/sis/sis_context.h index 2ccfe1b54bd..54e98fd00a8 100644 --- a/src/mesa/drivers/dri/sis/sis_context.h +++ b/src/mesa/drivers/dri/sis/sis_context.h @@ -444,7 +444,7 @@ extern GLboolean sisCreateContext( gl_api api, void *sharedContextPrivate ); extern void sisDestroyContext( __DRIcontext * ); -void sisReAllocateBuffers(GLcontext *ctx, GLframebuffer *drawbuffer, +void sisReAllocateBuffers(GLcontext *ctx, struct gl_framebuffer *drawbuffer, GLuint width, GLuint height); extern GLboolean sisMakeCurrent( __DRIcontext *driContextPriv, diff --git a/src/mesa/drivers/dri/sis/sis_dd.c b/src/mesa/drivers/dri/sis/sis_dd.c index fe4ade85920..af1d9ee0ad0 100644 --- a/src/mesa/drivers/dri/sis/sis_dd.c +++ b/src/mesa/drivers/dri/sis/sis_dd.c @@ -50,7 +50,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. /* Return the width and height of the given buffer. */ static void -sisGetBufferSize( GLframebuffer *buffer, +sisGetBufferSize( struct gl_framebuffer *buffer, GLuint *width, GLuint *height ) { GET_CURRENT_CONTEXT(ctx); diff --git a/src/mesa/drivers/dri/sis/sis_screen.c b/src/mesa/drivers/dri/sis/sis_screen.c index 1ce52a2d674..7ca5031846d 100644 --- a/src/mesa/drivers/dri/sis/sis_screen.c +++ b/src/mesa/drivers/dri/sis/sis_screen.c @@ -220,7 +220,7 @@ sisCreateBuffer( __DRIscreen *driScrnPriv, static void sisDestroyBuffer(__DRIdrawable *driDrawPriv) { - _mesa_reference_framebuffer((GLframebuffer **)(&(driDrawPriv->driverPrivate)), NULL); + _mesa_reference_framebuffer((struct gl_framebuffer **)(&(driDrawPriv->driverPrivate)), NULL); } static void sisCopyBuffer( __DRIdrawable *dPriv ) diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c index 8585250eb05..5b521356270 100644 --- a/src/mesa/drivers/dri/swrast/swrast.c +++ b/src/mesa/drivers/dri/swrast/swrast.c @@ -373,7 +373,7 @@ dri_create_buffer(__DRIscreen * sPriv, const struct gl_config * visual, GLboolean isPixmap) { struct dri_drawable *drawable = NULL; - GLframebuffer *fb; + struct gl_framebuffer *fb; struct swrast_renderbuffer *frontrb, *backrb; TRACE; @@ -432,7 +432,7 @@ dri_destroy_buffer(__DRIdrawable * dPriv) if (dPriv) { struct dri_drawable *drawable = dri_drawable(dPriv); - GLframebuffer *fb; + struct gl_framebuffer *fb; free(drawable->row); @@ -451,7 +451,7 @@ dri_swap_buffers(__DRIdrawable * dPriv) GET_CURRENT_CONTEXT(ctx); struct dri_drawable *drawable = dri_drawable(dPriv); - GLframebuffer *fb; + struct gl_framebuffer *fb; struct swrast_renderbuffer *frontrb, *backrb; TRACE; @@ -487,7 +487,7 @@ dri_swap_buffers(__DRIdrawable * dPriv) */ static void -get_window_size( GLframebuffer *fb, GLsizei *w, GLsizei *h ) +get_window_size( struct gl_framebuffer *fb, GLsizei *w, GLsizei *h ) { __DRIdrawable *dPriv = swrast_drawable(fb)->dPriv; __DRIscreen *sPriv = dPriv->driScreenPriv; @@ -499,7 +499,7 @@ get_window_size( GLframebuffer *fb, GLsizei *w, GLsizei *h ) } static void -swrast_check_and_update_window_size( GLcontext *ctx, GLframebuffer *fb ) +swrast_check_and_update_window_size( GLcontext *ctx, struct gl_framebuffer *fb ) { GLsizei width, height; @@ -536,8 +536,8 @@ update_state( GLcontext *ctx, GLuint new_state ) static void viewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h) { - GLframebuffer *draw = ctx->WinSysDrawBuffer; - GLframebuffer *read = ctx->WinSysReadBuffer; + struct gl_framebuffer *draw = ctx->WinSysDrawBuffer; + struct gl_framebuffer *read = ctx->WinSysReadBuffer; swrast_check_and_update_window_size(ctx, draw); swrast_check_and_update_window_size(ctx, read); @@ -665,8 +665,8 @@ dri_make_current(__DRIcontext * cPriv, __DRIdrawable * driReadPriv) { GLcontext *mesaCtx; - GLframebuffer *mesaDraw; - GLframebuffer *mesaRead; + struct gl_framebuffer *mesaDraw; + struct gl_framebuffer *mesaRead; TRACE; if (cPriv) { diff --git a/src/mesa/drivers/dri/swrast/swrast_priv.h b/src/mesa/drivers/dri/swrast/swrast_priv.h index 6679061a983..054bdba27b6 100644 --- a/src/mesa/drivers/dri/swrast/swrast_priv.h +++ b/src/mesa/drivers/dri/swrast/swrast_priv.h @@ -79,7 +79,7 @@ swrast_context(GLcontext *ctx) struct dri_drawable { /* mesa, base class, must be first */ - GLframebuffer Base; + struct gl_framebuffer Base; /* dri */ __DRIdrawable *dPriv; @@ -95,7 +95,7 @@ dri_drawable(__DRIdrawable * driDrawPriv) } static INLINE struct dri_drawable * -swrast_drawable(GLframebuffer *fb) +swrast_drawable(struct gl_framebuffer *fb) { return (struct dri_drawable *) fb; } diff --git a/src/mesa/drivers/dri/tdfx/tdfx_context.c b/src/mesa/drivers/dri/tdfx/tdfx_context.c index 18c626c454e..adefc1472a7 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_context.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_context.c @@ -651,8 +651,8 @@ tdfxMakeCurrent( __DRIcontext *driContextPriv, * dispatch is set correctly. */ _mesa_make_current( newCtx, - (GLframebuffer *) driDrawPriv->driverPrivate, - (GLframebuffer *) driReadPriv->driverPrivate ); + (struct gl_framebuffer *) driDrawPriv->driverPrivate, + (struct gl_framebuffer *) driReadPriv->driverPrivate ); return GL_TRUE; } /* [dBorca] tunnel2 requires this */ @@ -689,8 +689,8 @@ tdfxMakeCurrent( __DRIcontext *driContextPriv, } _mesa_make_current( newCtx, - (GLframebuffer *) driDrawPriv->driverPrivate, - (GLframebuffer *) driReadPriv->driverPrivate ); + (struct gl_framebuffer *) driDrawPriv->driverPrivate, + (struct gl_framebuffer *) driReadPriv->driverPrivate ); } else { _mesa_make_current( NULL, NULL, NULL ); } diff --git a/src/mesa/drivers/dri/tdfx/tdfx_screen.c b/src/mesa/drivers/dri/tdfx/tdfx_screen.c index c9ca4fc6378..084560ff87d 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_screen.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_screen.c @@ -227,7 +227,7 @@ tdfxCreateBuffer( __DRIscreen *driScrnPriv, static void tdfxDestroyBuffer(__DRIdrawable *driDrawPriv) { - _mesa_reference_framebuffer((GLframebuffer **)(&(driDrawPriv->driverPrivate)), NULL); + _mesa_reference_framebuffer((struct gl_framebuffer **)(&(driDrawPriv->driverPrivate)), NULL); } @@ -237,13 +237,13 @@ tdfxSwapBuffers( __DRIdrawable *driDrawPriv ) { GET_CURRENT_CONTEXT(ctx); tdfxContextPtr fxMesa = 0; - GLframebuffer *mesaBuffer; + struct gl_framebuffer *mesaBuffer; if ( TDFX_DEBUG & DEBUG_VERBOSE_DRI ) { fprintf( stderr, "%s( %p )\n", __FUNCTION__, (void *)driDrawPriv ); } - mesaBuffer = (GLframebuffer *) driDrawPriv->driverPrivate; + mesaBuffer = (struct gl_framebuffer *) driDrawPriv->driverPrivate; if ( !mesaBuffer->Visual.doubleBufferMode ) return; /* can't swap a single-buffered window */ diff --git a/src/mesa/drivers/dri/unichrome/via_context.c b/src/mesa/drivers/dri/unichrome/via_context.c index 3305e934a57..5e6e271b458 100644 --- a/src/mesa/drivers/dri/unichrome/via_context.c +++ b/src/mesa/drivers/dri/unichrome/via_context.c @@ -352,7 +352,7 @@ calculate_buffer_parameters(struct via_context *vmesa, } -void viaReAllocateBuffers(GLcontext *ctx, GLframebuffer *drawbuffer, +void viaReAllocateBuffers(GLcontext *ctx, struct gl_framebuffer *drawbuffer, GLuint width, GLuint height) { struct via_context *vmesa = VIA_CONTEXT(ctx); @@ -833,8 +833,8 @@ viaMakeCurrent(__DRIcontext *driContextPriv, GLcontext *ctx = vmesa->glCtx; struct gl_framebuffer *drawBuffer, *readBuffer; - drawBuffer = (GLframebuffer *)driDrawPriv->driverPrivate; - readBuffer = (GLframebuffer *)driReadPriv->driverPrivate; + drawBuffer = (struct gl_framebuffer *)driDrawPriv->driverPrivate; + readBuffer = (struct gl_framebuffer *)driReadPriv->driverPrivate; if ((vmesa->driDrawable != driDrawPriv) || (vmesa->driReadable != driReadPriv)) { diff --git a/src/mesa/drivers/dri/unichrome/via_context.h b/src/mesa/drivers/dri/unichrome/via_context.h index 4e1ab3a6ca7..4e3bed342dd 100644 --- a/src/mesa/drivers/dri/unichrome/via_context.h +++ b/src/mesa/drivers/dri/unichrome/via_context.h @@ -394,7 +394,7 @@ extern void viaEmitHwStateLocked(struct via_context *vmesa); extern void viaEmitScissorValues(struct via_context *vmesa, int box_nr, int emit); extern void viaXMesaSetBackClipRects(struct via_context *vmesa); extern void viaXMesaSetFrontClipRects(struct via_context *vmesa); -extern void viaReAllocateBuffers(GLcontext *ctx, GLframebuffer *drawbuffer, GLuint width, GLuint height); +extern void viaReAllocateBuffers(GLcontext *ctx, struct gl_framebuffer *drawbuffer, GLuint width, GLuint height); extern void viaXMesaWindowMoved(struct via_context *vmesa); extern GLboolean viaTexCombineState(struct via_context *vmesa, diff --git a/src/mesa/drivers/dri/unichrome/via_screen.c b/src/mesa/drivers/dri/unichrome/via_screen.c index e6aa7b6b839..9ea656cf023 100644 --- a/src/mesa/drivers/dri/unichrome/via_screen.c +++ b/src/mesa/drivers/dri/unichrome/via_screen.c @@ -311,7 +311,7 @@ viaCreateBuffer(__DRIscreen *driScrnPriv, static void viaDestroyBuffer(__DRIdrawable *driDrawPriv) { - _mesa_reference_framebuffer((GLframebuffer **)(&(driDrawPriv->driverPrivate)), NULL); + _mesa_reference_framebuffer((struct gl_framebuffer **)(&(driDrawPriv->driverPrivate)), NULL); } static const __DRIconfig ** diff --git a/src/mesa/drivers/fbdev/glfbdev.c b/src/mesa/drivers/fbdev/glfbdev.c index b3bb71525eb..fd3432a9832 100644 --- a/src/mesa/drivers/fbdev/glfbdev.c +++ b/src/mesa/drivers/fbdev/glfbdev.c @@ -83,10 +83,10 @@ struct GLFBDevVisualRec { }; /** - * Derived from Mesa's GLframebuffer class. + * Derived from Mesa's struct gl_framebuffer class. */ struct GLFBDevBufferRec { - GLframebuffer glframebuffer; /* base class */ + struct gl_framebuffer glframebuffer; /* base class */ GLFBDevVisualPtr visual; struct fb_fix_screeninfo fix; struct fb_var_screeninfo var; @@ -146,7 +146,7 @@ update_state( GLcontext *ctx, GLuint new_state ) static void -get_buffer_size( GLframebuffer *buffer, GLuint *width, GLuint *height ) +get_buffer_size( struct gl_framebuffer *buffer, GLuint *width, GLuint *height ) { const GLFBDevBufferPtr fbdevbuffer = (GLFBDevBufferPtr) buffer; *width = fbdevbuffer->var.xres; @@ -162,7 +162,7 @@ static void viewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h) { GLuint newWidth, newHeight; - GLframebuffer *buffer; + struct gl_framebuffer *buffer; buffer = ctx->WinSysDrawBuffer; get_buffer_size( buffer, &newWidth, &newHeight ); diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c index a04dc6d8a9b..4b264539cb6 100644 --- a/src/mesa/drivers/osmesa/osmesa.c +++ b/src/mesa/drivers/osmesa/osmesa.c @@ -64,7 +64,7 @@ struct osmesa_context GLcontext mesa; /*< Base class - this must be first */ struct gl_config *gl_visual; /*< Describes the buffers */ struct gl_renderbuffer *rb; /*< The user's colorbuffer */ - GLframebuffer *gl_buffer; /*< The framebuffer, containing user's rb */ + struct gl_framebuffer *gl_buffer; /*< The framebuffer, containing user's rb */ GLenum format; /*< User-specified context format */ GLint userRowLength; /*< user-specified number of pixels per row */ GLint rInd, gInd, bInd, aInd;/*< index offsets for RGBA formats */ diff --git a/src/mesa/drivers/windows/gdi/wmesa.c b/src/mesa/drivers/windows/gdi/wmesa.c index 1a71ef45596..39d27044175 100644 --- a/src/mesa/drivers/windows/gdi/wmesa.c +++ b/src/mesa/drivers/windows/gdi/wmesa.c @@ -83,9 +83,9 @@ wmesa_lookup_framebuffer(HDC hdc) /** - * Given a GLframebuffer, return the corresponding WMesaFramebuffer. + * Given a struct gl_framebuffer, return the corresponding WMesaFramebuffer. */ -static WMesaFramebuffer wmesa_framebuffer(GLframebuffer *fb) +static WMesaFramebuffer wmesa_framebuffer(struct gl_framebuffer *fb) { return (WMesaFramebuffer) fb; } @@ -217,7 +217,7 @@ get_window_size(HDC hdc, GLuint *width, GLuint *height) static void -wmesa_get_buffer_size(GLframebuffer *buffer, GLuint *width, GLuint *height) +wmesa_get_buffer_size(struct gl_framebuffer *buffer, GLuint *width, GLuint *height) { WMesaFramebuffer pwfb = wmesa_framebuffer(buffer); get_window_size(pwfb->hDC, width, height); @@ -1320,7 +1320,7 @@ void wmesa_set_renderbuffer_funcs(struct gl_renderbuffer *rb, int pixelformat, * Resize the front/back colorbuffers to match the latest window size. */ static void -wmesa_resize_buffers(GLcontext *ctx, GLframebuffer *buffer, +wmesa_resize_buffers(GLcontext *ctx, struct gl_framebuffer *buffer, GLuint width, GLuint height) { WMesaContext pwc = wmesa_context(ctx); diff --git a/src/mesa/drivers/windows/gldirect/dglcontext.h b/src/mesa/drivers/windows/gldirect/dglcontext.h index c92169bd9fb..f46d83eab0f 100644 --- a/src/mesa/drivers/windows/gldirect/dglcontext.h +++ b/src/mesa/drivers/windows/gldirect/dglcontext.h @@ -89,7 +89,7 @@ typedef struct { // Mesa vars: GLcontext *glCtx; // The core Mesa context struct gl_config *glVis; // Describes the color buffer - GLframebuffer *glBuffer; // Ancillary buffers + struct gl_framebuffer *glBuffer; // Ancillary buffers GLuint ClearIndex; GLuint CurrentIndex; @@ -137,7 +137,7 @@ typedef struct { // GLcontext *glCtx; // The core Mesa context struct gl_config *glVis; // Describes the color buffer - GLframebuffer *glBuffer; // Ancillary buffers + struct gl_framebuffer *glBuffer; // Ancillary buffers GLuint ClearIndex; GLuint CurrentIndex; diff --git a/src/mesa/drivers/windows/gldirect/dx7/gld_driver_dx7.c b/src/mesa/drivers/windows/gldirect/dx7/gld_driver_dx7.c index 7b202dfda70..4a38b35adf3 100644 --- a/src/mesa/drivers/windows/gldirect/dx7/gld_driver_dx7.c +++ b/src/mesa/drivers/windows/gldirect/dx7/gld_driver_dx7.c @@ -238,7 +238,7 @@ static GLboolean gld_set_draw_buffer_DX7( static void gld_set_read_buffer_DX7( GLcontext *ctx, - GLframebuffer *buffer, + struct gl_framebuffer *buffer, GLenum mode) { /* separate read buffer not supported */ @@ -343,7 +343,7 @@ void gld_Clear_DX7( // Mesa 5: Parameter change static void gld_buffer_size_DX7( // GLcontext *ctx, - GLframebuffer *fb, + struct gl_framebuffer *fb, GLuint *width, GLuint *height) { @@ -1058,7 +1058,7 @@ extern BOOL dglWglResizeBuffers(GLcontext *ctx, BOOL bDefaultDriver); // Mesa 5: Parameter change void gldResizeBuffers_DX7( // GLcontext *ctx) - GLframebuffer *fb) + struct gl_framebuffer *fb) { GET_CURRENT_CONTEXT(ctx); dglWglResizeBuffers(ctx, TRUE); diff --git a/src/mesa/drivers/windows/gldirect/dx7/gld_dx7.h b/src/mesa/drivers/windows/gldirect/dx7/gld_dx7.h index b5a491e41b1..6f549c9d196 100644 --- a/src/mesa/drivers/windows/gldirect/dx7/gld_dx7.h +++ b/src/mesa/drivers/windows/gldirect/dx7/gld_dx7.h @@ -228,7 +228,7 @@ PROC gldGetProcAddress_DX7(LPCSTR a); void gldEnableExtensions_DX7(GLcontext *ctx); void gldInstallPipeline_DX7(GLcontext *ctx); void gldSetupDriverPointers_DX7(GLcontext *ctx); -void gldResizeBuffers_DX7(GLframebuffer *fb); +void gldResizeBuffers_DX7(struct gl_framebuffer *fb); // Texture functions diff --git a/src/mesa/drivers/windows/gldirect/dx8/gld_driver_dx8.c b/src/mesa/drivers/windows/gldirect/dx8/gld_driver_dx8.c index 7eeb9db2d15..e2793ba557a 100644 --- a/src/mesa/drivers/windows/gldirect/dx8/gld_driver_dx8.c +++ b/src/mesa/drivers/windows/gldirect/dx8/gld_driver_dx8.c @@ -238,7 +238,7 @@ static GLboolean gld_set_draw_buffer_DX8( static void gld_set_read_buffer_DX8( GLcontext *ctx, - GLframebuffer *buffer, + struct gl_framebuffer *buffer, GLenum mode) { /* separate read buffer not supported */ @@ -343,7 +343,7 @@ void gld_Clear_DX8( // Mesa 5: Parameter change static void gld_buffer_size_DX8( // GLcontext *ctx, - GLframebuffer *fb, + struct gl_framebuffer *fb, GLuint *width, GLuint *height) { @@ -1038,7 +1038,7 @@ extern BOOL dglWglResizeBuffers(GLcontext *ctx, BOOL bDefaultDriver); // Mesa 5: Parameter change void gldResizeBuffers_DX8( // GLcontext *ctx) - GLframebuffer *fb) + struct gl_framebuffer *fb) { GET_CURRENT_CONTEXT(ctx); dglWglResizeBuffers(ctx, TRUE); diff --git a/src/mesa/drivers/windows/gldirect/dx8/gld_dx8.h b/src/mesa/drivers/windows/gldirect/dx8/gld_dx8.h index 7efec7cae80..2446d906360 100644 --- a/src/mesa/drivers/windows/gldirect/dx8/gld_dx8.h +++ b/src/mesa/drivers/windows/gldirect/dx8/gld_dx8.h @@ -260,7 +260,7 @@ void gldEnableExtensions_DX8(GLcontext *ctx); void gldInstallPipeline_DX8(GLcontext *ctx); void gldSetupDriverPointers_DX8(GLcontext *ctx); //void gldResizeBuffers_DX8(GLcontext *ctx); -void gldResizeBuffers_DX8(GLframebuffer *fb); +void gldResizeBuffers_DX8(struct gl_framebuffer *fb); // Texture functions diff --git a/src/mesa/drivers/windows/gldirect/dx9/gld_driver_dx9.c b/src/mesa/drivers/windows/gldirect/dx9/gld_driver_dx9.c index 0558462dea0..0186b268324 100644 --- a/src/mesa/drivers/windows/gldirect/dx9/gld_driver_dx9.c +++ b/src/mesa/drivers/windows/gldirect/dx9/gld_driver_dx9.c @@ -238,7 +238,7 @@ static GLboolean gld_set_draw_buffer_DX9( static void gld_set_read_buffer_DX9( GLcontext *ctx, - GLframebuffer *buffer, + struct gl_framebuffer *buffer, GLenum mode) { /* separate read buffer not supported */ @@ -341,7 +341,7 @@ void gld_Clear_DX9( // Mesa 5: Parameter change static void gld_buffer_size_DX9( // GLcontext *ctx, - GLframebuffer *fb, + struct gl_framebuffer *fb, GLuint *width, GLuint *height) { @@ -1068,7 +1068,7 @@ extern BOOL dglWglResizeBuffers(GLcontext *ctx, BOOL bDefaultDriver); // Mesa 5: Parameter change void gldResizeBuffers_DX9( // GLcontext *ctx) - GLframebuffer *fb) + struct gl_framebuffer *fb) { GET_CURRENT_CONTEXT(ctx); dglWglResizeBuffers(ctx, TRUE); diff --git a/src/mesa/drivers/windows/gldirect/dx9/gld_dx9.h b/src/mesa/drivers/windows/gldirect/dx9/gld_dx9.h index aec40ac9dd1..201595f7247 100644 --- a/src/mesa/drivers/windows/gldirect/dx9/gld_dx9.h +++ b/src/mesa/drivers/windows/gldirect/dx9/gld_dx9.h @@ -263,7 +263,7 @@ void gldEnableExtensions_DX9(GLcontext *ctx); void gldInstallPipeline_DX9(GLcontext *ctx); void gldSetupDriverPointers_DX9(GLcontext *ctx); //void gldResizeBuffers_DX9(GLcontext *ctx); -void gldResizeBuffers_DX9(GLframebuffer *fb); +void gldResizeBuffers_DX9(struct gl_framebuffer *fb); // Texture functions diff --git a/src/mesa/drivers/windows/gldirect/mesasw/gld_wgl_mesasw.c b/src/mesa/drivers/windows/gldirect/mesasw/gld_wgl_mesasw.c index f927abfa115..b3c2026475d 100644 --- a/src/mesa/drivers/windows/gldirect/mesasw/gld_wgl_mesasw.c +++ b/src/mesa/drivers/windows/gldirect/mesasw/gld_wgl_mesasw.c @@ -828,7 +828,7 @@ static GLboolean set_draw_buffer( GLcontext* ctx, GLenum mode ) //--------------------------------------------------------------------------- -static void set_read_buffer(GLcontext *ctx, GLframebuffer *colorBuffer, +static void set_read_buffer(GLcontext *ctx, struct gl_framebuffer *colorBuffer, GLenum buffer ) { /* XXX todo */ @@ -843,7 +843,7 @@ static void set_read_buffer(GLcontext *ctx, GLframebuffer *colorBuffer, //static void buffer_size( GLcontext* ctx, GLuint *width, GLuint *height ) // Altered for Mesa 5.x. KeithH static void buffer_size( - GLframebuffer *buffer, + struct gl_framebuffer *buffer, GLuint *width, GLuint *height) { diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c index 984caa4f0a1..f091c38bc41 100644 --- a/src/mesa/drivers/x11/xm_api.c +++ b/src/mesa/drivers/x11/xm_api.c @@ -349,7 +349,7 @@ XMesaBuffer XMesaBufferList = NULL; /** * Allocate a new XMesaBuffer object which corresponds to the given drawable. - * Note that XMesaBuffer is derived from GLframebuffer. + * Note that XMesaBuffer is derived from struct gl_framebuffer. * The new XMesaBuffer will not have any size (Width=Height=0). * * \param d the corresponding X drawable (window or pixmap) @@ -1788,7 +1788,7 @@ XMesaDestroyBuffer(XMesaBuffer b) /** - * Query the current window size and update the corresponding GLframebuffer + * Query the current window size and update the corresponding struct gl_framebuffer * and all attached renderbuffers. * Called when: * 1. the first time a buffer is bound to a context. diff --git a/src/mesa/drivers/x11/xmesaP.h b/src/mesa/drivers/x11/xmesaP.h index 8b75f99e8d2..37b7a587dee 100644 --- a/src/mesa/drivers/x11/xmesaP.h +++ b/src/mesa/drivers/x11/xmesaP.h @@ -205,7 +205,7 @@ struct xmesa_renderbuffer * Basically corresponds to a GLXDrawable. */ struct xmesa_buffer { - GLframebuffer mesa_buffer; /* depth, stencil, accum, etc buffers */ + struct gl_framebuffer mesa_buffer; /* depth, stencil, accum, etc buffers */ /* This MUST BE FIRST! */ GLboolean wasCurrent; /* was ever the current buffer? */ XMesaVisual xm_visual; /* the X/Mesa visual */ @@ -553,11 +553,11 @@ XMESA_CONTEXT(GLcontext *ctx) /** - * Return pointer to XMesaBuffer corresponding to a Mesa GLframebuffer. + * Return pointer to XMesaBuffer corresponding to a Mesa struct gl_framebuffer. * Since we're using structure containment, it's just a cast!. */ static INLINE XMesaBuffer -XMESA_BUFFER(GLframebuffer *b) +XMESA_BUFFER(struct gl_framebuffer *b) { return (XMesaBuffer) b; } diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index f8ffdc25dbb..0ecbea2c514 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -1291,7 +1291,7 @@ _mesa_copy_context( const GLcontext *src, GLcontext *dst, GLuint mask ) * \return GL_TRUE if compatible, GL_FALSE otherwise. */ static GLboolean -check_compatible(const GLcontext *ctx, const GLframebuffer *buffer) +check_compatible(const GLcontext *ctx, const struct gl_framebuffer *buffer) { const struct gl_config *ctxvis = &ctx->Visual; const struct gl_config *bufvis = &buffer->Visual; @@ -1340,7 +1340,7 @@ check_compatible(const GLcontext *ctx, const GLframebuffer *buffer) * Really, the device driver should totally take care of this. */ static void -initialize_framebuffer_size(GLcontext *ctx, GLframebuffer *fb) +initialize_framebuffer_size(GLcontext *ctx, struct gl_framebuffer *fb) { GLuint width, height; if (ctx->Driver.GetBufferSize) { @@ -1385,8 +1385,8 @@ _mesa_check_init_viewport(GLcontext *ctx, GLuint width, GLuint height) * \param readBuffer the reading framebuffer */ GLboolean -_mesa_make_current( GLcontext *newCtx, GLframebuffer *drawBuffer, - GLframebuffer *readBuffer ) +_mesa_make_current( GLcontext *newCtx, struct gl_framebuffer *drawBuffer, + struct gl_framebuffer *readBuffer ) { if (MESA_VERBOSE & VERBOSE_API) _mesa_debug(newCtx, "_mesa_make_current()\n"); diff --git a/src/mesa/main/context.h b/src/mesa/main/context.h index 969c07e53c0..d89ae36a5c3 100644 --- a/src/mesa/main/context.h +++ b/src/mesa/main/context.h @@ -32,13 +32,13 @@ * - GLcontext: this contains the Mesa rendering state * - struct gl_config: this describes the color buffer (RGB vs. ci), whether or not * there's a depth buffer, stencil buffer, etc. - * - GLframebuffer: contains pointers to the depth buffer, stencil buffer, + * - struct gl_framebuffer: contains pointers to the depth buffer, stencil buffer, * accum buffer and alpha buffers. * * These types should be encapsulated by corresponding device driver * data types. See xmesa.h and xmesaP.h for an example. * - * In OOP terms, GLcontext, struct gl_config, and GLframebuffer are base classes + * In OOP terms, GLcontext, struct gl_config, and struct gl_framebuffer are base classes * which the device driver must derive from. * * The following functions create and destroy these data types. @@ -142,8 +142,8 @@ extern void _mesa_check_init_viewport(GLcontext *ctx, GLuint width, GLuint height); extern GLboolean -_mesa_make_current( GLcontext *ctx, GLframebuffer *drawBuffer, - GLframebuffer *readBuffer ); +_mesa_make_current( GLcontext *ctx, struct gl_framebuffer *drawBuffer, + struct gl_framebuffer *readBuffer ); extern GLboolean _mesa_share_state(GLcontext *ctx, GLcontext *ctxToShare); diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h index 46d26cf901d..01ad2903df7 100644 --- a/src/mesa/main/dd.h +++ b/src/mesa/main/dd.h @@ -86,14 +86,14 @@ struct dd_function_table { * Mesa uses this to determine when the driver's window size has changed. * XXX OBSOLETE: this function will be removed in the future. */ - void (*GetBufferSize)( GLframebuffer *buffer, + void (*GetBufferSize)( struct gl_framebuffer *buffer, GLuint *width, GLuint *height ); /** * Resize the given framebuffer to the given size. * XXX OBSOLETE: this function will be removed in the future. */ - void (*ResizeBuffers)( GLcontext *ctx, GLframebuffer *fb, + void (*ResizeBuffers)( GLcontext *ctx, struct gl_framebuffer *fb, GLuint width, GLuint height); /** diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c index 64da8ba84f9..0e9e6def9b6 100644 --- a/src/mesa/main/framebuffer.c +++ b/src/mesa/main/framebuffer.c @@ -372,7 +372,7 @@ _mesa_resizebuffers( GLcontext *ctx ) if (ctx->WinSysDrawBuffer) { GLuint newWidth, newHeight; - GLframebuffer *buffer = ctx->WinSysDrawBuffer; + struct gl_framebuffer *buffer = ctx->WinSysDrawBuffer; assert(buffer->Name == 0); @@ -389,7 +389,7 @@ _mesa_resizebuffers( GLcontext *ctx ) if (ctx->WinSysReadBuffer && ctx->WinSysReadBuffer != ctx->WinSysDrawBuffer) { GLuint newWidth, newHeight; - GLframebuffer *buffer = ctx->WinSysReadBuffer; + struct gl_framebuffer *buffer = ctx->WinSysReadBuffer; assert(buffer->Name == 0); diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c index ce10b3b1f85..f83fcc725d8 100644 --- a/src/mesa/main/image.c +++ b/src/mesa/main/image.c @@ -5678,7 +5678,7 @@ _mesa_clip_drawpixels(const GLcontext *ctx, GLsizei *width, GLsizei *height, struct gl_pixelstore_attrib *unpack) { - const GLframebuffer *buffer = ctx->DrawBuffer; + const struct gl_framebuffer *buffer = ctx->DrawBuffer; if (unpack->RowLength == 0) { unpack->RowLength = *width; @@ -5749,7 +5749,7 @@ _mesa_clip_readpixels(const GLcontext *ctx, GLsizei *width, GLsizei *height, struct gl_pixelstore_attrib *pack) { - const GLframebuffer *buffer = ctx->ReadBuffer; + const struct gl_framebuffer *buffer = ctx->ReadBuffer; if (pack->RowLength == 0) { pack->RowLength = *width; diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 901607adcc1..806a19d02a6 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -125,7 +125,6 @@ struct gl_texture_image; struct gl_texture_object; struct st_context; typedef struct __GLcontextRec GLcontext; -typedef struct gl_framebuffer GLframebuffer; /*@}*/ @@ -3062,10 +3061,10 @@ struct __GLcontextRec /*@}*/ struct gl_config Visual; - GLframebuffer *DrawBuffer; /**< buffer for writing */ - GLframebuffer *ReadBuffer; /**< buffer for reading */ - GLframebuffer *WinSysDrawBuffer; /**< set with MakeCurrent */ - GLframebuffer *WinSysReadBuffer; /**< set with MakeCurrent */ + struct gl_framebuffer *DrawBuffer; /**< buffer for writing */ + struct gl_framebuffer *ReadBuffer; /**< buffer for reading */ + struct gl_framebuffer *WinSysDrawBuffer; /**< set with MakeCurrent */ + struct gl_framebuffer *WinSysReadBuffer; /**< set with MakeCurrent */ /** * Device driver function pointer table diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c index ac1f6812b85..dd4e92e3c0e 100644 --- a/src/mesa/state_tracker/st_cb_fbo.c +++ b/src/mesa/state_tracker/st_cb_fbo.c @@ -547,7 +547,7 @@ static void st_DrawBuffers(GLcontext *ctx, GLsizei count, const GLenum *buffers) { struct st_context *st = st_context(ctx); - GLframebuffer *fb = ctx->DrawBuffer; + struct gl_framebuffer *fb = ctx->DrawBuffer; GLuint i; (void) count; @@ -568,7 +568,7 @@ static void st_ReadBuffer(GLcontext *ctx, GLenum buffer) { struct st_context *st = st_context(ctx); - GLframebuffer *fb = ctx->ReadBuffer; + struct gl_framebuffer *fb = ctx->ReadBuffer; (void) buffer; diff --git a/src/mesa/state_tracker/st_cb_flush.c b/src/mesa/state_tracker/st_cb_flush.c index 8c9959f9544..7b247e0a32b 100644 --- a/src/mesa/state_tracker/st_cb_flush.c +++ b/src/mesa/state_tracker/st_cb_flush.c @@ -51,7 +51,7 @@ static INLINE GLboolean is_front_buffer_dirty(struct st_context *st) { - GLframebuffer *fb = st->ctx->DrawBuffer; + struct gl_framebuffer *fb = st->ctx->DrawBuffer; struct st_renderbuffer *strb = st_renderbuffer(fb->Attachment[BUFFER_FRONT_LEFT].Renderbuffer); return strb && strb->defined; @@ -64,7 +64,7 @@ is_front_buffer_dirty(struct st_context *st) static void display_front_buffer(struct st_context *st) { - GLframebuffer *fb = st->ctx->DrawBuffer; + struct gl_framebuffer *fb = st->ctx->DrawBuffer; struct st_renderbuffer *strb = st_renderbuffer(fb->Attachment[BUFFER_FRONT_LEFT].Renderbuffer); diff --git a/src/mesa/state_tracker/st_cb_viewport.c b/src/mesa/state_tracker/st_cb_viewport.c index a1fe45cac46..c4076b665cc 100644 --- a/src/mesa/state_tracker/st_cb_viewport.c +++ b/src/mesa/state_tracker/st_cb_viewport.c @@ -34,13 +34,13 @@ #include "util/u_atomic.h" /** - * Cast wrapper to convert a GLframebuffer to an st_framebuffer. - * Return NULL if the GLframebuffer is a user-created framebuffer. + * Cast wrapper to convert a struct gl_framebuffer to an st_framebuffer. + * Return NULL if the struct gl_framebuffer is a user-created framebuffer. * We'll only return non-null for window system framebuffers. * Note that this function may fail. */ static INLINE struct st_framebuffer * -st_ws_framebuffer(GLframebuffer *fb) +st_ws_framebuffer(struct gl_framebuffer *fb) { /* FBO cannot be casted. See st_new_framebuffer */ return (struct st_framebuffer *) ((fb && !fb->Name) ? fb : NULL); diff --git a/src/mesa/state_tracker/st_context.h b/src/mesa/state_tracker/st_context.h index ef2338817c6..ef75c2c4b15 100644 --- a/src/mesa/state_tracker/st_context.h +++ b/src/mesa/state_tracker/st_context.h @@ -202,12 +202,12 @@ static INLINE struct st_context *st_context(GLcontext *ctx) /** - * Wrapper for GLframebuffer. + * Wrapper for struct gl_framebuffer. * This is an opaque type to the outside world. */ struct st_framebuffer { - GLframebuffer Base; + struct gl_framebuffer Base; void *Private; struct st_framebuffer_iface *iface; diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c index 0592dd111d9..a307bb9dc16 100644 --- a/src/mesa/state_tracker/st_manager.c +++ b/src/mesa/state_tracker/st_manager.c @@ -54,13 +54,13 @@ #include "st_manager.h" /** - * Cast wrapper to convert a GLframebuffer to an st_framebuffer. - * Return NULL if the GLframebuffer is a user-created framebuffer. + * Cast wrapper to convert a struct gl_framebuffer to an st_framebuffer. + * Return NULL if the struct gl_framebuffer is a user-created framebuffer. * We'll only return non-null for window system framebuffers. * Note that this function may fail. */ static INLINE struct st_framebuffer * -st_ws_framebuffer(GLframebuffer *fb) +st_ws_framebuffer(struct gl_framebuffer *fb) { /* FBO cannot be casted. See st_new_framebuffer */ return (struct st_framebuffer *) ((fb && !fb->Name) ? fb : NULL); @@ -429,7 +429,7 @@ st_framebuffer_create(struct st_framebuffer_iface *stfbi) /* for FBO-only context */ if (!stfbi) { - GLframebuffer *base = _mesa_get_incomplete_framebuffer(); + struct gl_framebuffer *base = _mesa_get_incomplete_framebuffer(); stfb->Base = *base; @@ -471,8 +471,8 @@ static void st_framebuffer_reference(struct st_framebuffer **ptr, struct st_framebuffer *stfb) { - GLframebuffer *fb = &stfb->Base; - _mesa_reference_framebuffer((GLframebuffer **) ptr, fb); + struct gl_framebuffer *fb = &stfb->Base; + _mesa_reference_framebuffer((struct gl_framebuffer **) ptr, fb); } static void @@ -832,7 +832,7 @@ st_manager_validate_framebuffers(struct st_context *st) * Add a color renderbuffer on demand. */ boolean -st_manager_add_color_renderbuffer(struct st_context *st, GLframebuffer *fb, +st_manager_add_color_renderbuffer(struct st_context *st, struct gl_framebuffer *fb, gl_buffer_index idx) { struct st_framebuffer *stfb = st_ws_framebuffer(fb); diff --git a/src/mesa/state_tracker/st_manager.h b/src/mesa/state_tracker/st_manager.h index 48a9d4d99a6..6a94978390a 100644 --- a/src/mesa/state_tracker/st_manager.h +++ b/src/mesa/state_tracker/st_manager.h @@ -46,7 +46,7 @@ void st_manager_validate_framebuffers(struct st_context *st); boolean -st_manager_add_color_renderbuffer(struct st_context *st, GLframebuffer *fb, +st_manager_add_color_renderbuffer(struct st_context *st, struct gl_framebuffer *fb, gl_buffer_index idx); #endif /* ST_MANAGER_H */ |