2D textured polygons ?
Blitz3D Forums/Blitz3D Programming/2D textured polygons ?
| ||
Hi ! Don t know if this is the good place, but I m looking for functions to draw 2D Textured Polygons. When i worked in dos mode I got a 3D book that had those functions but now i ve lost it 8( Can someone help ? Thanks |
| ||
Drawing 2D textured polys won't be very fast. To do it you need to calculate the start and end pixel for each horizontal line using a line drawing algorithm, like bresenhams for example, and then while drawing each pixel you calculate where that pixel is in the texture and get the color from there. |
| ||
Any reason you can't do this in a 3D graphics mode? It would be so simple. :) |
| ||
Ummm... I think what kochonkichi is asking for is a library that makes a quad and lets you control it as if it were a 2D sprite. There are several libraries around that do this. Have a look at these... "SpriteControl" by SyntaxError ...I'm using this one for my lens flare system. http://www.blitzcoder.com/cgi-bin/showcase/showcase_showentry.pl?id=syntax_error10222002143802&comments=no "SpriteMaster Pro" also by SyntaxError ...a more comprehensive system http://homepage.ntlworld.com/config/imagepacker/packer.htm "nSprite" by GoSsE http://www.nuloen.com/nsprite.html "Single Surfaces" by BloodLocust http://www.redflame.net/files/singlesurfacestuff.zip |
| ||
thanks all but i realy need to have a 2D function to Draw polygons ( ex: for Blitz+ Users ) so i think i m going to write it myself. Thanks @ kochon... |