From 7a6b71ef2944bae1718e8167b2faaceb8422071c Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sat, 13 Mar 2004 18:21:40 +0000 Subject: Implementation of GL_EXT_pixel_buffer_object extension. Note: extension may not be finalized yet - subject to change! Note: implementation not fully suitable for h/w implementation yet. --- src/mesa/swrast/s_bitmap.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/mesa/swrast/s_bitmap.c') diff --git a/src/mesa/swrast/s_bitmap.c b/src/mesa/swrast/s_bitmap.c index aeacba88ea..6c8f515b62 100644 --- a/src/mesa/swrast/s_bitmap.c +++ b/src/mesa/swrast/s_bitmap.c @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 5.1 + * Version: 6.1 * - * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2004 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"), @@ -53,7 +53,14 @@ _swrast_Bitmap( GLcontext *ctx, GLint px, GLint py, struct sw_span span; ASSERT(ctx->RenderMode == GL_RENDER); - ASSERT(bitmap); + + bitmap = _swrast_validate_pbo_access(unpack, width, height, 1, + GL_COLOR_INDEX, GL_BITMAP, + (GLvoid *) bitmap); + if (!bitmap) { + /* XXX GL_INVALID_OPERATION? */ + return; + } RENDER_START(swrast,ctx); -- cgit v1.2.3