summaryrefslogtreecommitdiff
path: root/src/mesa/swrast/s_bitmap.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2004-03-13 18:21:40 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2004-03-13 18:21:40 +0000
commit7a6b71ef2944bae1718e8167b2faaceb8422071c (patch)
tree3fb3435f3728f09486d455f6060f06dd42fe0e80 /src/mesa/swrast/s_bitmap.c
parent5498e8b9f34718aba506421988116ccb1e5e3de7 (diff)
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.
Diffstat (limited to 'src/mesa/swrast/s_bitmap.c')
-rw-r--r--src/mesa/swrast/s_bitmap.c13
1 files changed, 10 insertions, 3 deletions
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);