Page 1 of 1

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

Posted: Fri Apr 30, 2010 11:28 am
by relminator
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!!!

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

Posted: Fri Apr 30, 2010 2:01 pm
by elhobbs
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.

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

Posted: Fri Apr 30, 2010 11:54 pm
by zeromus
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.

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

Posted: Sat May 01, 2010 12:55 am
by relminator
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.