1 /* 2 3 3DKIT version 1.2 4 High speed 3D graphics and rendering library for Linux. 5 6 Copyright (C) 1996-2017 Paul Sheer 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., 59 Temple Place - Suite 330, Boston, 21 MA 02111-1307, USA 22 23 */ 24 25 /* 26 27 File: triangle.h 28 29 */ 30 31 #define max(x,y) (((x) > (y)) ? (x) : (y)) 32 #define min(x,y) (((x) < (y)) ? (x) : (y)) 33 34 typedef struct { 35 36 unsigned char *bitmap1; 37 unsigned char *bitmap2; 38 39 int bf; 40 41 } TD_tridata; 42 43 44 45 void gl_triangle (int x0, int y0, int z0, int x1, int y1, int z1, int x2, int y2, int z2, int bf); 46 void gl_wtriangle (int x0, int y0, int xd0, int yd0, int z0, \ 47 int x1, int y1, int xd1, int yd1, int z1, \ 48 int x2, int y2, int xd2, int yd2, int z2, \ 49 TD_tridata * tri); /*This does not alter tri structure*/ 50 void gl_swtriangle (int x0, int y0, int xd0, int yd0, \ 51 int x1, int y1, int xd1, int yd1, \ 52 int x2, int y2, int xd2, int yd2, int c, \ 53 TD_tridata * tri); /*This does not alter tri structure*/ 54 55 void gl_striangle (int x0, int y0, int x1, int y1, int x2, int y2, int color, int bf); 56 57 58 #define TRIANGLE_COLOR_LOOKUP_TABLE_SIZE 4096 59 60 void gl_trisetcolorlookup(int i, long c); 61 void gl_trisetdrawpoint(void (setpixelfunc) (int, int, int)); 62 63