summaryrefslogtreecommitdiff
path: root/src/mesa/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/osmesa/osmesa.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c
index eb0515d3d4..20847f6286 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 { \