-/* $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
_mesa_ResizeBuffersMESA();
}
+ /* Added by Gerk Huisma: */
+ _tnl_MakeCurrent( &ctx->gl_ctx, ctx->gl_ctx.DrawBuffer,
+ ctx->gl_ctx.ReadBuffer );
+
return GL_TRUE;
}
* 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; \
(DST)[osmesa->bInd] = B; \
(DST)[osmesa->aInd] = A; \
} while (0)
+#endif
#define PACK_RGB(DST, R, G, B) \
do { \