home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Amiga 5 / MA_Cover_5.iso / ppc / mesa / src / dlist.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-01-31  |  17.0 KB  |  464 lines

  1. /* $Id: dlist.h,v 1.14 1997/10/29 01:29:09 brianp Exp $ */
  2.  
  3. /*
  4.  * Mesa 3-D graphics library
  5.  * Version:  2.5
  6.  * Copyright (C) 1995-1997  Brian Paul
  7.  *
  8.  * This library is free software; you can redistribute it and/or
  9.  * modify it under the terms of the GNU Library General Public
  10.  * License as published by the Free Software Foundation; either
  11.  * version 2 of the License, or (at your option) any later version.
  12.  *
  13.  * This library is distributed in the hope that it will be useful,
  14.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  16.  * Library General Public License for more details.
  17.  *
  18.  * You should have received a copy of the GNU Library General Public
  19.  * License along with this library; if not, write to the Free
  20.  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  21.  */
  22.  
  23.  
  24. /*
  25.  * $Log: dlist.h,v $
  26.  * Revision 1.14  1997/10/29 01:29:09  brianp
  27.  * added GL_EXT_point_parameters extension from Daniel Barrero
  28.  *
  29.  * Revision 1.13  1997/09/27 00:13:44  brianp
  30.  * added GL_EXT_paletted_texture extension
  31.  *
  32.  * Revision 1.12  1997/06/20 01:57:57  brianp
  33.  * added gl_save_Color4ubv()
  34.  *
  35.  * Revision 1.11  1997/06/06 02:59:12  brianp
  36.  * added gl_destroy_list()
  37.  *
  38.  * Revision 1.10  1997/04/24 01:50:53  brianp
  39.  * optimized glColor3f, glColor3fv, glColor4fv
  40.  *
  41.  * Revision 1.9  1997/04/21 01:21:33  brianp
  42.  * added gl_save_Rectf()
  43.  *
  44.  * Revision 1.8  1997/04/20 16:18:15  brianp
  45.  * added glOrtho and glFrustum API pointers
  46.  *
  47.  * Revision 1.7  1997/04/16 23:55:33  brianp
  48.  * added optimized glTexCoord2f code
  49.  *
  50.  * Revision 1.6  1997/04/14 22:18:23  brianp
  51.  * added optimized glVertex3fv code
  52.  *
  53.  * Revision 1.5  1997/04/07 02:58:49  brianp
  54.  * added gl_save_Vertex[23]f() and related code
  55.  *
  56.  * Revision 1.4  1997/04/01 04:26:02  brianp
  57.  * added code for glLoadIdentity(), changed #include's
  58.  *
  59.  * Revision 1.3  1997/02/09 18:50:18  brianp
  60.  * added GL_EXT_texture3D support
  61.  *
  62.  * Revision 1.2  1996/11/07 04:12:45  brianp
  63.  * texture images are now gl_image structs, not gl_texture_image structs
  64.  *
  65.  * Revision 1.1  1996/09/13 01:38:16  brianp
  66.  * Initial revision
  67.  *
  68.  */
  69.  
  70.  
  71. #ifndef DLIST_H
  72. #define DLIST_H
  73.  
  74.  
  75. #include "types.h"
  76.  
  77.  
  78.  
  79. extern void gl_init_lists( void );
  80.  
  81. extern GLint gl_list_index( void );
  82.  
  83. extern void gl_destroy_list( GLcontext *ctx, GLuint list );
  84.  
  85.  
  86.  
  87. extern void gl_CallList( GLcontext *ctx, GLuint list );
  88.  
  89. extern void gl_CallLists( GLcontext *ctx,
  90.                           GLsizei n, GLenum type, const GLvoid *lists );
  91.  
  92. extern void gl_DeleteLists( GLcontext *ctx, GLuint list, GLsizei range );
  93.  
  94. extern void gl_EndList( GLcontext *ctx );
  95.  
  96. extern GLuint gl_GenLists( GLcontext *ctx, GLsizei range );
  97.  
  98. extern GLboolean gl_IsList( GLcontext *ctx, GLuint list );
  99.  
  100. extern void gl_ListBase( GLcontext *ctx, GLuint base );
  101.  
  102. extern void gl_NewList( GLcontext *ctx, GLuint list, GLenum mode );
  103.  
  104.  
  105.  
  106.  
  107. extern void gl_save_Accum( GLcontext *ctx, GLenum op, GLfloat value );
  108.  
  109. extern void gl_save_AlphaFunc( GLcontext *ctx, GLenum func, GLclampf ref );
  110.  
  111. extern void gl_save_BlendColor( GLcontext *ctx, GLfloat red, GLfloat green,
  112.                                 GLfloat blue, GLfloat alpha );
  113.  
  114. extern void gl_save_BlendEquation( GLcontext *ctx, GLenum mode );
  115.  
  116. extern void gl_save_BlendFunc( GLcontext *ctx,
  117.                                GLenum sfactor, GLenum dfactor );
  118.  
  119. extern void gl_save_Begin( GLcontext *ctx, GLenum mode );
  120.  
  121. extern void gl_save_BindTexture( GLcontext *ctx,
  122.                                  GLenum target, GLuint texture );
  123.  
  124. extern void gl_save_Bitmap( GLcontext *ctx, GLsizei width, GLsizei height,
  125.                 GLfloat xorig, GLfloat yorig,
  126.                 GLfloat xmove, GLfloat ymove,
  127.                             const struct gl_image *bitmap );
  128.  
  129. extern void gl_save_CallList( GLcontext *ctx, GLuint list );
  130.  
  131. extern void gl_save_CallLists( GLcontext *ctx,
  132.                                GLsizei n, GLenum type, const GLvoid *lists );
  133.  
  134. extern void gl_save_Clear( GLcontext *ctx, GLbitfield mask );
  135.  
  136. extern void gl_save_ClearAccum( GLcontext *ctx, GLfloat red, GLfloat green,
  137.                     GLfloat blue, GLfloat alpha );
  138.  
  139. extern void gl_save_ClearColor( GLcontext *ctx, GLclampf red, GLclampf green,
  140.                     GLclampf blue, GLclampf alpha );
  141.  
  142. extern void gl_save_ClearDepth( GLcontext *ctx, GLclampd depth );
  143.  
  144. extern void gl_save_ClearIndex( GLcontext *ctx, GLfloat c );
  145.  
  146. extern void gl_save_ClearStencil( GLcontext *ctx, GLint s );
  147.  
  148. extern void gl_save_ClipPlane( GLcontext *ctx,
  149.                                GLenum plane, const GLfloat *equ );
  150.  
  151. extern void gl_save_Color3f( GLcontext *ctx, GLfloat r, GLfloat g, GLfloat b );
  152.  
  153. extern void gl_save_Color3fv( GLcontext *ctx, const GLfloat *c );
  154.  
  155. extern void gl_save_Color4f( GLcontext *ctx, GLfloat r, GLfloat g,
  156.                              GLfloat b, GLfloat a );
  157.  
  158. extern void gl_save_Color4fv( GLcontext *ctx, const GLfloat *c );
  159.  
  160. extern void gl_save_Color4ub( GLcontext *ctx, GLubyte r, GLubyte g,
  161.                               GLubyte b, GLubyte a );
  162.  
  163. extern void gl_save_Color4ubv( GLcontext *ctx, const GLubyte *c );
  164.  
  165. extern void gl_save_ColorMask( GLcontext *ctx, GLboolean red, GLboolean green,
  166.                    GLboolean blue, GLboolean alpha );
  167.  
  168. extern void gl_save_ColorMaterial( GLcontext *ctx, GLenum face, GLenum mode );
  169.  
  170. extern void gl_save_ColorTable( GLcontext *ctx, GLenum target,
  171.                                 GLenum internalFormat,
  172.                                 struct gl_image *table );
  173.  
  174. extern void gl_save_ColorSubTable( GLcontext *ctx, GLenum target,
  175.                                    GLsizei start, struct gl_image *data );
  176.  
  177. extern void gl_save_CopyPixels( GLcontext *ctx, GLint x, GLint y,
  178.                 GLsizei width, GLsizei height, GLenum type );
  179.  
  180. extern void gl_save_CopyTexImage1D( GLcontext *ctx,
  181.                                     GLenum target, GLint level,
  182.                                     GLenum internalformat,
  183.                                     GLint x, GLint y, GLsizei width,
  184.                                     GLint border );
  185.  
  186. extern void gl_save_CopyTexImage2D( GLcontext *ctx,
  187.                                     GLenum target, GLint level,
  188.                                     GLenum internalformat,
  189.                                     GLint x, GLint y, GLsizei width,
  190.                                     GLsizei height, GLint border );
  191.  
  192. extern void gl_save_CopyTexSubImage1D( GLcontext *ctx,
  193.                                        GLenum target, GLint level,
  194.                                        GLint xoffset, GLint x, GLint y,
  195.                                        GLsizei width );
  196.  
  197. extern void gl_save_CopyTexSubImage2D( GLcontext *ctx,
  198.                                        GLenum target, GLint level,
  199.                                        GLint xoffset, GLint yoffset,
  200.                                        GLint x, GLint y,
  201.                                        GLsizei width, GLint height );
  202.  
  203. extern void gl_save_CopyTexSubImage3DEXT( GLcontext *ctx,
  204.                                           GLenum target, GLint level,
  205.                                           GLint xoffset, GLint yoffset, GLint zoffset,
  206.                                           GLint x, GLint y,
  207.                                           GLsizei width, GLint height );
  208.  
  209. extern void gl_save_CullFace( GLcontext *ctx, GLenum mode );
  210.  
  211. extern void gl_save_DepthFunc( GLcontext *ctx, GLenum func );
  212.  
  213. extern void gl_save_DepthMask( GLcontext *ctx, GLboolean mask );
  214.  
  215. extern void gl_save_DepthRange( GLcontext *ctx,
  216.                                 GLclampd nearval, GLclampd farval );
  217.  
  218. extern void gl_save_Disable( GLcontext *ctx, GLenum cap );
  219.  
  220. extern void gl_save_DrawBuffer( GLcontext *ctx, GLenum mode );
  221.  
  222. extern void gl_save_DrawPixels( GLcontext *ctx,
  223.                                 GLsizei width, GLsizei height, GLenum format,
  224.                     GLenum type, const GLvoid *pixels );
  225.  
  226. extern void gl_save_EdgeFlag( GLcontext *ctx, GLboolean flag );
  227.  
  228. extern void gl_save_Enable( GLcontext *ctx, GLenum cap );
  229.  
  230. extern void gl_save_End( GLcontext *ctx );
  231.  
  232. extern void gl_save_EvalCoord1f( GLcontext *ctx, GLfloat u );
  233.  
  234. extern void gl_save_EvalCoord2f( GLcontext *ctx, GLfloat u, GLfloat v );
  235.  
  236. extern void gl_save_EvalMesh1( GLcontext *ctx,
  237.                                GLenum mode, GLint i1, GLint i2 );
  238.  
  239. extern void gl_save_EvalMesh2( GLcontext *ctx, GLenum mode, GLint i1, GLint i2,
  240.                    GLint j1, GLint j2 );
  241.  
  242. extern void gl_save_EvalPoint1( GLcontext *ctx, GLint i );
  243.  
  244. extern void gl_save_EvalPoint2( GLcontext *ctx, GLint i, GLint j );
  245.  
  246. extern void gl_save_Fogfv( GLcontext *ctx,
  247.                            GLenum pname, const GLfloat *params );
  248.  
  249. extern void gl_save_FrontFace( GLcontext *ctx, GLenum mode );
  250.  
  251. extern void gl_save_Frustum( GLcontext *ctx, GLdouble left, GLdouble right,
  252.                              GLdouble bottom, GLdouble top,
  253.                              GLdouble nearval, GLdouble farval );
  254.  
  255. extern void gl_save_Hint( GLcontext *ctx, GLenum target, GLenum mode );
  256.  
  257. extern void gl_save_Indexf( GLcontext *ctx, GLfloat index );
  258.  
  259. extern void gl_save_Indexi( GLcontext *ctx, GLint index );
  260.  
  261. extern void gl_save_IndexMask( GLcontext *ctx, GLuint mask );
  262.  
  263. extern void gl_save_InitNames( GLcontext *ctx );
  264.  
  265. extern void gl_save_Lightfv( GLcontext *ctx, GLenum light, GLenum pname,
  266.                              const GLfloat *params, GLint numparams );
  267.  
  268. extern void gl_save_LightModelfv( GLcontext *ctx, GLenum pname,
  269.                                 const GLfloat *params );
  270.  
  271. extern void gl_save_LineWidth( GLcontext *ctx, GLfloat width );
  272.  
  273. extern void gl_save_LineStipple( GLcontext *ctx, GLint factor,
  274.                                  GLushort pattern );
  275.  
  276. extern void gl_save_ListBase( GLcontext *ctx, GLuint base );
  277.  
  278. extern void gl_save_LoadIdentity( GLcontext *ctx );
  279.  
  280. extern void gl_save_LoadMatrixf( GLcontext *ctx, const GLfloat *m );
  281.  
  282. extern void gl_save_LoadName( GLcontext *ctx, GLuint name );
  283.  
  284. extern void gl_save_LogicOp( GLcontext *ctx, GLenum opcode );
  285.  
  286. extern void gl_save_Map1f( GLcontext *ctx, GLenum target,
  287.                            GLfloat u1, GLfloat u2, GLint stride,
  288.                GLint order, const GLfloat *points,
  289.                            GLboolean retain );
  290.  
  291. extern void gl_save_Map2f( GLcontext *ctx, GLenum target,
  292.                GLfloat u1, GLfloat u2, GLint ustride, GLint uorder,
  293.                GLfloat v1, GLfloat v2, GLint vstride, GLint vorder,
  294.                const GLfloat *points,
  295.                            GLboolean retain );
  296.  
  297. extern void gl_save_MapGrid1f( GLcontext *ctx, GLint un,
  298.                                GLfloat u1, GLfloat u2 );
  299.  
  300. extern void gl_save_MapGrid2f( GLcontext *ctx,
  301.                                GLint un, GLfloat u1, GLfloat u2,
  302.                                GLint vn, GLfloat v1, GLfloat v2 );
  303.  
  304. extern void gl_save_Materialfv( GLcontext *ctx, GLenum face, GLenum pname,
  305.                                 const GLfloat *params );
  306.  
  307. extern void gl_save_MatrixMode( GLcontext *ctx, GLenum mode );
  308.  
  309. extern void gl_save_MultMatrixf( GLcontext *ctx, const GLfloat *m );
  310.  
  311. extern void gl_save_NewList( GLcontext *ctx, GLuint list, GLenum mode );
  312.  
  313. extern void gl_save_Normal3fv( GLcontext *ctx, const GLfloat n[3] );
  314.  
  315. extern void gl_save_Normal3f( GLcontext *ctx,
  316.                               GLfloat nx, GLfloat ny, GLfloat nz );
  317.  
  318. extern void gl_save_Ortho( GLcontext *ctx, GLdouble left, GLdouble right,
  319.                            GLdouble bottom, GLdouble top,
  320.                            GLdouble nearval, GLdouble farval );
  321.  
  322. extern void gl_save_PassThrough( GLcontext *ctx, GLfloat token );
  323.  
  324. extern void gl_save_PixelMapfv( GLcontext *ctx, GLenum map, GLint mapsize,
  325.                                 const GLfloat *values );
  326.  
  327. extern void gl_save_PixelTransferf( GLcontext *ctx,
  328.                                     GLenum pname, GLfloat param );
  329.  
  330. extern void gl_save_PixelZoom( GLcontext *ctx,
  331.                                GLfloat xfactor, GLfloat yfactor );
  332.  
  333. extern void gl_save_PointParameterfvEXT( GLcontext *ctx, GLenum pname,
  334.                                          const GLfloat *params );
  335.  
  336. extern void gl_save_PointSize( GLcontext *ctx, GLfloat size );
  337.  
  338. extern void gl_save_PolygonMode( GLcontext *ctx, GLenum face, GLenum mode );
  339.  
  340. extern void gl_save_PolygonStipple( GLcontext *ctx, const GLubyte *mask );
  341.  
  342. extern void gl_save_PolygonOffset( GLcontext *ctx,
  343.                                    GLfloat factor, GLfloat units );
  344.  
  345. extern void gl_save_PopAttrib( GLcontext *ctx );
  346.  
  347. extern void gl_save_PopMatrix( GLcontext *ctx );
  348.  
  349. extern void gl_save_PopName( GLcontext *ctx );
  350.  
  351. extern void gl_save_PrioritizeTextures( GLcontext *ctx,
  352.                                         GLsizei n, const GLuint *textures,
  353.                                         const GLclampf *priorities );
  354.  
  355. extern void gl_save_PushAttrib( GLcontext *ctx, GLbitfield mask );
  356.  
  357. extern void gl_save_PushMatrix( GLcontext *ctx );
  358.  
  359. extern void gl_save_PushName( GLcontext *ctx, GLuint name );
  360.  
  361. extern void gl_save_RasterPos4f( GLcontext *ctx,
  362.                                  GLfloat x, GLfloat y, GLfloat z, GLfloat w );
  363.  
  364. extern void gl_save_ReadBuffer( GLcontext *ctx, GLenum mode );
  365.  
  366. extern void gl_save_Rectf( GLcontext *ctx,
  367.                            GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 );
  368.  
  369. extern void gl_save_Rotatef( GLcontext *ctx, GLfloat angle,
  370.                              GLfloat x, GLfloat y, GLfloat z );
  371.  
  372. extern void gl_save_Scalef( GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z );
  373.  
  374. extern void gl_save_Scissor( GLcontext *ctx,
  375.                              GLint x, GLint y, GLsizei width, GLsizei height );
  376.  
  377. extern void gl_save_ShadeModel( GLcontext *ctx, GLenum mode );
  378.  
  379. extern void gl_save_StencilFunc( GLcontext *ctx,
  380.                                  GLenum func, GLint ref, GLuint mask );
  381.  
  382. extern void gl_save_StencilMask( GLcontext *ctx, GLuint mask );
  383.  
  384. extern void gl_save_StencilOp( GLcontext *ctx,
  385.                                GLenum fail, GLenum zfail, GLenum zpass );
  386.  
  387. extern void gl_save_TexCoord2f( GLcontext *ctx, GLfloat s, GLfloat t );
  388.  
  389. extern void gl_save_TexCoord4f( GLcontext *ctx, GLfloat s, GLfloat t,
  390.                                 GLfloat r, GLfloat q );
  391.  
  392. extern void gl_save_TexEnvfv( GLcontext *ctx, GLenum target, GLenum pname,
  393.                               const GLfloat *params );
  394.  
  395. extern void gl_save_TexParameterfv( GLcontext *ctx, GLenum target,
  396.                                     GLenum pname, const GLfloat *params );
  397.  
  398. extern void gl_save_TexGenfv( GLcontext *ctx, GLenum coord, GLenum pname,
  399.                               const GLfloat *params );
  400.  
  401. extern void gl_save_TexImage1D( GLcontext *ctx, GLenum target,
  402.                                 GLint level, GLint components,
  403.                     GLsizei width, GLint border,
  404.                                 GLenum format, GLenum type,
  405.                                 struct gl_image *teximage );
  406.  
  407. extern void gl_save_TexImage2D( GLcontext *ctx, GLenum target,
  408.                                 GLint level, GLint components,
  409.                     GLsizei width, GLsizei height, GLint border,
  410.                                 GLenum format, GLenum type,
  411.                                 struct gl_image *teximage );
  412.  
  413. extern void gl_save_TexImage3DEXT( GLcontext *ctx, GLenum target,
  414.                                    GLint level, GLint components,
  415.                                    GLsizei width, GLsizei height, GLsizei depth,
  416.                                    GLint border,
  417.                                    GLenum format, GLenum type,
  418.                                    struct gl_image *teximage );
  419.  
  420. extern void gl_save_TexSubImage1D( GLcontext *ctx,
  421.                                    GLenum target, GLint level,
  422.                                    GLint xoffset, GLsizei width,
  423.                                    GLenum format, GLenum type,
  424.                                    struct gl_image *image );
  425.  
  426.  
  427. extern void gl_save_TexSubImage2D( GLcontext *ctx,
  428.                                    GLenum target, GLint level,
  429.                                    GLint xoffset, GLint yoffset,
  430.                                    GLsizei width, GLsizei height,
  431.                                    GLenum format, GLenum type,
  432.                                    struct gl_image *image );
  433.  
  434. extern void gl_save_TexSubImage3DEXT( GLcontext *ctx,
  435.                                       GLenum target, GLint level,
  436.                                       GLint xoffset, GLint yoffset, GLint zoffset,
  437.                                       GLsizei width, GLsizei height, GLsizei depth,
  438.                                       GLenum format, GLenum type,
  439.                                       struct gl_image *image );
  440.  
  441. extern void gl_save_Translatef( GLcontext *ctx,
  442.                                 GLfloat x, GLfloat y, GLfloat z );
  443.  
  444. extern void gl_save_Vertex2f( GLcontext *ctx,
  445.                               GLfloat x, GLfloat y );
  446.  
  447. extern void gl_save_Vertex3f( GLcontext *ctx,
  448.                               GLfloat x, GLfloat y, GLfloat z );
  449.  
  450. extern void gl_save_Vertex4f( GLcontext *ctx,
  451.                               GLfloat x, GLfloat y, GLfloat z, GLfloat w );
  452.  
  453. extern void gl_save_Vertex3fv( GLcontext *ctx, const GLfloat *v );
  454.  
  455. extern void gl_save_Viewport( GLcontext *ctx, GLint x, GLint y,
  456.                               GLsizei width, GLsizei height );
  457.  
  458. extern void gl_save_WindowPos4fMESA( GLcontext *ctx,
  459.                                      GLfloat x, GLfloat y,
  460.                                      GLfloat z, GLfloat w );
  461.  
  462.  
  463. #endif
  464.