diff options
author | Brian Paul <[email protected]> | 2006-04-27 02:47:50 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2006-04-27 02:47:50 +0000 |
commit | 444cd293fd69d1848b2c55f75674d563e0582fba (patch) | |
tree | ce51213e692848ac0bf234e17bcf3136817ddf59 /src/mesa/drivers/x11/xmesaP.h | |
parent | e814d5e89f10de0c20a5c35e317eeab89b47749b (diff) |
assorted clean-ups, fixes
Diffstat (limited to 'src/mesa/drivers/x11/xmesaP.h')
-rw-r--r-- | src/mesa/drivers/x11/xmesaP.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mesa/drivers/x11/xmesaP.h b/src/mesa/drivers/x11/xmesaP.h index 9d4e6946090..bcac0557b98 100644 --- a/src/mesa/drivers/x11/xmesaP.h +++ b/src/mesa/drivers/x11/xmesaP.h @@ -480,12 +480,14 @@ extern const int xmesa_kernel1[16]; /* * Return pointer to XMesaContext corresponding to a Mesa GLcontext. * Since we're using structure containment, it's just a cast!. + * XXX should use inlined function for better type safety. */ #define XMESA_CONTEXT(MESACTX) ((XMesaContext) (MESACTX)) /* * Return pointer to XMesaBuffer corresponding to a Mesa GLframebuffer. * Since we're using structure containment, it's just a cast!. + * XXX should use inlined function for better type safety. */ #define XMESA_BUFFER(MESABUFF) ((XMesaBuffer) (MESABUFF)) @@ -520,6 +522,16 @@ xmesa_set_renderbuffer_funcs(struct xmesa_renderbuffer *xrb, enum pixel_format pixelformat, GLint depth); +/** + * Using a function instead of an ordinary cast is safer. + */ +static INLINE struct xmesa_renderbuffer * +xmesa_renderbuffer(struct gl_renderbuffer *rb) +{ + return (struct xmesa_renderbuffer *) rb; +} + + /* Plugged into the software rasterizer. Try to use internal * swrast-style point, line and triangle functions. */ |