SM Posted May 1, 2013 at 11:11 PM Report #505538 Posted May 1, 2013 at 11:11 PM GLfloat mat_specular[] = { 1.0, 1.0, 1.0, 1.0 }; GLfloat light_position[] = { ship->getX(),ship->getY(),0, 1.0 }; GLfloat spotDir[] = { 0,100,0}; glLightfv(GL_LIGHT1,GL_SPECULAR,mat_specular); glLightfv(GL_LIGHT1,GL_POSITION,light_position); glLightf(GL_LIGHT1,GL_SPOT_CUTOFF,90.0); glLightf(GL_LIGHT1,GL_SPOT_EXPONENT,1.0); glLightfv(GL_LIGHT1,GL_SPOT_DIRECTION,spotDir); Alguem me sabe explicar nesse codigo porque e´que não se ve qualquer efeito do spotlight?
HappyHippyHippo Posted May 1, 2013 at 11:39 PM Report #505544 Posted May 1, 2013 at 11:39 PM tens uma superfície onde a luz seja reflectida ? na natureza ela reflete nas particulas de pó existentes no ar, mas em ambientes computacionais, tu não vez o cone de luz, isso tem de ser modelado. só vez a luz se ela refletir de em algum objecto IRC : sim, é algo que ainda existe >> #p@p Portugol Plus
SM Posted May 1, 2013 at 11:53 PM Author Report #505545 Posted May 1, 2013 at 11:53 PM Ja resolvi, tinha que actualizar constantemente o valor de x e y. Porém, está a funcionar com lag, cm tirar o lag?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now