X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;ds=sidebyside;f=src%2Fgaw%2Fpolyfill.h;h=e9aa6bb92bc5d4d3e7621f3806dd72de4d0b06ad;hb=208078d05078a27b5cdfc213031d91e88180994b;hp=ad2d5b3bf7d23135593f5cb5e37887534f0ede91;hpb=7fccf8b3543c8cdb993252f0cf9a6b9ed826408e;p=retroray diff --git a/src/gaw/polyfill.h b/src/gaw/polyfill.h index ad2d5b3..e9aa6bb 100644 --- a/src/gaw/polyfill.h +++ b/src/gaw/polyfill.h @@ -1,3 +1,20 @@ +/* +RetroRay - integrated standalone vintage modeller/renderer +Copyright (C) 2023 John Tsiombikas + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ #ifndef POLYFILL_H_ #define POLYFILL_H_ @@ -64,7 +81,7 @@ enum { typedef uint32_t gaw_pixel; #define PACK_RGB(r, g, b) \ - (((r) << 16) | ((g) << 8) | (b)) + (0xff000000 | ((r) << 16) | ((g) << 8) | (b)) #define PACK_RGBA(r, g, b, a) \ (((a) << 24) | ((r) << 16) | ((g) << 8) | (b)) #define UNPACK_R(pix) ((pix) & 0xff) @@ -121,17 +138,27 @@ void polyfill_add_gouraud(struct pvertex *verts, int nverts); void polyfill_add_tex_wire(struct pvertex *verts, int nverts); void polyfill_add_tex_flat(struct pvertex *verts, int nverts); void polyfill_add_tex_gouraud(struct pvertex *verts, int nverts); + +void polyfill_wire_zbuf(struct pvertex *verts, int nverts); void polyfill_flat_zbuf(struct pvertex *verts, int nverts); void polyfill_gouraud_zbuf(struct pvertex *verts, int nverts); +void polyfill_tex_wire_zbuf(struct pvertex *verts, int nverts); void polyfill_tex_flat_zbuf(struct pvertex *verts, int nverts); void polyfill_tex_gouraud_zbuf(struct pvertex *verts, int nverts); +void polyfill_alpha_wire_zbuf(struct pvertex *verts, int nverts); void polyfill_alpha_flat_zbuf(struct pvertex *verts, int nverts); void polyfill_alpha_gouraud_zbuf(struct pvertex *verts, int nverts); +void polyfill_alpha_tex_wire_zbuf(struct pvertex *verts, int nverts); void polyfill_alpha_tex_flat_zbuf(struct pvertex *verts, int nverts); void polyfill_alpha_tex_gouraud_zbuf(struct pvertex *verts, int nverts); +void polyfill_add_wire_zbuf(struct pvertex *verts, int nverts); void polyfill_add_flat_zbuf(struct pvertex *verts, int nverts); void polyfill_add_gouraud_zbuf(struct pvertex *verts, int nverts); +void polyfill_add_tex_wire_zbuf(struct pvertex *verts, int nverts); void polyfill_add_tex_flat_zbuf(struct pvertex *verts, int nverts); void polyfill_add_tex_gouraud_zbuf(struct pvertex *verts, int nverts); +void draw_line(struct pvertex *verts); +void draw_line_zbuf(struct pvertex *verts); + #endif /* POLYFILL_H_ */