c++ - Ball of Light (Light, Material?) glutsolidsphere -


i'm programming game called falldown. i'm finished; want design ball. how can light ball such glows these examples?

enter image description here

enter image description here

i created cube glutsolidsphere , ask myself how can light 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 ); } 


Comments

Popular posts from this blog

php - render data via PDO::FETCH_FUNC vs loop -

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

The canvas has been tainted by cross-origin data in chrome only -