delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/04/16/04:32:05

From: "Nick Anderson" <andersnd AT aol DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Patterned polygons(PowerMonger style).
Date: Thu, 16 Apr 1998 08:52:22 +0100
Organization: [not set]
Lines: 42
Message-ID: <6h4del$qmf$1@svr-c-02.core.theplanet.net>
References: <D1FB30BBA491D1118E6D006097BCAE39267FB7 AT Probe-nt-2a DOT Probe DOT co DOT uk>
NNTP-Posting-Host: gate-isdn.telsci.co.uk
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

>I'm not familiar with PowerMonger

Oh... okay. ;-)

> 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).


    The problem is that I DON'T want to have to use texture mapping :-)

    The thing about powermonger was that as the landscape rotated, the
pattern kept it's intensity as the polygon changed.


    I am holding the information for each polygon in something like

V3D_f  v[4];

    and when I use the perspective projection, the v[?].x, v[?].y and
v[?].z are turned into v[?].x and v[?].y coordinates on the screen.
Therefore, I could probably call the 2D polygon routines anyway.

Nick Anderson
email: andersNOSPAMPLEASEnd AT hotmNOSPAMPLEASEail DOT com
web: http://www.fortunecity.com/skyscraper/online/263


P.S. My landscape program(formerly "The Planet Project") used
GCOL(interpolated) shading. Whenever I set up an RGB table to do GRGB
gouraud shading, I ended up with a completely blue landscape. Any chance of
perhaps some more tutorials about RGB use in 3D routines?

> Shawn Hargreaves.



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019