Mail Archives: djgpp/1998/04/15/10:38:59
Message-ID: | <D1FB30BBA491D1118E6D006097BCAE39267FB7@Probe-nt-2a.Probe.co.uk>
|
From: | Shawn Hargreaves <ShawnH AT Probe DOT co DOT uk>
|
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
|
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.
- Raw text -