Download presentation
Presentation is loading. Please wait.
Published byCameron Perry Modified over 9 years ago
1
Interactive Computer Graphics CS 418 – Spring 2015 TA: Zhicheng Yan, Sushma S Kini, Mary Pietrowicz Originally created by Mahsa Kamali
2
Agenda for today Communication Channels & Resources Set up Programming Environment! We will be showing some code snippets in class so bring your laptop if you want to follow along
3
Piazza Post questions that might be beneficial to everyone www.piazza.com www.piazza.com Don’t wait until the night before the MP/HW is due Send your questions and ask for help soon!
4
TA Info TAs: Zhicheng Yan. Office Hour: Fri 4-5pm SC 3238A Email: zyan3 at illinois.edu Mary Pietrowicz. Ofc. Hour: Wed 2:30-3:30 SC 0207 Email: mpietro2@illinois.edumpietro2@illinois.edu Sushma Kini. Office Hour: Thurs 3-4pm SC 0207 Email: sskini2@illinois.edusskini2@illinois.edu
5
Resources Google, StackOverflow, Lighthouse 3D…… Tutorials – http://nehe.gamedev.net/ – http://www.lighthouse3d.com/opengl/ – http://www.xmission.com/~nate/opengl.html Books – OpenGL Programming Guide (OpenGL Red Book) Libraries: – DevIL (OpenIL): http://openil.sourceforge.net/ – CXImage: http://www.codeproject.com/KB/graphics/cximage.aspx
6
Student Graphics @ Illinois UIUC Student Chapter of ACM SIGGRAPH http://www.acm.uiuc.edu/siggraph/ Short Films, Video Games, Graphics Research GameBuilders http://www.acm.uiuc.edu/gamebuilders/ Video Games
7
Compile on Windows Microsoft Visual Studio (2008 and later) OpenGL (already provided) GLUT: http://www.opengl.org/resources/libraries/glut/ http://www.opengl.org/resources/libraries/glut/ http://user.xmission.com/~nate/glut.html http://user.xmission.com/~nate/glut.html Put files in the default search path OR Link through the project settings Use the HelloWorld project on discussion page
8
Troubleshooting Check if you use the default stdfax.h precompiled header option in your project, and forget to include "stdafx.h“ or “stdlib.h” in your code. Check if the compiler is complaining about linking error. Try to add glut32.lib, glu32.lib, and opengl32.lib in your link dependency.
9
Compile on Linux Get the developer packages OpenGL ▪ Nvidia or Mesa version etc. Glut ▪ freeGlut Ensure that install directories are in your compiler path Compile with the appropriate flags (–lglut) http://www.videotutorialsrock.com/opengl_tutorial/g et_opengl_setup_linux/video.php
10
Compile on OSX Use Xcode… http://lnx.cx/docs/opengl-in-xcode/ http://lnx.cx/docs/opengl-in-xcode/
11
Q&A
12
Tips for success Start Early Compile/Debug often Use a debugger (http://www.gremedy.com/) Ask questions early Use libgfx by Michael Garland: http://mgarland.org/software/libgfx.html Start Early
13
OpenGL Function Format
14
Drawing Polygons (Class example) glBegin(GL_TRIANGLE_STRIP); glVertex3f(0,0,0); glVertex3f(.5,1,0); glVertex3f(1,0,0); glVertex3f(1.5,.8,0); glVertex3f(2,0,0); glVertex3f(3,1,0); glEnd(); v1 v2 v3 v4 v5 v6
15
Meshes
16
Mesh Types Explicit mesh description List of polygonal faces (w/ duplicates) “Polygon soup” Indexed Mesh Description List of vertices List of polygons Space efficient
17
Mesh Formats Obj (we use in this class) Contains definitions of 1 or more named 3D objects ASCII No compression MTL A Simple Obj Viewer Can be used to check how the given mesh looks like: MeshLabMeshLab
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.