home *** CD-ROM | disk | FTP | other *** search
/ Amiga Magazin: Amiga-CD 2000 April & May / AMIGA_2000_04.iso / patches / mesa3.1 / mesa-3_1.lha / src / AOS / wrpDisplay / wrpVertex.c < prev   
Encoding:
Text File  |  1999-09-01  |  3.9 KB  |  186 lines

  1. /*
  2.  * $Id: $
  3.  */
  4.  
  5. /*
  6.  * Mesa 3-D graphics library
  7.  * Version:  3.1
  8.  * Copyright (C) 1995  Brian Paul  (brianp@ssec.wisc.edu)
  9.  *
  10.  * This library is free software; you can redistribute it and/or
  11.  * modify it under the terms of the GNU Library General Public
  12.  * License as published by the Free Software Foundation; either
  13.  * version 2 of the License, or (at your option) any later version.
  14.  *
  15.  * This library is distributed in the hope that it will be useful,
  16.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  18.  * Library General Public License for more details.
  19.  *
  20.  * You should have received a copy of the GNU Library General Public
  21.  * License along with this library; if not, write to the Free
  22.  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  23.  */
  24.  
  25. void wrpCopyFlat(W3D_Vertex * dest, W3D_Vertex * source)
  26. {
  27.   /* vertex copy function
  28.    * flat shading, no texture mapping, no fogging, no ZBuffering
  29.    */
  30.  
  31.   dest->x = source->x;
  32.   dest->y = source->y;
  33. }
  34.  
  35. void wrpCopyFlatZ(W3D_Vertex * dest, W3D_Vertex * source)
  36. {
  37.   /* vertex copy function
  38.    * flat shading, no texture mapping, no fogging, ZBuffering
  39.    */
  40.  
  41.   dest->x = source->x;
  42.   dest->y = source->y;
  43.   dest->z = source->z;
  44. }
  45.  
  46. void wrpCopyGouraud(W3D_Vertex * dest, W3D_Vertex * source)
  47. {
  48.   /* vertex copy function
  49.    * gouraud shading, no texture mapping, no fogging, no ZBuffering
  50.    */
  51.  
  52.   dest->x = source->x;
  53.   dest->y = source->y;
  54.  
  55.   dest->color = source->color;
  56. }
  57.  
  58. void wrpCopyGouraudZ(W3D_Vertex * dest, W3D_Vertex * source)
  59. {
  60.   /* vertex copy function
  61.    * gouraud shading, no texture mapping, no fogging, ZBuffering
  62.    */
  63.  
  64.   dest->x = source->x;
  65.   dest->y = source->y;
  66.   dest->z = source->z;
  67.  
  68.   dest->color = source->color;
  69. }
  70.  
  71. void wrpCopyFlatFog(W3D_Vertex * dest, W3D_Vertex * source)
  72. {
  73.   /* vertex copy function
  74.    * flat shading, no texture mapping, fogging, ZBuffering
  75.    */
  76.  
  77.   dest->x = source->x;
  78.   dest->y = source->y;
  79.  
  80.   dest->w = source->w;
  81. }
  82.  
  83. void wrpCopyFlatFogZ(W3D_Vertex * dest, W3D_Vertex * source)
  84. {
  85.   /* vertex copy function
  86.    * flat shading, no texture mapping, fogging, ZBuffering
  87.    */
  88.  
  89.   dest->x = source->x;
  90.   dest->y = source->y;
  91.   dest->z = source->z;
  92.  
  93.   dest->w = source->w;
  94. }
  95.  
  96. void wrpCopyGouraudFog(W3D_Vertex * dest, W3D_Vertex * source)
  97. {
  98.   /* vertex copy function
  99.    * gouraud shading, no texture mapping, fogging, no ZBuffering
  100.    */
  101.  
  102.   dest->x = source->x;
  103.   dest->y = source->y;
  104.  
  105.   dest->w = source->w;
  106.  
  107.   dest->color = source->color;
  108. }
  109.  
  110. void wrpCopyGouraudFogZ(W3D_Vertex * dest, W3D_Vertex * source)
  111. {
  112.   /* vertex copy function
  113.    * gouraud shading, no texture mapping, fogging, ZBuffering
  114.    */
  115.  
  116.   dest->x = source->x;
  117.   dest->y = source->y;
  118.   dest->z = source->z;
  119.  
  120.   dest->w = source->w;
  121.  
  122.   dest->color = source->color;
  123. }
  124.  
  125. void wrpCopyFlatTex(W3D_Vertex * dest, W3D_Vertex * source)
  126. {
  127.   /* vertex copy function
  128.    * flat shading, texture mapping, no ZBuffering
  129.    */
  130.  
  131.   dest->x = source->x;
  132.   dest->y = source->y;
  133.  
  134.   dest->u = source->u;
  135.   dest->v = source->v;
  136.   dest->w = source->w;
  137. }
  138.  
  139. void wrpCopyFlatTexZ(W3D_Vertex * dest, W3D_Vertex * source)
  140. {
  141.   /* vertex copy function
  142.    * flat shading, texture mapping, ZBuffering
  143.    */
  144.  
  145.   dest->x = source->x;
  146.   dest->y = source->y;
  147.   dest->z = source->z;
  148.  
  149.   dest->u = source->u;
  150.   dest->v = source->v;
  151.   dest->w = source->w;
  152. }
  153.  
  154. void wrpCopyGouraudTex(W3D_Vertex * dest, W3D_Vertex * source)
  155. {
  156.   /* vertex copy function
  157.    * gouraud shading, texture mapping, no ZBuffering
  158.    */
  159.  
  160.   dest->x = source->x;
  161.   dest->y = source->y;
  162.  
  163.   dest->u = source->u;
  164.   dest->v = source->v;
  165.   dest->w = source->w;
  166.  
  167.   dest->color = source->color;
  168. }
  169.  
  170. void wrpCopyGouraudTexZ(W3D_Vertex * dest, W3D_Vertex * source)
  171. {
  172.   /* vertex copy function
  173.    * gouraud shading, texture mapping, ZBuffering
  174.    */
  175.  
  176.   dest->x = source->x;
  177.   dest->y = source->y;
  178.   dest->z = source->z;
  179.  
  180.   dest->u = source->u;
  181.   dest->v = source->v;
  182.   dest->w = source->w;
  183.  
  184.   dest->color = source->color;
  185. }
  186.