Over 10 Million Study Resources Now at Your Fingertips


Download as :
Rating : ⭐⭐⭐⭐⭐
Price : $10.99
Language:EN
Pages: 2

Mat mat specr mat specg mat specb glmaterialfv

OpenGL Programming Guide (Addison-Wesley Publishing Company)

#include <stdlib.h>
#include <math.h>
#include "jitter.h"

glFrontFace (GL_CW);
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);
glEnable(GL_AUTO_NORMAL); glEnable(GL_NORMALIZE); glEnable(GL_DEPTH_TEST);

glClearColor(0.0, 0.0, 0.0, 0.0); glClearAccum(0.0, 0.0, 0.0, 0.0); /* make teapot display list */
teapotList = glGenLists(1);
glNewList (teapotList, GL_COMPILE); glutSolidTeapot (0.5);
glEndList ();
}

}

mat[0] = ambr; mat[1] = ambg; mat[2] = ambb; mat[3] = 1.0; glMaterialfv (GL_FRONT, GL_AMBIENT, mat);
mat[0] = difr; mat[1] = difg; mat[2] = difb;
glMaterialfv (GL_FRONT, GL_DIFFUSE, mat);
mat[0] = specr; mat[1] = specg; mat[2] = specb;
glMaterialfv (GL_FRONT, GL_SPECULAR, mat);
glMaterialf (GL_FRONT, GL_SHININESS, shine*128.0);
glCallList(teapotList);
glPopMatrix();

void display(void)
{
int jitter;
GLint viewport[4];

How It Works
Login account
Login Your Account
Add to cart
Add to Cart
Payment
Make payment
Document download
Download File
PageId: ELI3907994
img
Uploaded by :
Z3Jv8WVdkOIQNqPEPvRJ
Page 1 Preview
mat mat specr mat specg mat specb glmaterialfv
Sell Your Old Documents & Earn Wallet Balance