home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 6 / AACD06.ISO / AACD / System / Mesa-3.1 / src / AOS / amesatools.h < prev    next >
C/C++ Source or Header  |  1999-09-23  |  2KB  |  61 lines

  1. #ifndef    AMIGAMESAtool_H
  2. #define    AMIGAMESAtool_H
  3.  
  4. /*
  5.  * $Id: $
  6.  */
  7.  
  8. /*
  9.  * Mesa 3-D graphics library
  10.  * Version:  3.1
  11.  * Copyright (C) 1995  Brian Paul  (brianp@ssec.wisc.edu)
  12.  *
  13.  * This library is free software; you can redistribute it and/or
  14.  * modify it under the terms of the GNU Library General Public
  15.  * License as published by the Free Software Foundation; either
  16.  * version 2 of the License, or (at your option) any later version.
  17.  *
  18.  * This library is distributed in the hope that it will be useful,
  19.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  20.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  21.  * Library General Public License for more details.
  22.  *
  23.  * You should have received a copy of the GNU Library General Public
  24.  * License along with this library; if not, write to the Free
  25.  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  26.  */
  27.  
  28. GLboolean allocTempRPort(amigaMesaContext amesa, int flags);
  29. void freeTempRPort(amigaMesaContext amesa);
  30. #define    ReallocTempRPort(str, am, flgs)    {                    \
  31.   freeTempRPort(am);                                \
  32.   if (!allocTempRPort(am, flgs))                        \
  33.     Error(str ": Not enough memory to allocate temp-Rastport\n"); }
  34.  
  35. struct RastPort *makeRPort(amigaMesaContext amesa, int width, int height, int depth, int flags, struct BitMap *friendbm);
  36. void destroyRPort(amigaMesaContext amesa, struct RastPort *rp);
  37.  
  38. GLboolean makeTempRaster(amigaMesaContext amesa, struct RastPort *rp);
  39. void destroyTempRaster(amigaMesaContext amesa, struct RastPort *rp);
  40.  
  41. GLubyte *allocPenBackArray(amigaMesaContext amesa, int width, int height, int bytes);
  42. void destroyPenBackArray(amigaMesaContext amesa, GLubyte *);
  43. #define    ReallocPenBackArray(str, am) {                        \
  44.   destroyPenBackArray((am), (am)->BackArray);                    \
  45.   if (!((am)->BackArray = allocPenBackArray(am, (am)->FixedWidth,        \
  46.                 (am)->FixedHeight, (am)->depth <= 8 ? 1 : 4)))    \
  47.     Error(str ": Not enough memory to allocate pen-Backarray\n"); }
  48.  
  49. void AllocOneLine(amigaMesaContext amesa);
  50. void FreeOneLine(amigaMesaContext amesa);
  51. #define    ReallocOneLine(str, am)    {    \
  52.   FreeOneLine(am);            \
  53.   AllocOneLine(am); }
  54.  
  55. GLboolean allocArea(amigaMesaContext amesa, struct RastPort *rp);
  56. void freeArea(amigaMesaContext amesa, struct RastPort *rp);
  57.  
  58. GLboolean makeFixedXY(amigaMesaContext amesa);
  59.  
  60. #endif
  61.