|1. Description - |
|Introduction to 3-D graphics programming using OpenGL, intended for anyone interested in gaining 3-D expertise for games, scientific visualization, desktop and mobile apps. Coding topics include a systematic study of the OpenGL API in conjunction with any of these programming languages: Java, C++, C# or Objective C (student's choice). Concept topics include viewports, graphics primitives, 3-D motion matrices, normal vectors, shaders, fragment and pixel buffers, light simulation, polygons, virtual cameras, image pipelines, texture mapping and alpha blending.|
|Advisory: One of the following: C S 1B, 2B, 20A, 23A.|
|2. Course Objectives - |
|The student will be able to: |
- Install and access the OpenGL API in an integrated development environment (IDE).
- Create an OpenGL graphics context within an operating system's native user interface (UI).
- Describe distinct roles of the graphics initialization and drawing operations.
- Define the meaning of glBegin()/glEnd() and how they are used to define points, lines and polygons.
- Write programs that use normal vectors and orthographic projections to simulate naturally lit 3-D scenes.
- Use frame buffers to effect real-time 3-D animation.
- Incorporate vertex arrays into programs.
- Define buffer objects and give examples of their use.
- Explain the difference between viewing, modeling and motion transformations.
- Produce programs that use matrix stacks to control complex, hierarchical motion.
- Incorporate color and alpha blending into programs to generate transparency effects.
- Control scene lighting through camera position, material parameters, spotlights, and ambient parameters.
- Use OOP and class inheritance to design flexible objects, materials, lighting and animation structures.
- Write programs that incorporate texture mapping to simulate complex surfaces.
- Describe the OpenGL shading language and shaders.
- Download and install 3rd party font libraries for OpenGL.
|3. Special Facilities and/or Equipment - |
- access to a computer laboratory with language compilers, and OpenGL API plugins.
- a website or course management system with an assignment posting component (through which all lab assignments are to be submitted) and a forum component (where students can discuss course material and receive help from the instructor). This applies to all sections, including on-campus (i.e., face-to-face) offerings.
- When taught via Foothill Global Access on the Internet, the college will provide a fully functional and maintained course management system through which the instructor and students can interact.
- When taught via Foothill Global Access on the Internet, students must have currently existing e-mail accounts and ongoing access to computers with internet capabilities.
|4. Course Content (Body of knowledge) - |
- The OpenGL Development Platform
- OpenGL and C++
- OpenGL and C#
- OpenGL and Java
- OpenGL and Objective C
- OpenGL Windows
- The OpengGL graphics context
- Opening and closing graphics windows
- Threads and the graphics context
- The Rendering Lifecycle
- Initializing the pixel formats, clear colors and depth buffers
- Making the graphics context current
- Drawing preparation by loading identity matrices, positioning the camera and drawing simple polygons.
- Deleting the graphics context
- Graphics Primitives
- Point and line commands
- Triangle commands
- Quad commands
- Polygon commands
- 3-D Scene Building
- Computing normal vectors
- Camera placement
- Orthographic vs. normal projections
- Local vs. non-local cameras
- Defining framebuffers
- making the graphics context current in buffer swapping
- Vertex Arrays
- VAOs (vertex array objects)
- Using buffers to store vertex data
- Speed considerations
- Frame Buffer Objects (FBOs)
- Creating and filling buffers
- Texture buffer objects
- Rendererbuffer objects
- Eye coordinates
- Projection transformations
- Viewport transformations
- The Modelview Matrix
- Rotation, Scaling and Translation
- Complex motion
- 4x4 Matrix stacks
- Pushing and popping matrices
- Data structures for hierarchical motion
- Designing class inheritance for
- RGBA color values
- Alpha blending
- glBlendFunc() and its parameters
- Enabling and disabling blending
- Camera Position
- Diffuse lighting
- Specular lighting
- Ambient lighting
- OOP in Graphics Programming
- Defining material and scene-object classes
- Defining classes for categories of scene objects
- Expressing hierarchy through object-members
- Expressing variations of scene objects through inheritance
- Texture Mapping
- Using GL_TEXTURE
- Loading Textures
- Enabling and disabling textures
- Interaction of textures and lighting models
- The graphics pipeline
- Vertex Shaders
- Graphics Shaders
- Stock shaders
- Geometry shaders
- Fragment shaders
- Uniform Buffer Objects
- 3rd Party Font Libraries
- Configuring and using Fonts
|5. Repeatability - Moved to header area.|
|6. Methods of Evaluation - |
- Tests and quizzes
- Written laboratory assignments which include source code, sample runs and documentation.
- Final examination
|7. Representative Text(s) - |
|Richard Wright, Jr., et. al., OpenGL SuperBible, 5th Ed., Addison Wesley, 2011. |
Dave Shreiner, OpenGL Programming Guide, 7th Ed., Addison Wesley, 2009.
|8. Disciplines - |
|Computer Science |
|9. Method of Instruction - |
- Lectures which include motivation for syntax and use of OpenGL API.
- On-line labs (for all sections, including those meeting face-to-face/on campus) consisting of
- A programming assignment web-page located on a college-hosted course management system or other department-approved Internet environment. Here, the students will review the specification of each programming assignment and submit their completed lab work.
- A discussion web-page located on a college hosted course management system or other department-approved Internet environment. Here, students can request assistance from the instructor and interact publically with other class members.
- Detailed review of programming assignments which includes model solutions and specific comments on the student submissions.
- In person or on-line discussion which engages students and instructor in an ongoing dialog pertaining to all aspects of designing, implementing and analyzing programs.
- When course is taught fully on-line:
- Instructor-authored lecture materials, handouts, syllabus, assignments, tests, and other relevant course material will be delivered through a college hosted course management system or other department-approved Internet environment.
- Additional instructional guidelines for this course are listed in the attached addendum of CS department on-line practices.
|10. Lab Content - |
- Configuring an OpenGL Development Platform
- Download the OpenGL libraries if they are not built-into your platform's IDE.
- Download any support GUI toolkits required for a GUI-based OpenLG program.
- Write and debug a a modular 2-D shape program that lives within your platform's native UI using a module init() and draw() paradigm.
- Exploring Graphics Primitives
- Write a program that demonstrates at least six of the graphics primitives managed by glBegin() and glEnd().
- Make the program interactive, using a simple menu with drop-downs, sliders, buttons, etc.
- Creating a Simple 3-D Scene
- Use the glVertex() and glNormal() to produce some simple objects (cube, polyhedron, etc.) that have fixed color or material-based surfaces.
- Experiment with camera position to get differing views.
- Use your platform's UI model to create an interactive program.
- Use glSwapbuffers() to make motion appear smooth and free of flicker artifacts.
- Using Vertex Arrays and Frame Buffer Objects
- Build object data using vertex arrays and/or FBOs
- Demonstrate the data structure by a program that allows the user to manipulate the objects within the scene
- Controlling Camera Position and Complex Object Motion
- Create classes that reflect hierarchical objects with multiple joints and appendages.
- Use the modelview stack to control the various parts of the object, independently, without losing the integrity of the object as a whole.
- Let the user control motion and also demonstrate various speeds.
- Separate camera and object motion in your program, so that the user can control each one, separately.
- Controlling Color and Lighting
- Use OOP to create material classes and assign materials to the players in your scene.
- Assign different characteristics to your scene's lights and ambient illumination.
- Let the user control the lighting characteristics while the objects are in motion.
- Incorporating Texture Mapping
- Load two or more textures into memory, and assign them to some of your objects.
- Display the scene with animation to view the textures at all angles as they are rotated.
- Incorporate transparency and alpha blending.
- Using Shaders in Your Program
- Define shaders in your program.
- Make use of at least two of the following: fragment shaders, vertex shaders, geometry shaders, or uniform buffer objects.
- Adding Fonts to your Display
- Download and install some 3rd party font utility for OpenGL.
- Create a scene which incorporates fonts.
- Let some fonts be 2-D labels for the window, and others be 3-D objects that are lit by the scene and move as the camera moves.
|11. Honors Description - No longer used. Integrated into main description section.|
|12. Types and/or Examples of Required Reading, Writing and Outside of Class Assignments - |
- Textbook assigned reading averaging 30 pages per week.
- Reading the supplied handouts and modules averaging 10 pages per week.
- Reading on-line resources as directed by instructor though links pertinent to programming.
- Reading library and reference material directed by instructor through course handouts.
- Writing technical prose documentation that supports and describes the programs that are submitted for grades.
|13. Need/Justification - |
|This course is a restricted support course for the AS degree in Computer Science. |