Marc neveu
Download
1 / 6

OpenGL - PowerPoint PPT Presentation


  • 107 Views
  • Uploaded on

Marc Neveu. OpenGL. 2 Modes Mode « manuel »: glDisable(GL_Lighting); glColor3f(r,v,b); Mode « avec modèle » glEnable(GL_Lighting); + lumières + matériaux. Illumination. Définir les lumières : glLightxx(n°,enum,param) ‏ ; ex : glLightfv(GL_LIGHT0, GL_POSITION, pos0);

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' OpenGL' - ghalib


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Marc neveu

Marc Neveu

OpenGL


2 Modes

Mode « manuel »:

glDisable(GL_Lighting);

glColor3f(r,v,b);

Mode « avec modèle »

glEnable(GL_Lighting);

+ lumières

+ matériaux

Illumination


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

Lumières


Quelques caract ristiques de lumi re

GLfloat pos[4] = { 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);

Quelques caractéristiques de lumière


D finir les mat riaux glmaterialxx face enum param ex glmaterialfv gl front gl diffuse red

Définir les matériaux:

glMaterialxx(face,enum,param);

ex : glMaterialfv(GL_FRONT,GL_DIFFUSE,red);

Matériaux


Quelques caract ristiques de mat riau

GLfloat mamb[4] = { 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);

Quelques caractéristiques de matériau


ad