in reply to Daunting Problem With Perl Opengl Lighting

I wish I knew what I am supposed to see, could you post a description or a demo screenshot from the tutorial?

What I do see is a black box (500px) with a light gray circle in in the center about 300px across. I hope that is what I'm supposed to see, but I have no way of telling (without teaching myself OpenGL, which I really don't have time for right now).

grep
One dead unjugged rabbit fish later...
  • Comment on Re: Daunting Problem With Perl Opengl Lighting

Replies are listed 'Best First'.
Re^2: Daunting Problem With Perl Opengl Lighting
by iSina (Acolyte) on Jul 20, 2008 at 01:20 UTC
    Well that is good if you are not seeing any light on that circle (which is supposed to be a sphere). You are only supposed to see some a sphere with some shading and light. If you are not then the problem should be with the code and I hope I can fix it. Can you try changing the place of the light by changing the array and see if it creates any difference? I assume it wont though... our @Light_Position = ( 1.0, 1.0, 1.0, 1.0 );
      After changing @Light_Position I saw no change in the image.
      grep
      One dead unjugged rabbit fish later...
        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