Path: chuka.playstation.co.uk!news From: Peter Hardy Newsgroups: scee.yaroze.programming.3d_graphics Subject: Re: more dynamic tmd problems Date: Wed, 20 May 1998 13:47:35 +0100 Organization: PlayStation Net Yaroze (SCEE) Lines: 65 Message-ID: <3562D0E7.C84@mdx.ac.uk> References: <355849D2.2F3CFB4C@altavista.net> <6j9lk1$r1a6@chuka.playstation.co.uk> <355968CC.17FC1B94@hinge.mistral.co.uk> <35618997.443F@mdx.ac.uk> <3561946B.BD69B3B8@hinge.mistral.co.uk> NNTP-Posting-Host: nova.mdx.ac.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.01Gold (X11; I; SunOS 5.5 sun4u) Craig Graham wrote: > > Peter Hardy wrote: > > > > Yes. > > > > > > > Mario > > > > > > Craig > > > > Erm...how? > > Please specify answer in word>1 format. ;) > > > > Thanx - if can help > > Thanx! - if you can't > > /* > * Add a GP4 primitive to the TMD. [gourard shaded, no light source, 4 sided poly] > *-------- > *Returns: > * pointer to the primitive just added > */ > TMD_GP4 *TMD_AddGP4(short vr0, short vr1, short vr2, short vr3, unsigned char *rgb) > { > TMD_GP4 *gp4; > > assert(current_primitive); > assert(current_object); > > gp4=(TMD_GP4*)current_primitive; > current_primitive=(void*)(gp4+1); > > gp4->dummy0=gp4->head.mode=0x39; > gp4->head.flag=1; > gp4->head.ilen=6; > gp4->head.olen=8; > > gp4->vr0=vr0; > gp4->vr1=vr1; > gp4->vr2=vr2; > gp4->vr3=vr3; > > gp4->r0=rgb[0]; gp4->g0=rgb[1]; gp4->b0=rgb[2]; > gp4->r1=rgb[3]; gp4->g1=rgb[4]; gp4->b1=rgb[5]; > gp4->r2=rgb[6]; gp4->g2=rgb[7]; gp4->b2=rgb[8]; > gp4->r3=rgb[9]; gp4->g3=rgb[10]; gp4->b3=rgb[11]; > > current_object->n_primitive++; > > return gp4; > } > > Craig. Thanx babe. I had done it right after all. I was incrementing by the wrong type of pointer (DOH!). PS I got the textured primitves I was having trouble with, working as well. I forgot to multiply the image.pw by the number of texels per pixel, so my u, v mappings were all buggered. (Double DOH!). Any way got to go ... Luv, Ugs and buckets of poo Peter