1 / 13

COMP 360/560 Tutorial

COMP 360/560 Tutorial. Aug 28, 2013 SYM II Lab. Today we will … • Familiarize everyone with – Programming environment – FLTK, Code structure – Labs and submission – OpenGL: some 2D and 3D exercises. Programming environment. Free!. Visual C++ 2010 Express.

Download Presentation

COMP 360/560 Tutorial

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. COMP 360/560 Tutorial Aug 28, 2013 SYM II Lab

  2. Today we will … • • Familiarize everyone with • – Programming environment • – FLTK, Code structure • – Labs and submission • – OpenGL: some 2D and 3D exercises

  3. Programming environment Free! Visual C++ 2010 Express All template code will be given in Visual C++ 2010 Express Download VC++ 2010 Express: http://www.microsoft.com/visualstudio/eng/products/visual-studio-2010-express Intro to C++: http://www.cplusplus.com/files/tutorial.pdf

  4. Set Labas the Startup Project • • Try to compile project with • F5, or the green arrow button • Debug Mode, slower but has • debugger • • Release Mode, faster, when • your code is stable

  5. Code Structure

  6. ObjectViewer.cpp • • OpenGL code • • We will be looking at …. • – 2D drawing • – 3D drawing (2d is just a subspace/ • subset/plane/projection). • – Simple event handling

  7. Labs and submission Email title: COMP 360/560 Lab X submission –- Tom and Jerry • Add a README with your name • • Always delete the binaries or • unnecessary files to keep the • file size low for email submissions • • Send to: terry.tang@rice.edu Always test compile and run before Submission !

  8. Exercise 2D and 3D drawing OpenGL resources: http://www.glprogramming.com/red/ http://nehe.gamedev.net/

  9. Exercise 1 • Translate the triangle so that its lengths are preserve, but one of its vertices correspond to the point of the mouse click. • Hint: use getWidth() and getHeight()

  10. Exercise 2 • Continuously rotate the triangle about one of its vertices • Hint: draw() function is being repeated called • There’s already a variable call _rot

  11. Exercise 3 and 4 • Submit before 11:59PM next Monday (Sept. 2, 2013). • 3D mode: Rotate the cube when the key ‘r’ is held down. • 2D mode: When the mouse is clicked in 2D mode, place a triangle down such that the mouse point coincides with the vertex of the triangle. Done! Have fun!

More Related