Course Intro: Syllabus, Calendar, Website General format: Projects, presentation of projects Name note Comparison of content with CS492 Game Engine Design Book, if I remember to bring it Where we ended up in Game Engine Design GPU Programming will NOT cover: Collision Detection Game entity management (object heirarchy, etc) Physics and movement Other game-related stuff OpenGL 1.x Game Engine Design did not cover: Vertex and Fragment Shader Programming GLSL Non-visual GPU Programming (CUDA, OpenCL) OpenGL 2.0+ Commonality: Working with 3D (clipping, color, light, etc) OpenGL In Game Engine Design, working with 3D caused more issues than anything else We won't have old favorites like glRotate this time either! Justification for OpenGL Other options: DirectX, GNMX, Nintendo API, Vulkan, Glide, etc. OpenGL is cross-platform and easy to start with Nature of the GPU Memory Large number of "shaders" Originally, they determined color shades Now, they're fairly general-purpose Wikipedia had this to say: In computer graphics, a shader is a type of computer program that was originally used for shading (the production of appropriate levels of light, darkness, and color within an image) but which now performs a variety of specialized functions in various fields of computer graphics special effects or does video post-processing unrelated to shading, or even functions unrelated to graphics at all. Shaders do these things in a graphics pipeline: for each vertex: Apply a transformation for each fragment: Determine a color The full pipeline is somewhat more complicated than this Picture: http://www.ntu.edu.sg/home/ehchua/programming/opengl/cg_basicstheory.html There are other pictures with more stages OpenGL 2.0+ vs. 1.x Shaders: Vertex and Fragment Vertex shader performs 3D math operations We have to program the shaders to do things like rotate! And, we'll have to maintain our own transformation matrices! man works now red book doesn't Libraries: GL GLU GLUT (not always in caps) GLEW (didn't use it last time, helps with things glut doesn't) SDL (We might not use this much, but it should be mentioned) GLM (GL Math. It'll help you rotate things, etc) Toolchain: make gcc / g++ git for some stuff Book! We'd have needed at least two First book: https://en.wikibooks.org/wiki/OpenGL_Programming We'll have a different one for CUDA Might jump around a bit - I like this one, but it's not fully complete Ok, enough talk, let's do something! git and grabbing the book tutorials (is easy on Linux) Other OS people: I'm sure you can figure it out Setup and build They run (or did on the two non-310 computers I tried them on) But how now? Graphics and triangles, and other shapes 01 has silly-simple shader programs, so let's look at those Lab will be easy today, since it's the first day Build and run tutorial 1 Change the triangle into a pentagon Make it yellow instead of blue