Presentation is loading. Please wait.

Presentation is loading. Please wait.

Object Oriented Design. Goals  Using OpenGL as case study turning a blob anti pattern into an Object-Oriented Architecture  A Quick Introduction to.

Similar presentations


Presentation on theme: "Object Oriented Design. Goals  Using OpenGL as case study turning a blob anti pattern into an Object-Oriented Architecture  A Quick Introduction to."— Presentation transcript:

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 u E.g., ATI Radeon, GeForce u Results in complex but efficient rendering u 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” u OpenGL >= 300 http://gl4java.sourceforge.net/docs/html/ http://gl4java.sourceforge.net/docs/html/  What can we do make this enormous functionality more accessible through OOD?

6 Let’s make a Game Engine  Refactoring u Bottom up: to make OpenGL functionality available u Top down: to capture needs by a variety of games  We use some ideas from our 2D editor design Hardware OpenGL Game Engine Chris Schenk & Luke Swanson Game 1Game 2 Game n

7 Examples  Create a subclass of the OpenGLWindow class and extend the display, reshape, idle and init methods. u OpenGL for MCL  Triangles, cubes, sprites, textures u OpenGL for Java

8 Trade offs  This is not an OpenGL course u Keep OpenGL specific lectures to a minimum u 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 u The must have Programming Guide u http://fly.cc.fer.hr/~unreal/theredbook/ http://fly.cc.fer.hr/~unreal/theredbook/  The OpenGL Blue Book u The Reference Manual u http://www.eecs.tulane.edu/www/graphics/doc/Open GL-Man-Pages/opengl_index_spec.html http://www.eecs.tulane.edu/www/graphics/doc/Open GL-Man-Pages/opengl_index_spec.html  Real-Time Rendering u A truly wonderful book covering a lot of ground on how to make efficient 3D u http://www.amazon.com/exec/obidos/ASIN/ 1568811012 http://www.amazon.com/exec/obidos/ASIN/ 1568811012  http://www.opengl.org/

10 Homework  Download and install GL4Java u http://www.jausoft.com/gl4java.html http://www.jausoft.com/gl4java.html u After installation run the demos u Due: October 31  Read OpenGL Red book chapter 1 and 2 u http://fly.cc.fer.hr/~unreal/theredbook/ http://fly.cc.fer.hr/~unreal/theredbook/ u Due: November 5


Download ppt "Object Oriented Design. Goals  Using OpenGL as case study turning a blob anti pattern into an Object-Oriented Architecture  A Quick Introduction to."

Similar presentations


Ads by Google