learning with modern opengl
DESCRIPTION
Learning with Modern OpenGL. Evan Hart NVIDIA. Disclaimer. Deprecated functionality supported by many vendors Old versions of OpenGL are still supported Fortran and Cobol are still important even if most courses now focus on Java - PowerPoint PPT PresentationTRANSCRIPT
Learning with Modern OpenGL
Evan Hart
NVIDIA
Disclaimer
Deprecated functionality supported by many vendors
Old versions of OpenGL are still supported
Fortran and Cobol are still important even if most courses now focus on Java
This is about what to teach/learn, not about changing production code
Introduction with New APIsIntroduction with New APIs
• Focus on fundamentals of graphics
• Less focus on API mechanism
• Requires some tools to help things along
• Still provides access to fast feedback
• More marketable knowledge
Fundamental FocusFundamental Focus
• Focus on core algorithms at the pixel and vertex level
– Illumination models like Phong
• Rich C-like language for development
– Algorithms are not hidden behind switches
API MechanismAPI Mechanism
• Newer API mechanisms are more verbose
• Less reliance on API imposed anachronisms
– Latching behavior of vertex submission
– More orthogonality
ToolsTools
• Good support code goes a long way
• Few would recommend starting without GLUT or GLU in ‘old’ OpenGL
• Is shader creation or VBO creation substantially different?
Tools vs ComplexityTools vs Complexity
• Single Triangle, no tools
– 126 lines (minor reformatting)
• Single Triangle, compile and link functions
– 86 lines
• Single Triangle, create shader function
– 74 lines
• Old OpenGL Single Triangle
– 35 lines (no comment lines)
MarketabilityMarketability
• Most new 3D apps use shaders
– Arguably most require them
• All APIs are eliminating fixed-function
– OpenGL, OpenGL ES, and Direct3D
• Some PhD level graphics students have trouble explaining the math for Phong illum.
– For better or worse this is probably the most common shader component (other than matrix multiplication)
Pros & ConsPros & Cons
Advantages
• More closely tied to the core algorithms
• Better matched to new code development
• More closely matches other modern APIs presently in use
Disadvantages
• More verbose API with fewer defaults
• No GLUT / GLU functions
• Still lots of apps using OpenGL 1.x