diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2002-06-30 16:07:18 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2002-06-30 16:07:18 +0000 |
commit | 4336c28c843923db3d9c8dc0a0cb2440ba94f064 (patch) | |
tree | c10864864cb23ee6aaea0de359f66929a8da3bd8 /src | |
parent | e201bef913bbb869e9c4012fcfff2406e9d55393 (diff) |
CHAN_TYPE==GL_FLOAT clamping. call _tnl_MakeCurrent. (Gerk Huisma)
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/osmesa/osmesa.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c index eb0515d3d47..20847f62861 100644 --- a/src/mesa/drivers/osmesa/osmesa.c +++ b/src/mesa/drivers/osmesa/osmesa.c @@ -1,4 +1,4 @@ -/* $Id: osmesa.c,v 1.84 2002/06/25 15:25:17 brianp Exp $ */ +/* $Id: osmesa.c,v 1.85 2002/06/30 16:07:18 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -488,6 +488,10 @@ OSMesaMakeCurrent( OSMesaContext ctx, void *buffer, GLenum type, _mesa_ResizeBuffersMESA(); } + /* Added by Gerk Huisma: */ + _tnl_MakeCurrent( &ctx->gl_ctx, ctx->gl_ctx.DrawBuffer, + ctx->gl_ctx.ReadBuffer ); + return GL_TRUE; } @@ -666,6 +670,15 @@ OSMesaGetProcAddress( const char *funcName ) * Useful macros: */ +#if CHAN_TYPE == GL_FLOAT +#define PACK_RGBA(DST, R, G, B, A) \ +do { \ + (DST)[0] = (R < 0.0f) ? 0.0f : ((R > 1.0f) ? 1.0f : R); \ + (DST)[1] = (G < 0.0f) ? 0.0f : ((G > 1.0f) ? 1.0f : G); \ + (DST)[2] = (B < 0.0f) ? 0.0f : ((B > 1.0f) ? 1.0f : B); \ + (DST)[3] = (A < 0.0f) ? 0.0f : ((A > 1.0f) ? 1.0f : A); \ +} while (0) +#else #define PACK_RGBA(DST, R, G, B, A) \ do { \ (DST)[osmesa->rInd] = R; \ @@ -673,6 +686,7 @@ do { \ (DST)[osmesa->bInd] = B; \ (DST)[osmesa->aInd] = A; \ } while (0) +#endif #define PACK_RGB(DST, R, G, B) \ do { \ |