140 likes | 145 Vues
Computer Graphics and the Game Industry Speaker: Ted Bisson. Computer Graphics and Games. For today: Who am I? A brief introduction to OpenGL The Game Industry. Who am I?. Ted Bisson USF class of 1998, Mathematics and Computer Science Senior Programmer, Blizzard Entertainment
E N D
Computer Graphics and the Game Industry Speaker: Ted Bisson
Computer Graphics and Games • For today: • Who am I? • A brief introduction to OpenGL • The Game Industry
Who am I? • Ted Bisson • USF class of 1998, • Mathematics and Computer Science • Senior Programmer, Blizzard Entertainment • Diablo II, Diablo II: Lord of Destruction
OpenGL What is OpenGL?
OpenGL Application OpenGL 3D Hardware
OpenGL • OpenGL vs. DirectX • DirectX runs on Windows platforms • OpenGL is relatively universal • DirectX is better optimized for Windows platforms • But it’s ok, they are more the same than different!
OpenGL: 3D Engine Basics • Viewports • Matrices • Vertex Lists • Triangle Lists • Lights • Textures
Structure of the Demo System WinMain, Draw, Utility, COpenGL Primitives CVector, CMatrix, CColor, CFile, CLine, CPath Containers CLineList, CVertexList, CTriangleList Draw Objects CDisc, CModel
Structure of the Demo WinMain // Initialization Create a window (); Initialize OpenGL (); // Message loop while (not done) { if (there is a message) { Pass to appropriate message handler. } else { DrawProcess (); } }
Structure of the Demo DrawProcess // Render the current scene. sRenderScene (); // Synchronize to constant frame rate. if (time to update scene) sUpdateScene ();
Structure of the Demo sRenderScene // Begin processing the scene, this includes // clearing the memory buffer. // Submit objects to be rendered. // End scene processing. // Present the rendered scene.
Structure of the Demo Submitting objects to the API // Specify modes, and begin submitting data. glPolygonMode (GL_FRONT, GL_FILL); glBegin (GL_TRIANGLES); // For each object, submit vertex data. glColor3f (red, green, blue) glNormal3f (normal_x, normal_y, normal_z); glVertex3f (position_x, position_y, position_z); // Indicate the end of this object. glEnd ();
OpenGL Questions about OpenGL?