0

I'm programming a game which is called Falldown. I'm almost finished; now I want to design the ball. How can I light this ball such that it glows like these examples?

enter image description here

enter image description here

I created my cube with glutSolidSphere and ask myself how I can light the ball.

void ball()
{
    glColor4f(0, 0, 0.5, 0.5);
    glutSolidSphere(0.25,40,40);        
}

void initLightSources()
{
     ?????? 

     glEnable( GL_LIGHTING );
     glEnable(GL_DEPTH_TEST);
     glEnable( GL_LIGHT0 );
}
Jason Aller
  • 3,541
  • 28
  • 38
  • 38
  • One of your sample pictures shows just a glow over a sphere while another shows some additional features. Do you want to get just a glow or something more? – kolenda May 29 '14 at 17:09
  • I like the 2nd example more, but i think it will be more difficult.? – user3622854 May 29 '14 at 17:25
  • I think he wants to achieve the glowing effect. – Veritas May 29 '14 at 17:53
  • Yes, that could be. I´ve already heard about it. – user3622854 May 29 '14 at 18:03
  • Well here you go then, Google -> "glowing effect openGL". Usually it's done as a post rendering effect so your won't be able to do it as simply as `glEnable(GL_KICKASS_GLOWING_EFFECT);` – agrum May 29 '14 at 20:03
  • I wish it would be that easy, but there are no entries about the glowing effect in combination to a sphere. Sry, but I´m still a beginner in programming. – user3622854 May 30 '14 at 05:07

0 Answers0