Message-ID: From: Shawn Hargreaves To: djgpp AT delorie DOT com Subject: Re: Patterned polygons(PowerMonger style). Date: Wed, 15 Apr 1998 10:55:28 +0100 MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk Nick Anderson writes: > I have a 3d engine which renders a polygon landscape > just like the one in the old Bullfrog game PowerMonger, > but it only does flat shaded polygons right now. I am > using the Allegro library. [...] > I can't seem to get the patterns to work with the 3d polygon > modes? The Allegro drawing_mode() function, which is used to select things like patterned modes, only affects the geometric primitive functions and not any of the blitting or 3d polygon code. I'm not familiar with PowerMonger, but if you just want a 2d tiled pattern to be overlayed on your polygon, the best option is to use the 2d triangle() or polygon() functions. To do this with the 3d code, use any of the texture mapping functions (these could be made to simulate a flat 2d texture if you specify the right u/v coordinates, but are primarily intended for textures which will scale and stretch to look like they are part of the 3d object, rather than just a flat overlay). Shawn Hargreaves.