SlideShare a Scribd company logo
Now Playing:
Homecoming
Kanye West
from Graduation
Released September 11, 2007
OpenGL Programming
II
Rick Skarbez, Instructor
COMP 575
September 13, 2007
Robot Ate My
Homework
Mark Shirra
Vancouver Film School, SIGGRAPH 2006
Available online:
http://www.vfs.com/showcase.php?id=7&category_id=10&project_id=858
Announcements
• Reminder: Homework 1 is due today
• Questions?
• Class next Tuesday (9/18) will be held
in SN 014
• Introduced the basics of OpenGL
programming
• OpenGL is a state machine
• All objects are lists of vertices
• 2 matrices in OpenGL
• ModelView
• Projection
Last Time
Today
• Review a bit from last time
• Work through some demos
• Introduce/demo windowing toolkits
• GLUT
• FLTK
OpenGL in Java
• UPDATE: Apparently, the newest
versions of Netbeans include JOGL
bindings
• Check out http://unc-cs575-
lerch.blogspot.com
• Many thanks to Tae
Clearing the Screen
glClearColor(0.0, 0.0, 0.0, 0.0)
glClearDepth(1.0);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT)
To Clear The On-Screen Image And The Z-Buffer:
Our First OpenGL
Code
...
glClearColor(0.0, 0.0, 0.0, 0.0);
glClear(GL_COLOR_BUFFER_BIT);
glColor3f(1.0, 1.0, 1.0);
glOrtho(-1.0, 1.0, -1.0, 1.0, -1.0, 1.0);
glBegin(GL_POLYGON);
glVertex2f(-0.5, -0.5);
glVertex2f(-0.5, 0.5);
glVertex2f(0.5, 0.5);
glVertex2f(0.5, -0.5);
glEnd();
glFlush();
...
Drawing into a
Window
• You specify what you want drawn with
OpenGL
• But where are you drawing it?
• Need to call the OS to get a window
• Two ways to do this:
1. Make you learn the specifics of the
operating / windowing system
2. Use a toolkit that hides the OS interface
UI Toolkits
• There are a lot of options to choose
from:
• GLUT
• FLTK
• QT
• wxWindows
• Cocoa
• etc.
• I’m going to demonstrate GLUT today
GLUT
• OpenGL Utility Toolkit
• Cross-Platform C++ Drawing/UI Toolkit
• Provides functions to make starting up
and drawing fast and easy
• Supports only limited user interfaces
Installing GLUT
• On Windows:
• Download from Nate Robins’ website:
• http://www.xmission.com/%7Enate/glut.ht
ml
• glut-3.7.6-bin has the dll/lib/header that
are required
• Copy glut.dll to {Windows DLL dir}glut32.dll
• Copy glut.lib to {VC++ lib path}glut32.lib
• Copy glut.h to {VC++ include path}GLglut.h
Using GLUT
• Only need to include glut.h
• #include <GLglut.h>
• Automatically includes gl.h and glu.h
• Lighthouse3D has a good GLUT tutorial
• http://www.lighthouse3d.com/opengl/glut/ind
ex.php?1
FLTK
• Fast Light Toolkit
• Cross-Platform C++ GUI Toolkit
• Provides more full-featured UI
functionality than GLUT
• Also supports GLUT code through emulation
• Download from http://www.fltk.org
Next Time
• Review of Assignment 1
• Demo / discussion of Programming
Assignment 1
• Geometry & Modeling
• Will end early (~4:25) for Randy
Pausch lecture

More Related Content

Similar to september13.ppt

Atlanta Jenkins Area Meetup October 22nd 2015
Atlanta Jenkins Area Meetup October 22nd 2015Atlanta Jenkins Area Meetup October 22nd 2015
Atlanta Jenkins Area Meetup October 22nd 2015
Kurt Madel
 
Go & multi platform GUI Trials and Errors
Go & multi platform GUI Trials and ErrorsGo & multi platform GUI Trials and Errors
Go & multi platform GUI Trials and Errors
Yoshiki Shibukawa
 
State of jQuery June 2013 - Portland
State of jQuery June 2013 - PortlandState of jQuery June 2013 - Portland
State of jQuery June 2013 - Portland
dmethvin
 
Using Adobe Gaming Tools for Education
Using Adobe Gaming Tools for EducationUsing Adobe Gaming Tools for Education
Using Adobe Gaming Tools for Education
Joseph Labrecque
 
Cape Cod Web Technology Meetup - 3
Cape Cod Web Technology Meetup - 3Cape Cod Web Technology Meetup - 3
Cape Cod Web Technology Meetup - 3
Asher Martin
 
Html5 Game Development with Canvas
Html5 Game Development with CanvasHtml5 Game Development with Canvas
Html5 Game Development with Canvas
Pham Huy Tung
 
Headless Android
Headless AndroidHeadless Android
Headless Android
Opersys inc.
 
Docker based-Pipelines with Codefresh
Docker based-Pipelines with CodefreshDocker based-Pipelines with Codefresh
Docker based-Pipelines with Codefresh
Codefresh
 
VASCAN - Docker and Security
VASCAN - Docker and SecurityVASCAN - Docker and Security
VASCAN - Docker and Security
Michael Irwin
 
SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe
SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe
SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe
Sencha
 
Docker and Puppet for Continuous Integration
Docker and Puppet for Continuous IntegrationDocker and Puppet for Continuous Integration
Docker and Puppet for Continuous Integration
Giacomo Vacca
 
SeaJUG 5 15-2018
SeaJUG 5 15-2018SeaJUG 5 15-2018
SeaJUG 5 15-2018
Will Iverson
 
A complete guide to Node.js
A complete guide to Node.jsA complete guide to Node.js
A complete guide to Node.js
Prabin Silwal
 
Webgl 기술동향 2011.8
Webgl 기술동향 2011.8Webgl 기술동향 2011.8
Webgl 기술동향 2011.8
Seung Joon Choi
 
Introduction to jenkins
Introduction to jenkinsIntroduction to jenkins
Introduction to jenkins
Abe Diaz
 
Drupal Presentation for CapitalCamp 2011: Features Driven Development
Drupal Presentation for CapitalCamp 2011: Features Driven DevelopmentDrupal Presentation for CapitalCamp 2011: Features Driven Development
Drupal Presentation for CapitalCamp 2011: Features Driven Development
Mediacurrent
 
Beyond Puppet
Beyond PuppetBeyond Puppet
Beyond Puppet
Kris Buytaert
 
Comparing Next-Generation Container Image Building Tools
 Comparing Next-Generation Container Image Building Tools Comparing Next-Generation Container Image Building Tools
Comparing Next-Generation Container Image Building Tools
Akihiro Suda
 
W3C HTML5 KIG-The complete guide to building html5 games
W3C HTML5 KIG-The complete guide to building html5 gamesW3C HTML5 KIG-The complete guide to building html5 games
W3C HTML5 KIG-The complete guide to building html5 games
Changhwan Yi
 
(Declarative) Jenkins Pipelines
(Declarative) Jenkins Pipelines(Declarative) Jenkins Pipelines
(Declarative) Jenkins Pipelines
Steffen Gebert
 

Similar to september13.ppt (20)

Atlanta Jenkins Area Meetup October 22nd 2015
Atlanta Jenkins Area Meetup October 22nd 2015Atlanta Jenkins Area Meetup October 22nd 2015
Atlanta Jenkins Area Meetup October 22nd 2015
 
Go & multi platform GUI Trials and Errors
Go & multi platform GUI Trials and ErrorsGo & multi platform GUI Trials and Errors
Go & multi platform GUI Trials and Errors
 
State of jQuery June 2013 - Portland
State of jQuery June 2013 - PortlandState of jQuery June 2013 - Portland
State of jQuery June 2013 - Portland
 
Using Adobe Gaming Tools for Education
Using Adobe Gaming Tools for EducationUsing Adobe Gaming Tools for Education
Using Adobe Gaming Tools for Education
 
Cape Cod Web Technology Meetup - 3
Cape Cod Web Technology Meetup - 3Cape Cod Web Technology Meetup - 3
Cape Cod Web Technology Meetup - 3
 
Html5 Game Development with Canvas
Html5 Game Development with CanvasHtml5 Game Development with Canvas
Html5 Game Development with Canvas
 
Headless Android
Headless AndroidHeadless Android
Headless Android
 
Docker based-Pipelines with Codefresh
Docker based-Pipelines with CodefreshDocker based-Pipelines with Codefresh
Docker based-Pipelines with Codefresh
 
VASCAN - Docker and Security
VASCAN - Docker and SecurityVASCAN - Docker and Security
VASCAN - Docker and Security
 
SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe
SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe
SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe
 
Docker and Puppet for Continuous Integration
Docker and Puppet for Continuous IntegrationDocker and Puppet for Continuous Integration
Docker and Puppet for Continuous Integration
 
SeaJUG 5 15-2018
SeaJUG 5 15-2018SeaJUG 5 15-2018
SeaJUG 5 15-2018
 
A complete guide to Node.js
A complete guide to Node.jsA complete guide to Node.js
A complete guide to Node.js
 
Webgl 기술동향 2011.8
Webgl 기술동향 2011.8Webgl 기술동향 2011.8
Webgl 기술동향 2011.8
 
Introduction to jenkins
Introduction to jenkinsIntroduction to jenkins
Introduction to jenkins
 
Drupal Presentation for CapitalCamp 2011: Features Driven Development
Drupal Presentation for CapitalCamp 2011: Features Driven DevelopmentDrupal Presentation for CapitalCamp 2011: Features Driven Development
Drupal Presentation for CapitalCamp 2011: Features Driven Development
 
Beyond Puppet
Beyond PuppetBeyond Puppet
Beyond Puppet
 
Comparing Next-Generation Container Image Building Tools
 Comparing Next-Generation Container Image Building Tools Comparing Next-Generation Container Image Building Tools
Comparing Next-Generation Container Image Building Tools
 
W3C HTML5 KIG-The complete guide to building html5 games
W3C HTML5 KIG-The complete guide to building html5 gamesW3C HTML5 KIG-The complete guide to building html5 games
W3C HTML5 KIG-The complete guide to building html5 games
 
(Declarative) Jenkins Pipelines
(Declarative) Jenkins Pipelines(Declarative) Jenkins Pipelines
(Declarative) Jenkins Pipelines
 

More from CharlesMatu2

The cause of ww1 happened 1914 this was after the the asssasination of Arc...
The  cause of ww1  happened  1914 this was after the the asssasination of Arc...The  cause of ww1  happened  1914 this was after the the asssasination of Arc...
The cause of ww1 happened 1914 this was after the the asssasination of Arc...
CharlesMatu2
 
AP Ch 1.ppt
AP Ch 1.pptAP Ch 1.ppt
AP Ch 1.ppt
CharlesMatu2
 
history_of_american_agriculture.ppt
history_of_american_agriculture.ppthistory_of_american_agriculture.ppt
history_of_american_agriculture.ppt
CharlesMatu2
 
Origin of Agriculture.ppt
Origin of Agriculture.pptOrigin of Agriculture.ppt
Origin of Agriculture.ppt
CharlesMatu2
 
History of Science and Technology.ppt
History of Science and Technology.pptHistory of Science and Technology.ppt
History of Science and Technology.ppt
CharlesMatu2
 
september11.ppt
september11.pptseptember11.ppt
september11.ppt
CharlesMatu2
 
september18.ppt
september18.pptseptember18.ppt
september18.ppt
CharlesMatu2
 
september4.ppt
september4.pptseptember4.ppt
september4.ppt
CharlesMatu2
 
september6.ppt
september6.pptseptember6.ppt
september6.ppt
CharlesMatu2
 
august23.ppt
august23.pptaugust23.ppt
august23.ppt
CharlesMatu2
 
november6.ppt
november6.pptnovember6.ppt
november6.ppt
CharlesMatu2
 
november29.ppt
november29.pptnovember29.ppt
november29.ppt
CharlesMatu2
 
october9.ppt
october9.pptoctober9.ppt
october9.ppt
CharlesMatu2
 
october23.ppt
october23.pptoctober23.ppt
october23.ppt
CharlesMatu2
 
Lighting & Shading in OpenGL Non-Photorealistic Rendering.ppt
Lighting & Shading in OpenGL Non-Photorealistic Rendering.pptLighting & Shading in OpenGL Non-Photorealistic Rendering.ppt
Lighting & Shading in OpenGL Non-Photorealistic Rendering.ppt
CharlesMatu2
 
BBM3117 CAT 31ST.docx
BBM3117 CAT 31ST.docxBBM3117 CAT 31ST.docx
BBM3117 CAT 31ST.docx
CharlesMatu2
 
Computer graphics.docx
Computer graphics.docxComputer graphics.docx
Computer graphics.docx
CharlesMatu2
 
BIT4103 HUMAN COMPUTER INTERACTION CAT.docx
BIT4103 HUMAN COMPUTER INTERACTION CAT.docxBIT4103 HUMAN COMPUTER INTERACTION CAT.docx
BIT4103 HUMAN COMPUTER INTERACTION CAT.docx
CharlesMatu2
 

More from CharlesMatu2 (18)

The cause of ww1 happened 1914 this was after the the asssasination of Arc...
The  cause of ww1  happened  1914 this was after the the asssasination of Arc...The  cause of ww1  happened  1914 this was after the the asssasination of Arc...
The cause of ww1 happened 1914 this was after the the asssasination of Arc...
 
AP Ch 1.ppt
AP Ch 1.pptAP Ch 1.ppt
AP Ch 1.ppt
 
history_of_american_agriculture.ppt
history_of_american_agriculture.ppthistory_of_american_agriculture.ppt
history_of_american_agriculture.ppt
 
Origin of Agriculture.ppt
Origin of Agriculture.pptOrigin of Agriculture.ppt
Origin of Agriculture.ppt
 
History of Science and Technology.ppt
History of Science and Technology.pptHistory of Science and Technology.ppt
History of Science and Technology.ppt
 
september11.ppt
september11.pptseptember11.ppt
september11.ppt
 
september18.ppt
september18.pptseptember18.ppt
september18.ppt
 
september4.ppt
september4.pptseptember4.ppt
september4.ppt
 
september6.ppt
september6.pptseptember6.ppt
september6.ppt
 
august23.ppt
august23.pptaugust23.ppt
august23.ppt
 
november6.ppt
november6.pptnovember6.ppt
november6.ppt
 
november29.ppt
november29.pptnovember29.ppt
november29.ppt
 
october9.ppt
october9.pptoctober9.ppt
october9.ppt
 
october23.ppt
october23.pptoctober23.ppt
october23.ppt
 
Lighting & Shading in OpenGL Non-Photorealistic Rendering.ppt
Lighting & Shading in OpenGL Non-Photorealistic Rendering.pptLighting & Shading in OpenGL Non-Photorealistic Rendering.ppt
Lighting & Shading in OpenGL Non-Photorealistic Rendering.ppt
 
BBM3117 CAT 31ST.docx
BBM3117 CAT 31ST.docxBBM3117 CAT 31ST.docx
BBM3117 CAT 31ST.docx
 
Computer graphics.docx
Computer graphics.docxComputer graphics.docx
Computer graphics.docx
 
BIT4103 HUMAN COMPUTER INTERACTION CAT.docx
BIT4103 HUMAN COMPUTER INTERACTION CAT.docxBIT4103 HUMAN COMPUTER INTERACTION CAT.docx
BIT4103 HUMAN COMPUTER INTERACTION CAT.docx
 

Recently uploaded

ashokathegreat project class 12 presentation
ashokathegreat project class 12 presentationashokathegreat project class 12 presentation
ashokathegreat project class 12 presentation
aditiyad2020
 
Caffeinated Pitch Bible- developed by Claire Wilson
Caffeinated Pitch Bible- developed by Claire WilsonCaffeinated Pitch Bible- developed by Claire Wilson
Caffeinated Pitch Bible- developed by Claire Wilson
ClaireWilson398082
 
A Brief Introduction About Hadj Ounis
A Brief  Introduction  About  Hadj OunisA Brief  Introduction  About  Hadj Ounis
A Brief Introduction About Hadj Ounis
Hadj Ounis
 
Inter-Dimensional Girl Boards Segment (Act 3)
Inter-Dimensional Girl Boards Segment (Act 3)Inter-Dimensional Girl Boards Segment (Act 3)
Inter-Dimensional Girl Boards Segment (Act 3)
CristianMestre
 
一比一原版(qut毕业证)昆士兰科技大学毕业证如何办理
一比一原版(qut毕业证)昆士兰科技大学毕业证如何办理一比一原版(qut毕业证)昆士兰科技大学毕业证如何办理
一比一原版(qut毕业证)昆士兰科技大学毕业证如何办理
taqyed
 
Memory Rental Store - The Chase (Storyboard)
Memory Rental Store - The Chase (Storyboard)Memory Rental Store - The Chase (Storyboard)
Memory Rental Store - The Chase (Storyboard)
SuryaKalyan3
 
Memory Rental Store - The Ending(Storyboard)
Memory Rental Store - The Ending(Storyboard)Memory Rental Store - The Ending(Storyboard)
Memory Rental Store - The Ending(Storyboard)
SuryaKalyan3
 
Codes n Conventionss copy (2).pptx new new
Codes n Conventionss copy (2).pptx new newCodes n Conventionss copy (2).pptx new new
Codes n Conventionss copy (2).pptx new new
ZackSpencer3
 
IrishWritersCtrsPersonalEssaysMay29.pptx
IrishWritersCtrsPersonalEssaysMay29.pptxIrishWritersCtrsPersonalEssaysMay29.pptx
IrishWritersCtrsPersonalEssaysMay29.pptx
Aine Greaney Ellrott
 
acting board rough title here lolaaaaaaa
acting board rough title here lolaaaaaaaacting board rough title here lolaaaaaaa
acting board rough title here lolaaaaaaa
angelicafronda7
 
一比一原版(DU毕业证)迪肯大学毕业证成绩单
一比一原版(DU毕业证)迪肯大学毕业证成绩单一比一原版(DU毕业证)迪肯大学毕业证成绩单
一比一原版(DU毕业证)迪肯大学毕业证成绩单
zvaywau
 
The Last Polymath: Muntadher Saleh‎‎‎‎‎‎‎‎‎‎‎‎
The Last Polymath: Muntadher Saleh‎‎‎‎‎‎‎‎‎‎‎‎The Last Polymath: Muntadher Saleh‎‎‎‎‎‎‎‎‎‎‎‎
The Last Polymath: Muntadher Saleh‎‎‎‎‎‎‎‎‎‎‎‎
iraqartsandculture
 
一比一原版(UniSA毕业证)南澳大学毕业证成绩单如何办理
一比一原版(UniSA毕业证)南澳大学毕业证成绩单如何办理一比一原版(UniSA毕业证)南澳大学毕业证成绩单如何办理
一比一原版(UniSA毕业证)南澳大学毕业证成绩单如何办理
zeyhe
 
ART FORMS OF KERALA: TRADITIONAL AND OTHERS
ART FORMS OF KERALA: TRADITIONAL AND OTHERSART FORMS OF KERALA: TRADITIONAL AND OTHERS
ART FORMS OF KERALA: TRADITIONAL AND OTHERS
Sandhya J.Nair
 
2137ad Merindol Colony Interiors where refugee try to build a seemengly norm...
2137ad  Merindol Colony Interiors where refugee try to build a seemengly norm...2137ad  Merindol Colony Interiors where refugee try to build a seemengly norm...
2137ad Merindol Colony Interiors where refugee try to build a seemengly norm...
luforfor
 
一比一原版(QUT毕业证)昆士兰科技大学毕业证成绩单如何办理
一比一原版(QUT毕业证)昆士兰科技大学毕业证成绩单如何办理一比一原版(QUT毕业证)昆士兰科技大学毕业证成绩单如何办理
一比一原版(QUT毕业证)昆士兰科技大学毕业证成绩单如何办理
zeyhe
 
一比一原版(GU毕业证)格里菲斯大学毕业证成绩单
一比一原版(GU毕业证)格里菲斯大学毕业证成绩单一比一原版(GU毕业证)格里菲斯大学毕业证成绩单
一比一原版(GU毕业证)格里菲斯大学毕业证成绩单
zvaywau
 
Fed by curiosity and beauty - Remembering Myrsine Zorba
Fed by curiosity and beauty - Remembering Myrsine ZorbaFed by curiosity and beauty - Remembering Myrsine Zorba
Fed by curiosity and beauty - Remembering Myrsine Zorba
mariavlachoupt
 
2137ad - Characters that live in Merindol and are at the center of main stories
2137ad - Characters that live in Merindol and are at the center of main stories2137ad - Characters that live in Merindol and are at the center of main stories
2137ad - Characters that live in Merindol and are at the center of main stories
luforfor
 

Recently uploaded (19)

ashokathegreat project class 12 presentation
ashokathegreat project class 12 presentationashokathegreat project class 12 presentation
ashokathegreat project class 12 presentation
 
Caffeinated Pitch Bible- developed by Claire Wilson
Caffeinated Pitch Bible- developed by Claire WilsonCaffeinated Pitch Bible- developed by Claire Wilson
Caffeinated Pitch Bible- developed by Claire Wilson
 
A Brief Introduction About Hadj Ounis
A Brief  Introduction  About  Hadj OunisA Brief  Introduction  About  Hadj Ounis
A Brief Introduction About Hadj Ounis
 
Inter-Dimensional Girl Boards Segment (Act 3)
Inter-Dimensional Girl Boards Segment (Act 3)Inter-Dimensional Girl Boards Segment (Act 3)
Inter-Dimensional Girl Boards Segment (Act 3)
 
一比一原版(qut毕业证)昆士兰科技大学毕业证如何办理
一比一原版(qut毕业证)昆士兰科技大学毕业证如何办理一比一原版(qut毕业证)昆士兰科技大学毕业证如何办理
一比一原版(qut毕业证)昆士兰科技大学毕业证如何办理
 
Memory Rental Store - The Chase (Storyboard)
Memory Rental Store - The Chase (Storyboard)Memory Rental Store - The Chase (Storyboard)
Memory Rental Store - The Chase (Storyboard)
 
Memory Rental Store - The Ending(Storyboard)
Memory Rental Store - The Ending(Storyboard)Memory Rental Store - The Ending(Storyboard)
Memory Rental Store - The Ending(Storyboard)
 
Codes n Conventionss copy (2).pptx new new
Codes n Conventionss copy (2).pptx new newCodes n Conventionss copy (2).pptx new new
Codes n Conventionss copy (2).pptx new new
 
IrishWritersCtrsPersonalEssaysMay29.pptx
IrishWritersCtrsPersonalEssaysMay29.pptxIrishWritersCtrsPersonalEssaysMay29.pptx
IrishWritersCtrsPersonalEssaysMay29.pptx
 
acting board rough title here lolaaaaaaa
acting board rough title here lolaaaaaaaacting board rough title here lolaaaaaaa
acting board rough title here lolaaaaaaa
 
一比一原版(DU毕业证)迪肯大学毕业证成绩单
一比一原版(DU毕业证)迪肯大学毕业证成绩单一比一原版(DU毕业证)迪肯大学毕业证成绩单
一比一原版(DU毕业证)迪肯大学毕业证成绩单
 
The Last Polymath: Muntadher Saleh‎‎‎‎‎‎‎‎‎‎‎‎
The Last Polymath: Muntadher Saleh‎‎‎‎‎‎‎‎‎‎‎‎The Last Polymath: Muntadher Saleh‎‎‎‎‎‎‎‎‎‎‎‎
The Last Polymath: Muntadher Saleh‎‎‎‎‎‎‎‎‎‎‎‎
 
一比一原版(UniSA毕业证)南澳大学毕业证成绩单如何办理
一比一原版(UniSA毕业证)南澳大学毕业证成绩单如何办理一比一原版(UniSA毕业证)南澳大学毕业证成绩单如何办理
一比一原版(UniSA毕业证)南澳大学毕业证成绩单如何办理
 
ART FORMS OF KERALA: TRADITIONAL AND OTHERS
ART FORMS OF KERALA: TRADITIONAL AND OTHERSART FORMS OF KERALA: TRADITIONAL AND OTHERS
ART FORMS OF KERALA: TRADITIONAL AND OTHERS
 
2137ad Merindol Colony Interiors where refugee try to build a seemengly norm...
2137ad  Merindol Colony Interiors where refugee try to build a seemengly norm...2137ad  Merindol Colony Interiors where refugee try to build a seemengly norm...
2137ad Merindol Colony Interiors where refugee try to build a seemengly norm...
 
一比一原版(QUT毕业证)昆士兰科技大学毕业证成绩单如何办理
一比一原版(QUT毕业证)昆士兰科技大学毕业证成绩单如何办理一比一原版(QUT毕业证)昆士兰科技大学毕业证成绩单如何办理
一比一原版(QUT毕业证)昆士兰科技大学毕业证成绩单如何办理
 
一比一原版(GU毕业证)格里菲斯大学毕业证成绩单
一比一原版(GU毕业证)格里菲斯大学毕业证成绩单一比一原版(GU毕业证)格里菲斯大学毕业证成绩单
一比一原版(GU毕业证)格里菲斯大学毕业证成绩单
 
Fed by curiosity and beauty - Remembering Myrsine Zorba
Fed by curiosity and beauty - Remembering Myrsine ZorbaFed by curiosity and beauty - Remembering Myrsine Zorba
Fed by curiosity and beauty - Remembering Myrsine Zorba
 
2137ad - Characters that live in Merindol and are at the center of main stories
2137ad - Characters that live in Merindol and are at the center of main stories2137ad - Characters that live in Merindol and are at the center of main stories
2137ad - Characters that live in Merindol and are at the center of main stories
 

september13.ppt

  • 1. Now Playing: Homecoming Kanye West from Graduation Released September 11, 2007
  • 2. OpenGL Programming II Rick Skarbez, Instructor COMP 575 September 13, 2007
  • 3. Robot Ate My Homework Mark Shirra Vancouver Film School, SIGGRAPH 2006 Available online: http://www.vfs.com/showcase.php?id=7&category_id=10&project_id=858
  • 4. Announcements • Reminder: Homework 1 is due today • Questions? • Class next Tuesday (9/18) will be held in SN 014
  • 5. • Introduced the basics of OpenGL programming • OpenGL is a state machine • All objects are lists of vertices • 2 matrices in OpenGL • ModelView • Projection Last Time
  • 6. Today • Review a bit from last time • Work through some demos • Introduce/demo windowing toolkits • GLUT • FLTK
  • 7. OpenGL in Java • UPDATE: Apparently, the newest versions of Netbeans include JOGL bindings • Check out http://unc-cs575- lerch.blogspot.com • Many thanks to Tae
  • 8. Clearing the Screen glClearColor(0.0, 0.0, 0.0, 0.0) glClearDepth(1.0); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) To Clear The On-Screen Image And The Z-Buffer:
  • 9. Our First OpenGL Code ... glClearColor(0.0, 0.0, 0.0, 0.0); glClear(GL_COLOR_BUFFER_BIT); glColor3f(1.0, 1.0, 1.0); glOrtho(-1.0, 1.0, -1.0, 1.0, -1.0, 1.0); glBegin(GL_POLYGON); glVertex2f(-0.5, -0.5); glVertex2f(-0.5, 0.5); glVertex2f(0.5, 0.5); glVertex2f(0.5, -0.5); glEnd(); glFlush(); ...
  • 10. Drawing into a Window • You specify what you want drawn with OpenGL • But where are you drawing it? • Need to call the OS to get a window • Two ways to do this: 1. Make you learn the specifics of the operating / windowing system 2. Use a toolkit that hides the OS interface
  • 11. UI Toolkits • There are a lot of options to choose from: • GLUT • FLTK • QT • wxWindows • Cocoa • etc. • I’m going to demonstrate GLUT today
  • 12. GLUT • OpenGL Utility Toolkit • Cross-Platform C++ Drawing/UI Toolkit • Provides functions to make starting up and drawing fast and easy • Supports only limited user interfaces
  • 13. Installing GLUT • On Windows: • Download from Nate Robins’ website: • http://www.xmission.com/%7Enate/glut.ht ml • glut-3.7.6-bin has the dll/lib/header that are required • Copy glut.dll to {Windows DLL dir}glut32.dll • Copy glut.lib to {VC++ lib path}glut32.lib • Copy glut.h to {VC++ include path}GLglut.h
  • 14. Using GLUT • Only need to include glut.h • #include <GLglut.h> • Automatically includes gl.h and glu.h • Lighthouse3D has a good GLUT tutorial • http://www.lighthouse3d.com/opengl/glut/ind ex.php?1
  • 15. FLTK • Fast Light Toolkit • Cross-Platform C++ GUI Toolkit • Provides more full-featured UI functionality than GLUT • Also supports GLUT code through emulation • Download from http://www.fltk.org
  • 16. Next Time • Review of Assignment 1 • Demo / discussion of Programming Assignment 1 • Geometry & Modeling • Will end early (~4:25) for Randy Pausch lecture