|
Filling a polygon with a texture? |
nshade
Member #4,372
February 2004
|
Is there a slick way of filling an area with a repeating texture. I could of sworn that al_draw_filled_rectangle did it, but I was mistaken. Maybe it's a fill command I'm thinking of? EDIT
I just found this thread here: It says you can't really do it without shaders.. Is there a tutorial about what shaders are and how to use them with Allegro. When I look up them up I get referred to some new language I'm supposed to learn or I have to talk to by graphics card directly. The Allegro docs are no help as it wants me to make an shader "object" and I don't understand what one of those even does. If I have a texture "ALLEGRO_BITMAP *tex" that has an 8x8 pattern in it. How would I use tell a shader to use that in a box from x1,y1 to x2,y2? |
Edgar Reynaldo
Major Reynaldo
May 2007
|
That's not true. You can do it without shaders. You just need to have a single texture for every single pattern you want to 'flood fill'. Because you'll be passing texels greater than 1.0 and less than 0.0 . My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
nshade
Member #4,372
February 2004
|
That's cool, but what is the allegro function I would use? |
|