ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

pixpack.h
Go to the documentation of this file.
00001 /****************************************************************************
00002 *
00003 *                        Mesa 3-D graphics library
00004 *                        Direct3D Driver Interface
00005 *
00006 *  ========================================================================
00007 *
00008 *   Copyright (C) 1991-2004 SciTech Software, Inc. All rights reserved.
00009 *
00010 *   Permission is hereby granted, free of charge, to any person obtaining a
00011 *   copy of this software and associated documentation files (the "Software"),
00012 *   to deal in the Software without restriction, including without limitation
00013 *   the rights to use, copy, modify, merge, publish, distribute, sublicense,
00014 *   and/or sell copies of the Software, and to permit persons to whom the
00015 *   Software is furnished to do so, subject to the following conditions:
00016 *
00017 *   The above copyright notice and this permission notice shall be included
00018 *   in all copies or substantial portions of the Software.
00019 *
00020 *   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
00021 *   OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00022 *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
00023 *   SCITECH SOFTWARE INC BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
00024 *   WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
00025 *   OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
00026 *   SOFTWARE.
00027 *
00028 *  ======================================================================
00029 *
00030 * Language:     ANSI C
00031 * Environment:  Windows 9x (Win32)
00032 *
00033 * Description:  Pixel packing functions.
00034 *
00035 ****************************************************************************/
00036 
00037 #ifndef __PIXPACK_H
00038 #define __PIXPACK_H
00039 
00040 #include <GL\gl.h>
00041 #include <ddraw.h>
00042 
00043 #include "ddlog.h"
00044 
00045 /*---------------------- Macros and type definitions ----------------------*/
00046 
00047 #define PXAPI
00048 
00049 // Typedef that can be used for pixel packing function pointers.
00050 #define PX_PACK_FUNC(a) void PXAPI (a)(unsigned char *pixdata, void *dst, GLenum Format, const LPDDSURFACEDESC2 lpDDSD2)
00051 typedef void (PXAPI *PX_packFunc)(unsigned char *pixdata, void *dst, GLenum Format, const LPDDSURFACEDESC2 lpDDSD2);
00052 
00053 // Typedef that can be used for pixel unpacking function pointers.
00054 #define PX_UNPACK_FUNC(a) void PXAPI (a)(unsigned char *pixdata, void *src, GLenum Format, const LPDDSURFACEDESC2 lpDDSD2)
00055 typedef void (PXAPI *PX_unpackFunc)(unsigned char *pixdata, void *src, GLenum Format, const LPDDSURFACEDESC2 lpDDSD2);
00056 
00057 // Typedef that can be used for pixel span packing function pointers.
00058 #define PX_PACK_SPAN_FUNC(a) void PXAPI (a)(GLuint n, unsigned char *pixdata, unsigned char *dst, GLenum Format, const LPDDSURFACEDESC2 lpDDSD2)
00059 typedef void (PXAPI *PX_packSpanFunc)(GLuint n, unsigned char *pixdata, unsigned char *dst, GLenum Format, const LPDDSURFACEDESC2 lpDDSD2);
00060 
00061 /*------------------------- Function Prototypes ---------------------------*/
00062 
00063 #ifdef  __cplusplus
00064 extern "C" {
00065 #endif
00066 
00067 // Function that examines a pixel format and returns the relevent
00068 // pixel-packing function
00069 void PXAPI pxClassifyPixelFormat(const LPDDPIXELFORMAT lpddpf, PX_packFunc *lpPackFn ,PX_unpackFunc *lpUnpackFn, PX_packSpanFunc *lpPackSpanFn);
00070 
00071 // Packing functions
00072 PX_PACK_FUNC(pxPackGeneric);
00073 PX_PACK_FUNC(pxPackRGB555);
00074 PX_PACK_FUNC(pxPackARGB4444);
00075 PX_PACK_FUNC(pxPackARGB1555);
00076 PX_PACK_FUNC(pxPackRGB565);
00077 PX_PACK_FUNC(pxPackRGB332);
00078 PX_PACK_FUNC(pxPackRGB888);
00079 PX_PACK_FUNC(pxPackARGB8888);
00080 PX_PACK_FUNC(pxPackPAL8);
00081 
00082 // Unpacking functions
00083 PX_UNPACK_FUNC(pxUnpackGeneric);
00084 PX_UNPACK_FUNC(pxUnpackRGB555);
00085 PX_UNPACK_FUNC(pxUnpackARGB4444);
00086 PX_UNPACK_FUNC(pxUnpackARGB1555);
00087 PX_UNPACK_FUNC(pxUnpackRGB565);
00088 PX_UNPACK_FUNC(pxUnpackRGB332);
00089 PX_UNPACK_FUNC(pxUnpackRGB888);
00090 PX_UNPACK_FUNC(pxUnpackARGB8888);
00091 PX_UNPACK_FUNC(pxUnpackPAL8);
00092 
00093 // Span Packing functions
00094 PX_PACK_SPAN_FUNC(pxPackSpanGeneric);
00095 PX_PACK_SPAN_FUNC(pxPackSpanRGB555);
00096 PX_PACK_SPAN_FUNC(pxPackSpanARGB4444);
00097 PX_PACK_SPAN_FUNC(pxPackSpanARGB1555);
00098 PX_PACK_SPAN_FUNC(pxPackSpanRGB565);
00099 PX_PACK_SPAN_FUNC(pxPackSpanRGB332);
00100 PX_PACK_SPAN_FUNC(pxPackSpanRGB888);
00101 PX_PACK_SPAN_FUNC(pxPackSpanARGB8888);
00102 PX_PACK_SPAN_FUNC(pxPackSpanPAL8);
00103 
00104 #ifdef  __cplusplus
00105 }
00106 #endif
00107 
00108 #endif

Generated on Sun May 27 2012 04:20:00 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.