Question on glNormal(NORMAL_PACK(0,inttov10(-1),0));

Post Reply
relminator
Posts: 84
Joined: Sun Apr 11, 2010 10:43 am

Question on glNormal(NORMAL_PACK(0,inttov10(-1),0));

Post by relminator » Fri Apr 30, 2010 11:28 am

Image

DL:
http://rel.betterwebber.com/junk.php?id=102

Okay so I tried the 3d wrappers for the first time and I have a few questions.

1. Why do I need to call glNormal(NORMAL_PACK(0,inttov10(-1),0)); whenever I wanted to texture. Not doing so would give be a black screen. Is it that lighting is enabled be default?

2. What is the value of the "far plane" that the 3d renderer can handle?

Code: Select all

gluPerspective(70, 256.0 / 192.0, 1, 200);
Somehow does not work as the tunnel get's clipped on the farplane on a value much less than 200.

Thanks!!!

elhobbs
Posts: 358
Joined: Thu Jul 02, 2009 1:19 pm

Re: Question on glNormal(NORMAL_PACK(0,inttov10(-1),0));

Post by elhobbs » Fri Apr 30, 2010 2:01 pm

did you test this on hardware? lighting is not enabled by default - though I can not say that I have tried setting normals without it being enabled. I am also not sure if fog is effected by normals.

zeromus
Posts: 212
Joined: Wed Mar 31, 2010 6:05 pm

Re: Question on glNormal(NORMAL_PACK(0,inttov10(-1),0));

Post by zeromus » Fri Apr 30, 2010 11:54 pm

Youre just not generating enough geometry. To prove it, translate the object -z over time and watch how it doesnt clip, it just goes into the distance. Then change the zFar to 10 and watch how it will clip very soon.

relminator
Posts: 84
Joined: Sun Apr 11, 2010 10:43 am

Re: Question on glNormal(NORMAL_PACK(0,inttov10(-1),0));

Post by relminator » Sat May 01, 2010 12:55 am

Tested on real hardware and it works as is.

Try to change the value of ARINGS to like 64, disable the glColor calls and it would still clip on the same farplane.

BTW, changing the ARINGS value to 64 would certainly lengthen the tunnel to about 4x its current length but it still clips on the same plane.

edit:
Zeromus told me v16 values are 4.12 FP. Seems like -8 is the limit.

Post Reply

Who is online

Users browsing this forum: No registered users and 25 guests