Object Oriented Design - PowerPoint PPT Presentation

About This Presentation
Title:

Object Oriented Design

Description:

Goals Using OpenGL as case study turning a blob anti pattern into an Object-Oriented Architecture A Quick Introduction to OpenGL Provide pointers to resources Why ... – PowerPoint PPT presentation

Number of Views:52
Avg rating:3.0/5.0
Slides: 11
Provided by: Owen60
Category:

less

Transcript and Presenter's Notes

Title: Object Oriented Design


1
Object Oriented Design
2
Goals
  • Using OpenGL as case study turning a blob anti
    pattern into an Object-Oriented Architecture
  • A Quick Introduction to OpenGL
  • Provide pointers to resources

3
Why OpenGL?
  • Serves as great design case to explore a variety
    of OOD issues.
  • Extremely useful to build 2D/3D games
  • Provides access to sophisticated graphics
    supported by hardware acceleration
  • E.g., ATI Radeon, GeForce
  • Results in complex but efficient rendering
  • Already these cards can draw a multi thousands 3D
    polygon object with light sources, etc. faster
    than a 32 x 32 pixel desktop icon.

4
OpenGL Architecture
http//developer.apple.com/techpubs/macosx/Carbon/
graphics/OpenGL/OpenGL/chap2/index.html
5
Anti Patterns OpenGL the Mega Blob
  • a class with 60 or more attributes and
    operations usually indicates the presence of the
    Blob
  • OpenGL gt 300 http//gl4java.sourceforge.net/docs/
    html/
  • What can we do make this enormous functionality
    more accessible through OOD?

6
Lets make a Game Engine
  • Refactoring
  • Bottom up to make OpenGL functionality available
  • Top down to capture needs by a variety of games
  • We use some ideas from our 2D editor design

Game 1
Game 2
Game n
Game Engine Chris Schenk Luke Swanson
OpenGL
Hardware
7
Examples
  • Create a subclass of the OpenGLWindow class and
    extend the display, reshape, idle and init
    methods.
  • OpenGL for MCL
  • Triangles, cubes, sprites, textures
  • OpenGL for Java

8
Trade offs
  • This is not an OpenGL course
  • Keep OpenGL specific lectures to a minimum
  • Read the books for more depth
  • Game Engine will have to be very simple stressing
    simplicity over depth and performance

9
OpenGL Resources
  • The OpenGL Red Book
  • The must have Programming Guide
  • http//fly.cc.fer.hr/unreal/theredbook/
  • The OpenGL Blue Book
  • The Reference Manual
  • http//www.eecs.tulane.edu/www/graphics/doc/OpenGL
    -Man-Pages/opengl_index_spec.html
  • Real-Time Rendering
  • A truly wonderful book covering a lot of ground
    on how to make efficient 3D
  • http//www.amazon.com/exec/obidos/ASIN/1568811012
  • http//www.opengl.org/

10
Homework
  • Download and install GL4Java
  • http//www.jausoft.com/gl4java.html
  • After installation run the demos
  • Due October 31
  • Read OpenGL Red book chapter 1 and 2
  • http//fly.cc.fer.hr/unreal/theredbook/
  • Due November 5
Write a Comment
User Comments (0)
About PowerShow.com