From c6c0f947142c0cc82626c238804a68b4e8f53945 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 16 Mar 2006 18:05:25 +0000 Subject: Moved _glapi_check_multithread() call into drivers, instead of in _mesa_make_current(). This removes an ugly #if !defined(IN_DRI_DRIVER) from core Mesa. --- src/mesa/drivers/osmesa/osmesa.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/mesa/drivers/osmesa/osmesa.c') diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c index f4ab09c51a..c628d53391 100644 --- a/src/mesa/drivers/osmesa/osmesa.c +++ b/src/mesa/drivers/osmesa/osmesa.c @@ -2,7 +2,7 @@ * Mesa 3-D graphics library * Version: 6.5 * - * Copyright (C) 1999-2005 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -1051,6 +1051,12 @@ OSMesaMakeCurrent( OSMesaContext ctx, void *buffer, GLenum type, ctx->height = height; osmesa_update_state( &ctx->mesa, 0 ); + + /* Call this periodically to detect when the user has begun using + * GL rendering from multiple threads. + */ + _glapi_check_multithread(); + _mesa_make_current( &ctx->mesa, ctx->gl_buffer, ctx->gl_buffer ); if (ctx->userRowLength) -- cgit v1.2.3