Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: Daunting Problem With Perl Opengl Lighting

by grep (Monsignor)
on Jul 20, 2008 at 00:42 UTC ( #698867=note: print w/replies, xml ) Need Help??

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).

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.
      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

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://698867]
talexb finishes writing a Cranky Old Man post, and hopes it will be taken in the spirit intended. :)
[Corion]: We're happy to have you here, talexb!
[talexb]: Thanks. :)

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (11)
As of 2018-07-19 14:09 GMT
Find Nodes?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?

    Results (409 votes). Check out past polls.