Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

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

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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://698867]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (8)
As of 2015-07-30 08:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (270 votes), past polls