Skip to Main Content
A Hitchhiker's Guide to Virtual Reality
book

A Hitchhiker's Guide to Virtual Reality

by Karen McMenemy, Robin Stuart Ferguson
July 2007
Beginner to intermediate content levelBeginner to intermediate
604 pages
17h 36m
English
A K Peters/CRC Press
Content preview from A Hitchhiker's Guide to Virtual Reality
i
i
i
i
i
i
i
i
328 13. Programming 3D Graphics in Real Time
void Make3dListS(void){ // make display lists
GLfloat x,y,z,n[3],color[4],spec_color[]=(1.0,1.0,1.0};
FACE
*
fp;
VERTEX
*
v,
*
v1,
*
v2,
*
v0;
normal
*
nv;
int i,j,k,Vi,V[3],jf,jl,count,strip;
if(Nface == 0)return;
scale=GetScaleValue(c)
*
ObjScale;
if((nv=(normal
*
)malloc(sizeof(normal)
*
Nvert)) == NULL)return;
..
// make vertex normals from adjacent vertices
..
if(listID > 0){glDeleteLists(listID,listID);listID=0;}
listID=1; glNewList(listID,GL_COMPILE);
count=0;
glBegin(GL_TRIANGLES);
fp=MainFp; for(i=0;i<Nface;i++,fp++){ // loop over all polygons
if(fp->mapped)continue;
// skip any polygons with image maps applied
v0=(MainVp+fp->V[0]); ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Developing Virtual Reality Applications

Developing Virtual Reality Applications

Alan B. Craig, William R. Sherman, Jeffrey D. Will
Virtual Reality Blueprints

Virtual Reality Blueprints

Charles Palmer, John Williamson
Step into the Metaverse

Step into the Metaverse

Mark van Rijmenam

Publisher Resources

ISBN: 9781568814773