1bf215546Sopenharmony_ci/* 2bf215546Sopenharmony_ci * Mesa 3-D graphics library 3bf215546Sopenharmony_ci * 4bf215546Sopenharmony_ci * Copyright (C) 1999-2008 Brian Paul All Rights Reserved. 5bf215546Sopenharmony_ci * 6bf215546Sopenharmony_ci * Permission is hereby granted, free of charge, to any person obtaining a 7bf215546Sopenharmony_ci * copy of this software and associated documentation files (the "Software"), 8bf215546Sopenharmony_ci * to deal in the Software without restriction, including without limitation 9bf215546Sopenharmony_ci * the rights to use, copy, modify, merge, publish, distribute, sublicense, 10bf215546Sopenharmony_ci * and/or sell copies of the Software, and to permit persons to whom the 11bf215546Sopenharmony_ci * Software is furnished to do so, subject to the following conditions: 12bf215546Sopenharmony_ci * 13bf215546Sopenharmony_ci * The above copyright notice and this permission notice shall be included 14bf215546Sopenharmony_ci * in all copies or substantial portions of the Software. 15bf215546Sopenharmony_ci * 16bf215546Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 17bf215546Sopenharmony_ci * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18bf215546Sopenharmony_ci * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 19bf215546Sopenharmony_ci * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20bf215546Sopenharmony_ci * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21bf215546Sopenharmony_ci * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22bf215546Sopenharmony_ci * OTHER DEALINGS IN THE SOFTWARE. 23bf215546Sopenharmony_ci */ 24bf215546Sopenharmony_ci 25bf215546Sopenharmony_ci 26bf215546Sopenharmony_ci#ifndef IMAGE_H 27bf215546Sopenharmony_ci#define IMAGE_H 28bf215546Sopenharmony_ci 29bf215546Sopenharmony_ci 30bf215546Sopenharmony_ci#include "glheader.h" 31bf215546Sopenharmony_ci 32bf215546Sopenharmony_cistruct gl_context; 33bf215546Sopenharmony_cistruct gl_pixelstore_attrib; 34bf215546Sopenharmony_cistruct gl_framebuffer; 35bf215546Sopenharmony_ci 36bf215546Sopenharmony_ciextern void 37bf215546Sopenharmony_ci_mesa_swap2(GLushort *p, GLuint n); 38bf215546Sopenharmony_ci 39bf215546Sopenharmony_ciextern void 40bf215546Sopenharmony_ci_mesa_swap4(GLuint *p, GLuint n); 41bf215546Sopenharmony_ci 42bf215546Sopenharmony_ci 43bf215546Sopenharmony_ciextern GLintptr 44bf215546Sopenharmony_ci_mesa_image_offset( GLuint dimensions, 45bf215546Sopenharmony_ci const struct gl_pixelstore_attrib *packing, 46bf215546Sopenharmony_ci GLsizei width, GLsizei height, 47bf215546Sopenharmony_ci GLenum format, GLenum type, 48bf215546Sopenharmony_ci GLint img, GLint row, GLint column ); 49bf215546Sopenharmony_ci 50bf215546Sopenharmony_ciextern GLvoid * 51bf215546Sopenharmony_ci_mesa_image_address( GLuint dimensions, 52bf215546Sopenharmony_ci const struct gl_pixelstore_attrib *packing, 53bf215546Sopenharmony_ci const GLvoid *image, 54bf215546Sopenharmony_ci GLsizei width, GLsizei height, 55bf215546Sopenharmony_ci GLenum format, GLenum type, 56bf215546Sopenharmony_ci GLint img, GLint row, GLint column ); 57bf215546Sopenharmony_ci 58bf215546Sopenharmony_ciextern GLvoid * 59bf215546Sopenharmony_ci_mesa_image_address1d( const struct gl_pixelstore_attrib *packing, 60bf215546Sopenharmony_ci const GLvoid *image, 61bf215546Sopenharmony_ci GLsizei width, 62bf215546Sopenharmony_ci GLenum format, GLenum type, 63bf215546Sopenharmony_ci GLint column ); 64bf215546Sopenharmony_ci 65bf215546Sopenharmony_ciextern GLvoid * 66bf215546Sopenharmony_ci_mesa_image_address2d( const struct gl_pixelstore_attrib *packing, 67bf215546Sopenharmony_ci const GLvoid *image, 68bf215546Sopenharmony_ci GLsizei width, GLsizei height, 69bf215546Sopenharmony_ci GLenum format, GLenum type, 70bf215546Sopenharmony_ci GLint row, GLint column ); 71bf215546Sopenharmony_ci 72bf215546Sopenharmony_ciextern GLvoid * 73bf215546Sopenharmony_ci_mesa_image_address3d( const struct gl_pixelstore_attrib *packing, 74bf215546Sopenharmony_ci const GLvoid *image, 75bf215546Sopenharmony_ci GLsizei width, GLsizei height, 76bf215546Sopenharmony_ci GLenum format, GLenum type, 77bf215546Sopenharmony_ci GLint img, GLint row, GLint column ); 78bf215546Sopenharmony_ci 79bf215546Sopenharmony_ci 80bf215546Sopenharmony_ciextern GLint 81bf215546Sopenharmony_ci_mesa_image_row_stride( const struct gl_pixelstore_attrib *packing, 82bf215546Sopenharmony_ci GLint width, GLenum format, GLenum type ); 83bf215546Sopenharmony_ci 84bf215546Sopenharmony_ci 85bf215546Sopenharmony_ciextern GLint 86bf215546Sopenharmony_ci_mesa_image_image_stride( const struct gl_pixelstore_attrib *packing, 87bf215546Sopenharmony_ci GLint width, GLint height, 88bf215546Sopenharmony_ci GLenum format, GLenum type ); 89bf215546Sopenharmony_ci 90bf215546Sopenharmony_ci 91bf215546Sopenharmony_ciextern void 92bf215546Sopenharmony_ci_mesa_expand_bitmap(GLsizei width, GLsizei height, 93bf215546Sopenharmony_ci const struct gl_pixelstore_attrib *unpack, 94bf215546Sopenharmony_ci const GLubyte *bitmap, 95bf215546Sopenharmony_ci GLubyte *destBuffer, GLint destStride, 96bf215546Sopenharmony_ci GLubyte onValue); 97bf215546Sopenharmony_ci 98bf215546Sopenharmony_ci 99bf215546Sopenharmony_ciextern GLboolean 100bf215546Sopenharmony_ci_mesa_clip_drawpixels(const struct gl_context *ctx, 101bf215546Sopenharmony_ci GLint *destX, GLint *destY, 102bf215546Sopenharmony_ci GLsizei *width, GLsizei *height, 103bf215546Sopenharmony_ci struct gl_pixelstore_attrib *unpack); 104bf215546Sopenharmony_ci 105bf215546Sopenharmony_ci 106bf215546Sopenharmony_ciextern GLboolean 107bf215546Sopenharmony_ci_mesa_clip_readpixels(const struct gl_context *ctx, 108bf215546Sopenharmony_ci GLint *srcX, GLint *srcY, 109bf215546Sopenharmony_ci GLsizei *width, GLsizei *height, 110bf215546Sopenharmony_ci struct gl_pixelstore_attrib *pack); 111bf215546Sopenharmony_ci 112bf215546Sopenharmony_ciextern GLboolean 113bf215546Sopenharmony_ci_mesa_clip_copytexsubimage(const struct gl_context *ctx, 114bf215546Sopenharmony_ci GLint *destX, GLint *destY, 115bf215546Sopenharmony_ci GLint *srcX, GLint *srcY, 116bf215546Sopenharmony_ci GLsizei *width, GLsizei *height); 117bf215546Sopenharmony_ci 118bf215546Sopenharmony_ciextern GLboolean 119bf215546Sopenharmony_ci_mesa_clip_to_region(GLint xmin, GLint ymin, 120bf215546Sopenharmony_ci GLint xmax, GLint ymax, 121bf215546Sopenharmony_ci GLint *x, GLint *y, 122bf215546Sopenharmony_ci GLsizei *width, GLsizei *height ); 123bf215546Sopenharmony_ci 124bf215546Sopenharmony_ciextern GLboolean 125bf215546Sopenharmony_ci_mesa_clip_blit(struct gl_context *ctx, 126bf215546Sopenharmony_ci const struct gl_framebuffer *readFb, 127bf215546Sopenharmony_ci const struct gl_framebuffer *drawFb, 128bf215546Sopenharmony_ci GLint *srcX0, GLint *srcY0, GLint *srcX1, GLint *srcY1, 129bf215546Sopenharmony_ci GLint *dstX0, GLint *dstY0, GLint *dstX1, GLint *dstY1); 130bf215546Sopenharmony_ci 131bf215546Sopenharmony_civoid 132bf215546Sopenharmony_ci_mesa_swap_bytes_2d_image(GLenum format, GLenum type, 133bf215546Sopenharmony_ci const struct gl_pixelstore_attrib *packing, 134bf215546Sopenharmony_ci GLsizei width, GLsizei height, 135bf215546Sopenharmony_ci GLvoid *dst, const GLvoid *src); 136bf215546Sopenharmony_ci 137bf215546Sopenharmony_ci#endif 138