OpenGL PowerPoint PPT Presentation

presentation player overlay
1 / 6
About This Presentation
Transcript and Presenter's Notes

Title: OpenGL


1
OpenGL
  • Marc Neveu

2
Illumination
  • 2 Modes
  • Mode  manuel 
  • glDisable(GL_Lighting)
  • glColor3f(r,v,b)
  • Mode  avec modèle 
  • glEnable(GL_Lighting)
  • lumières
  • matériaux

3
Lumières
  • Définir les lumières
  • glLightxx(n,enum,param)?
  • ex glLightfv(GL_LIGHT0, GL_POSITION, pos0)
  • Les allumer
  • glLightEnable(n)
  • ex glEnable(GL_LIGHT0)

4
Quelques caractéristiques de lumière
  • GLfloat pos4 1.0, 2.0, 2.0, 1.0
  • glLightfv(GL_LIGHT1, GL_POSITION, pos)
  • glLightfv(GL_LIGHT1, GL_AMBIENT, lamb)
  • glLightfv(GL_LIGHT1, GL_DIFFUSE, ldif)
  • glLightfv(GL_LIGHT1, GL_SPECULAR, lspec)
  • glLighti(GL_LIGHT1, GL_SPOT_EXPONENT, 30)
  • glLighti(GL_LIGHT1, GL_SPOT_CUTOFF, 90)

5
Matériaux
  • Définir les matériaux
  • glMaterialxx(face,enum,param)
  • ex glMaterialfv(GL_FRONT,GL_DIFFUSE,red)

6
Quelques caractéristiques de matériau
  • GLfloat mamb4 0.6, 0.6, 0.0 ,1.0
  • glMaterialfv(GL_FRONT, GL_AMBIENT, mamb)
  • glMaterialfv(GL_FRONT, GL_DIFFUSE, mdif)
  • glMaterialfv(GL_FRONT, GL_SPECULAR, mspec)
  • glMaterialf(GL_FRONT, GL_SHININESS, 100)
Write a Comment
User Comments (0)
About PowerShow.com