in reply to Fan For Summer, perl opengl example

I don't know OpenGL well, but I can notice at least one mistake in translation: in function Fan_Render you call glPopMatrix three times at the end. In original there are two. Please check the code carefully, for sure the reason of lack of light is easy to find.
  • Comment on Re: Fan For Summer, perl opengl example

Replies are listed 'Best First'.
Re^2: Fan For Summer, perl opengl example
by orange (Beadle) on Jul 03, 2009 at 16:08 UTC
    thank you, i have depended on the last updated code in the thinbasic page near the end of that page which makes the fan rotate from left to right and vice versa, it contains 3 PopMatrix ,
    it appears to me that the light is shining from behind the Fan, since if we change the perl line
    if ($angle_horizontal > 110)...
    to
    if ($angle_horizontal > 200)
    the fan will show us that it is lighted from behind.
    this is strange, since if we omit the body of the fan as in the file:
    http://sites.google.com/site/zak31415/Home/Fan_blades.pl
    it will be lighted from front