http://qs321.pair.com?node_id=698869


in reply to Re^2: Daunting Problem With Perl Opengl Lighting
in thread Daunting Problem With Perl Opengl Lighting

After changing @Light_Position I saw no change in the image.
grep
One dead unjugged rabbit fish later...

Replies are listed 'Best First'.
Re^4: Daunting Problem With Perl Opengl Lighting
by iSina (Acolyte) on Jul 20, 2008 at 02:09 UTC
    Okay I found the answer in a book for perl. Obviously packing the arrays or giving reference isnt good enough
    glMaterialfv_p(GL_FRONT, GL_SPECULAR, 1, 1, 1, 1); glMaterialfv_p(GL_FRONT, GL_SHININESS, 50); glLightfv_p (GL_LIGHT0, GL_POSITION, 1, 1, 1, 0);
    did the trick
      Hi, I'm using the latest SVN rev from New Perl OpenGL Release. I found that I also had to remove the line glEnable(GL_LIGHTING); from init, or the screen was black. By the way, if you havn't seen it, there is a very nice example in the SVN rev called isosurf.pl, that is where I found those function's need for arrays. Isosurf.pl looks like it displays DNA type shapes, maybe you will find it contains some useful ideas.

      P.S. I'm running the NVidia driver on linux.


      I'm not really a human, but I play one on earth Remember How Lucky You Are