Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. /**
  2.  * \file eval.h
  3.  * Eval operations.
  4.  *
  5.  * \if subset
  6.  * (No-op)
  7.  *
  8.  * \endif
  9.  */
  10.  
  11. /*
  12.  * Mesa 3-D graphics library
  13.  * Version:  3.5
  14.  *
  15.  * Copyright (C) 1999-2001  Brian Paul   All Rights Reserved.
  16.  *
  17.  * Permission is hereby granted, free of charge, to any person obtaining a
  18.  * copy of this software and associated documentation files (the "Software"),
  19.  * to deal in the Software without restriction, including without limitation
  20.  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  21.  * and/or sell copies of the Software, and to permit persons to whom the
  22.  * Software is furnished to do so, subject to the following conditions:
  23.  *
  24.  * The above copyright notice and this permission notice shall be included
  25.  * in all copies or substantial portions of the Software.
  26.  *
  27.  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  28.  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  29.  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
  30.  * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
  31.  * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  32.  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  33.  */
  34.  
  35.  
  36. #ifndef EVAL_H
  37. #define EVAL_H
  38.  
  39.  
  40. #include "main/mtypes.h"
  41.  
  42.  
  43. #if FEATURE_evaluators
  44.  
  45. #define _MESA_INIT_EVAL_VTXFMT(vfmt, impl)         \
  46.    do {                                            \
  47.       (vfmt)->EvalCoord1f  = impl ## EvalCoord1f;  \
  48.       (vfmt)->EvalCoord1fv = impl ## EvalCoord1fv; \
  49.       (vfmt)->EvalCoord2f  = impl ## EvalCoord2f;  \
  50.       (vfmt)->EvalCoord2fv = impl ## EvalCoord2fv; \
  51.       (vfmt)->EvalPoint1   = impl ## EvalPoint1;   \
  52.       (vfmt)->EvalPoint2   = impl ## EvalPoint2;   \
  53.       (vfmt)->EvalMesh1    = impl ## EvalMesh1;    \
  54.       (vfmt)->EvalMesh2    = impl ## EvalMesh2;    \
  55.    } while (0)
  56.  
  57. extern GLuint _mesa_evaluator_components( GLenum target );
  58.  
  59.  
  60. extern void gl_free_control_points( struct gl_context *ctx,
  61.                                     GLenum target, GLfloat *data );
  62.  
  63.  
  64. extern GLfloat *_mesa_copy_map_points1f( GLenum target,
  65.                                       GLint ustride, GLint uorder,
  66.                                       const GLfloat *points );
  67.  
  68. extern GLfloat *_mesa_copy_map_points1d( GLenum target,
  69.                                       GLint ustride, GLint uorder,
  70.                                       const GLdouble *points );
  71.  
  72. extern GLfloat *_mesa_copy_map_points2f( GLenum target,
  73.                                       GLint ustride, GLint uorder,
  74.                                       GLint vstride, GLint vorder,
  75.                                       const GLfloat *points );
  76.  
  77. extern GLfloat *_mesa_copy_map_points2d(GLenum target,
  78.                                      GLint ustride, GLint uorder,
  79.                                      GLint vstride, GLint vorder,
  80.                                      const GLdouble *points );
  81.  
  82. extern void
  83. _mesa_install_eval_vtxfmt(struct _glapi_table *disp,
  84.                           const GLvertexformat *vfmt);
  85.  
  86. extern void
  87. _mesa_init_eval_dispatch(struct _glapi_table *disp);
  88.  
  89. #else /* FEATURE_evaluators */
  90.  
  91. #define _MESA_INIT_EVAL_VTXFMT(vfmt, impl) do { } while (0)
  92.  
  93. static INLINE void
  94. _mesa_install_eval_vtxfmt(struct _glapi_table *disp,
  95.                           const GLvertexformat *vfmt)
  96. {
  97. }
  98.  
  99. static INLINE void
  100. _mesa_init_eval_dispatch(struct _glapi_table *disp)
  101. {
  102. }
  103.  
  104. #endif /* FEATURE_evaluators */
  105.  
  106. extern void _mesa_init_eval( struct gl_context *ctx );
  107. extern void _mesa_free_eval_data( struct gl_context *ctx );
  108.  
  109.  
  110. #endif /* EVAL_H */
  111.