diff options
author | Brian Paul <[email protected]> | 2004-04-22 00:27:31 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2004-04-22 00:27:31 +0000 |
commit | f959f6e1dc27c71fc0ccc56e09b29101b3bf3b97 (patch) | |
tree | 15b4171c2b3396e3a05f2776cc24d90cb37c8f84 /src/mesa/swrast | |
parent | 05a6f2fd484bab59c6e6a381f58808adc26619f1 (diff) |
New glTexImage code.
The gl_texture_format struct now has a StoreTexImageFunc that's called
by glTex[Sub]Image[123]D to convert the user's texture data into the
specific texture format layout. Now it's much easier to add new texture
formats (like the 16/32-bit floating point formats).
The texutil.[ch] and texutil_tmp.h files are obsolete.
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r-- | src/mesa/swrast/s_drawpix.c | 2 | ||||
-rw-r--r-- | src/mesa/swrast/s_readpix.c | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/mesa/swrast/s_drawpix.c b/src/mesa/swrast/s_drawpix.c index 337b5a5bfd4..a93a605a977 100644 --- a/src/mesa/swrast/s_drawpix.c +++ b/src/mesa/swrast/s_drawpix.c @@ -750,7 +750,7 @@ draw_rgba_pixels( GLcontext *ctx, GLint x, GLint y, INIT_SPAN(span, GL_BITMAP, 0, 0, SPAN_RGBA); - if (!_mesa_is_legal_format_and_type(format, type)) { + if (!_mesa_is_legal_format_and_type(ctx, format, type)) { _mesa_error(ctx, GL_INVALID_ENUM, "glDrawPixels(format or type)"); return; } diff --git a/src/mesa/swrast/s_readpix.c b/src/mesa/swrast/s_readpix.c index b5ab06e4ba6..80f737b052a 100644 --- a/src/mesa/swrast/s_readpix.c +++ b/src/mesa/swrast/s_readpix.c @@ -366,12 +366,18 @@ read_rgba_pixels( GLcontext *ctx, case GL_UNSIGNED_INT_2_10_10_10_REV: /* valid pixel type */ break; + case GL_HALF_FLOAT_ARB: + if (!ctx->Extensions.ARB_half_float_pixel) { + _mesa_error( ctx, GL_INVALID_ENUM, "glReadPixels(type)" ); + return; + } + break; default: _mesa_error( ctx, GL_INVALID_ENUM, "glReadPixels(type)" ); return; } - if (!_mesa_is_legal_format_and_type(format, type) || + if (!_mesa_is_legal_format_and_type(ctx, format, type) || format == GL_INTENSITY) { _mesa_error(ctx, GL_INVALID_OPERATION, "glReadPixels(format or type)"); return; |