diff options
author | Brian Paul <[email protected]> | 2003-04-01 17:28:10 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2003-04-01 17:28:10 +0000 |
commit | 1e24d3318df57b36e3b68695ff64b4b8bd822c9e (patch) | |
tree | f0cdd861ec97d7dd61fd4c3b28f44cced5f4346b /src/mesa/drivers/x11/xmesaP.h | |
parent | a3f137094cd965d27e1b088499dd609b81a91906 (diff) |
use structure containment to derive xmesa_context from GLcontext
Diffstat (limited to 'src/mesa/drivers/x11/xmesaP.h')
-rw-r--r-- | src/mesa/drivers/x11/xmesaP.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/mesa/drivers/x11/xmesaP.h b/src/mesa/drivers/x11/xmesaP.h index 46886eb9c61..5024e527c29 100644 --- a/src/mesa/drivers/x11/xmesaP.h +++ b/src/mesa/drivers/x11/xmesaP.h @@ -1,4 +1,4 @@ -/* $Id: xmesaP.h,v 1.35 2003/02/25 19:26:30 brianp Exp $ */ +/* $Id: xmesaP.h,v 1.36 2003/04/01 17:28:12 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -137,7 +137,7 @@ struct xmesa_visual { * "Derived" from __GLcontextRec. Basically corresponds to a GLXContext. */ struct xmesa_context { - GLcontext *gl_ctx; /* the core library context */ + GLcontext mesa; /* the core library context (containment) */ XMesaVisual xm_visual; /* Describes the buffers */ XMesaBuffer xm_draw_buffer; /* current draw framebuffer */ XMesaBuffer xm_read_buffer; /* current read framebuffer */ @@ -494,6 +494,15 @@ static int const kernel1[16] = { + +/* + * Return pointer to XMesaContext corresponding to a Mesa GLcontext. + * Since we're using structure containment, it's just a cast!. + */ +#define XMESA_CONTEXT(MESACTX) (XMesaContext) (MESACTX) + + + /* * External functions: */ |