13464ebd5Sriastradh/* 23464ebd5Sriastradh * Mesa 3-D graphics library 33464ebd5Sriastradh * 43464ebd5Sriastradh * Copyright (C) 1999-2008 Brian Paul All Rights Reserved. 53464ebd5Sriastradh * Copyright (C) 1999-2010 VMware, Inc. All Rights Reserved. 63464ebd5Sriastradh * 73464ebd5Sriastradh * Permission is hereby granted, free of charge, to any person obtaining a 83464ebd5Sriastradh * copy of this software and associated documentation files (the "Software"), 93464ebd5Sriastradh * to deal in the Software without restriction, including without limitation 103464ebd5Sriastradh * the rights to use, copy, modify, merge, publish, distribute, sublicense, 113464ebd5Sriastradh * and/or sell copies of the Software, and to permit persons to whom the 123464ebd5Sriastradh * Software is furnished to do so, subject to the following conditions: 133464ebd5Sriastradh * 143464ebd5Sriastradh * The above copyright notice and this permission notice shall be included 153464ebd5Sriastradh * in all copies or substantial portions of the Software. 163464ebd5Sriastradh * 173464ebd5Sriastradh * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 183464ebd5Sriastradh * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 193464ebd5Sriastradh * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 20af69d88dSmrg * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 21af69d88dSmrg * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 22af69d88dSmrg * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 23af69d88dSmrg * OTHER DEALINGS IN THE SOFTWARE. 243464ebd5Sriastradh */ 253464ebd5Sriastradh 263464ebd5Sriastradh 273464ebd5Sriastradh#ifndef PACK_H 283464ebd5Sriastradh#define PACK_H 293464ebd5Sriastradh 303464ebd5Sriastradh 3101e04c3fSmrg#include "glheader.h" 323464ebd5Sriastradh 3301e04c3fSmrgstruct gl_context; 3401e04c3fSmrgstruct gl_pixelstore_attrib; 353464ebd5Sriastradh 363464ebd5Sriastradhextern void 373464ebd5Sriastradh_mesa_unpack_polygon_stipple(const GLubyte *pattern, GLuint dest[32], 383464ebd5Sriastradh const struct gl_pixelstore_attrib *unpacking); 393464ebd5Sriastradh 403464ebd5Sriastradh 413464ebd5Sriastradhextern void 423464ebd5Sriastradh_mesa_pack_polygon_stipple(const GLuint pattern[32], GLubyte *dest, 433464ebd5Sriastradh const struct gl_pixelstore_attrib *packing); 443464ebd5Sriastradh 453464ebd5Sriastradh 463464ebd5Sriastradhextern void 473464ebd5Sriastradh_mesa_pack_bitmap(GLint width, GLint height, const GLubyte *source, 483464ebd5Sriastradh GLubyte *dest, const struct gl_pixelstore_attrib *packing); 493464ebd5Sriastradh 503464ebd5Sriastradh 513464ebd5Sriastradhextern void 523464ebd5Sriastradh_mesa_unpack_stencil_span(struct gl_context *ctx, GLuint n, 533464ebd5Sriastradh GLenum dstType, GLvoid *dest, 543464ebd5Sriastradh GLenum srcType, const GLvoid *source, 553464ebd5Sriastradh const struct gl_pixelstore_attrib *srcPacking, 563464ebd5Sriastradh GLbitfield transferOps); 573464ebd5Sriastradh 583464ebd5Sriastradhextern void 593464ebd5Sriastradh_mesa_pack_stencil_span(struct gl_context *ctx, GLuint n, 60af69d88dSmrg GLenum dstType, GLvoid *dest, const GLubyte *source, 613464ebd5Sriastradh const struct gl_pixelstore_attrib *dstPacking); 623464ebd5Sriastradh 633464ebd5Sriastradh 643464ebd5Sriastradhextern void 653464ebd5Sriastradh_mesa_unpack_depth_span(struct gl_context *ctx, GLuint n, 663464ebd5Sriastradh GLenum dstType, GLvoid *dest, GLuint depthMax, 673464ebd5Sriastradh GLenum srcType, const GLvoid *source, 683464ebd5Sriastradh const struct gl_pixelstore_attrib *srcPacking); 693464ebd5Sriastradh 703464ebd5Sriastradhextern void 713464ebd5Sriastradh_mesa_pack_depth_span(struct gl_context *ctx, GLuint n, GLvoid *dest, 723464ebd5Sriastradh GLenum dstType, const GLfloat *depthSpan, 733464ebd5Sriastradh const struct gl_pixelstore_attrib *dstPacking); 743464ebd5Sriastradh 753464ebd5Sriastradh 763464ebd5Sriastradhextern void 77af69d88dSmrg_mesa_pack_depth_stencil_span(struct gl_context *ctx,GLuint n, 78af69d88dSmrg GLenum dstType, GLuint *dest, 793464ebd5Sriastradh const GLfloat *depthVals, 80af69d88dSmrg const GLubyte *stencilVals, 813464ebd5Sriastradh const struct gl_pixelstore_attrib *dstPacking); 823464ebd5Sriastradh 833464ebd5Sriastradh 843464ebd5Sriastradhextern void * 853464ebd5Sriastradh_mesa_unpack_image(GLuint dimensions, 863464ebd5Sriastradh GLsizei width, GLsizei height, GLsizei depth, 873464ebd5Sriastradh GLenum format, GLenum type, const GLvoid *pixels, 883464ebd5Sriastradh const struct gl_pixelstore_attrib *unpack); 893464ebd5Sriastradh 90af69d88dSmrgextern void 9101e04c3fSmrg_mesa_pack_luminance_from_rgba_float(GLuint n, GLfloat rgba[][4], 9201e04c3fSmrg GLvoid *dstAddr, GLenum dst_format, 9301e04c3fSmrg GLbitfield transferOps); 94af69d88dSmrg 95af69d88dSmrgextern void 9601e04c3fSmrg_mesa_pack_luminance_from_rgba_integer(GLuint n, GLuint rgba[][4], bool rgba_is_signed, 9701e04c3fSmrg GLvoid *dstAddr, GLenum dst_format, 9801e04c3fSmrg GLenum dst_type); 9901e04c3fSmrg 10001e04c3fSmrgextern GLfloat * 10101e04c3fSmrg_mesa_unpack_color_index_to_rgba_float(struct gl_context *ctx, GLuint dims, 10201e04c3fSmrg const void *src, GLenum srcFormat, GLenum srcType, 10301e04c3fSmrg int srcWidth, int srcHeight, int srcDepth, 10401e04c3fSmrg const struct gl_pixelstore_attrib *srcPacking, 10501e04c3fSmrg GLbitfield transferOps); 10601e04c3fSmrg 10701e04c3fSmrgextern GLubyte * 10801e04c3fSmrg_mesa_unpack_color_index_to_rgba_ubyte(struct gl_context *ctx, GLuint dims, 10901e04c3fSmrg const void *src, GLenum srcFormat, GLenum srcType, 11001e04c3fSmrg int srcWidth, int srcHeight, int srcDepth, 11101e04c3fSmrg const struct gl_pixelstore_attrib *srcPacking, 11201e04c3fSmrg GLbitfield transferOps); 113af69d88dSmrg 1143464ebd5Sriastradh#endif 115