Computer Graphics - PowerPoint PPT Presentation

1 / 13
About This Presentation
Title:

Computer Graphics

Description:

We will concentrate on the programming and algorithms ... Clipper. Projector. Rasterizer. Primitives. Pixels. What is GLUT? GLUT - The OpenGL Utility Toolkit ... – PowerPoint PPT presentation

Number of Views:44
Avg rating:3.0/5.0
Slides: 14
Provided by: homeSou5
Category:

less

Transcript and Presenter's Notes

Title: Computer Graphics


1
Computer Graphics
  • CS 385
  • January 24, 2005
  • Welcome

2
Summary of Course
  • We will concentrate on the programming and
    algorithms side of Graphics
  • We will be using the OpenGL API and the GLUT
    toolkit
  • The course will be programming intensive. We will
    cover the concepts and algorithms in class, but
    the real learning will take place trying out the
    concepts and algorithms when you write your
    code.

3
Levels Of AbstractionOne of the major, perhaps
the major theme in Computer Science
  • Programmer writing source code ? pixels on
    screen
  • Structures that make up what goes in between
  • Top Down vs. Bottom Up
  • What is a graphics API?

4
OpenGL vs. DirectX(in a somewhat biased nutshell)
  • OpenGL is a flexible, powerful, cross-platform
    graphics api with a well-defined, documented and
    maintained standard.
  • DirectX gives you sound (you can use openAL for
    with OpenGL) in addition to graphics, supports
    fewer features than OpenGL (though this is
    changing) and works only on windows.

5
(No Transcript)
6
What is OpenGL
  • View I
  • OpenGL is a library of functions for accessing
    the graphics hardware of an operating system,
    creating geometric object, setting their
    properties and specifying how they will be
    viewed.

7
What is OpenGL
  • View II
  • OpenGL is a State Machine an abstract machine
    with inputs, outputs and a state.
  • The machines behavior depends only on its
    state at that moment.
  • Thinking of OpenGL this way, the inputs are
    descriptions of geometric objects, the output is
    the set of pixels on the screen and the state is
    made up of information such as viewing
    conditions, texture specification and all those
    properties that effect how the geometric objects
    are viewed.

8
What is OpenGL
  • View III
  • OpenGL as a pipeline.

Pixels
Primitives
Transformer
Clipper
Projector
Rasterizer
9
What is GLUT?
  • GLUT - The OpenGL Utility Toolkit
  • Glut is a windowing system independent
    programming interface for OpenGL.
  • OpenGL is system independent but does not provide
    a system independent interface to the windowing
    system. GLUT fulfils this need.

10
  • include ltwindows.hgt
  • include ltGL/glut.hgt
  • include ltiostreamgt
  • void display()
  • glClear(GL_COLOR_BUFFER_BIT)
  • //put display code here polygons etc
  • glFlush()
  • int main(int argc, char argv)
  • glutInit(argc, argv)
  • glutCreateWindow("Easier than windows API!")
  • glutDisplayFunc(display)
  • glutMainLoop()
  • return 0

11
  • include ltwindows.hgt
  • include ltGL/glut.hgt
  • include ltiostreamgt
  • using namespace std
  • void display()
  • glClear(GL_COLOR_BUFFER_BIT)
  • cout ltlt "this is a test." ltlt endl
  • //put display code here polygons etc
  • glFlush()
  • int main(int argc, char argv)
  • glutInit(argc, argv)
  • glutCreateWindow("Easier than windows API!")
  • glutDisplayFunc(display)

12
  • include ltwindows.hgt
  • include ltGL/glut.hgt
  • include ltiostreamgt
  • pragma comment(linker, "/subsystem\"windows\"
    /entry\"mainCRTStartup\"")
  • using namespace std
  • void display()
  • glClear(GL_COLOR_BUFFER_BIT)
  • cout ltlt "this is a test." ltlt endl
  • //put display code here polygons etc
  • glFlush()
  • int main(int argc, char argv)
  • glutInit(argc, argv)

13
Next Week
  • Beginning to program with
  • OpenGL and GLUT.
Write a Comment
User Comments (0)
About PowerShow.com