Advertisement

OpenGL 3.2 and More

Graphics Software Engineer at NVIDIA
Oct. 8, 2009
Advertisement

More Related Content

Advertisement
Advertisement

OpenGL 3.2 and More

  1. A brief 2-slide review of OpenGL 3.0 & 3.1 Before we get really started… You are already familiar and using OpenGL 3.1 aren’t you??
  2. OpenGL 3.2 modern GPU functionality, platform portability, API maturity & completeness
  3. From the 1994 OpenGL 1.1 Data Flow… vertex processing rasterization & fragment coloring texture raster operations framebuffer pixel unpack pixel pack vertex puller client memory pixel transfer glReadPixels / glCopyPixels / glCopyTex{Sub}Image glDrawPixels glBitmap glCopyPixels glTex{Sub}Image glCopyTex{Sub}Image glDrawElements glDrawArrays selection / feedback / transform feedback glVertex* glColor* glTexCoord* etc. blending depth testing stencil testing accumulation storage access operations
  4. … OpenGL 1.0 in detail Vertex processing Pixel processing Texture mapping Image primitive processing Pixel unpacking Pixel packing Vertex assembly texture image specification image rectangles, bitmaps primitive topology, transformed vertex data stenciling, depth testing, blending, accumulation pixel image primitive batch type, vertex attributes primitive batch type, vertex data fragment texture fetches pixel image or texture image specification image and bitmap fragments point, line, and polygon fragments pixels to pack unpacked pixels pixels fragments filtered texels buffer data vertices Legend programmable operations fixed-function operations copy pixels, copy texture image Fragment processing Geometric primitive assembly & processing Raster operations Framebuffer Command parser
  5. … to the 2009 OpenGL 3.2 Data Flow Vertex processing Pixel processing Texture mapping Geometric primitive assembly & processing Image primitive processing Transform feedback Pixel unpacking Pixel packing Vertex assembly pixels in framebuffer object textures texture buffer objects texture image specification image rectangles, bitmaps primitive topology, transformed vertex data vertex texture fetches pixel pack buffer objects pixel unpack buffer objects vertex buffer objects transform feedback buffer objects buffer data, unmap buffer geometry texture fetches primitive batch type, vertex indices, vertex attributes primitive batch type, vertex data fragment texture fetches pixel image or texture image specification map buffer, get buffer data transformed vertex attributes image and bitmap fragments point, line, and polygon fragments pixels to pack unpacked pixels pixels fragments filtered texels buffer data vertices Legend programmable operations fixed-function operations copy pixels, copy texture image Buffer store uniform/ parameters buffer objects Fragment processing stenciling, depth testing, blending, accumulation Raster operations Framebuffer Command parser
  6. Buffer Centric View of OpenGL Vertex Array Buffer Object (VaBO) Transform Feedback Buffer (XBO) Parameter Buffer (PaBO) Pixel Unpack Buffer (PuBO) Pixel Pack Buffer (PpBO) Bindable Uniform Buffer (BUB) Texture Buffer Object (TexBO) Vertex Puller Vertex Shading Geometry Shading Fragment Shading Texturing Array Element Buffer Object (VeBO) Pixel Pipeline vertex data texel data pixel data parameter data ( not ARB functionality yet ) glBegin, glDrawElements, etc. glDrawPixels, glTexImage2D, etc. glReadPixels, etc. Framebuffer
  7. Direct3Disms better OpenGL & Direct3D content portability
  8. OpenGL & Direct3D Conventions OpenGL 3.2 First vertex of primitive Last vertex of primitive (mostly) Provoking vertex for flat-shading OpenGL 3.2 Upper-left Lower-left Fragment coordinate origin Cg HLSL 9, 10, and 11 GLSL Shading Language syntax Convention OpenGL Direct3D Addressed by Window origin Lower-left, pixels at half-integers Upper-left, pixels on integers (DX9) pixels on half-integers (DX 10) projection matrix & front-facing re-configuration Clip space [-1…+1] 3 [-1…+1] 2 [0…1] projection matrix re-configuration 4-byte vertex color RGBA BGRA OpenGL 3.2 Shader bind granularity Linked (for GLSL) Per-domain (for Cg & assembly) Per-domain EXT_separate shader_objects Object manipulation Bind-to-edit, Bind-to-query Edit-by-name, Query-by-name EXT_direct_ state_access
  9. Provoking Vertex Behavior geometry shader primitives Last vertex convention First vertex convention Primitive type of polygon i 2i+3 2i-1 GL_TRIANGLE_STRIP_ADJACENCY 6i-1 6i-5 GL_TRIANGLE_ADJACENCY i+2 i+1 GL_LINE_STRIP_ADJACENCY 4i-1 4i-2 GL_LINES_ADJACENCY i i GL_POLYGON 2i+2 , if quads follow provoking vertex 2i+2 , if not 2i-1 2i+2 GL_QUAD_STRIP 4i , if quads follow provoking vertex 4i , if not 4i-3 4i GL_QUADS i+2 i+1 GL_TRIANGLE_FAN i+2 i GL_TRIANGLE_STRIP 3i 3i-2 GL_TRIANGLES i+1 i GL_LINE_STRIP i+1 , if i<n 1, if i=n i GL_LINE_LOOP 2i 2i-1 GL_LINES i i GL_POINT same same same same
  10. Deprecation there’s “old” & there’s “still supported”
  11. Geometry Shaders per-primitive programmability
  12. Geometry Shader Silhouette Edge Rendering silhouette edge detection geometry program Complete mesh Silhouette edges Useful for non-photorealistic rendering Looks like human sketching
  13. More Geometry Shader Examples Shimmering point sprites Generate fins for lines Generate shells for fur rendering
  14. Geometry Shader-based Shadow Volume Generation un-shadowed bump-mapped shading via geometry shader texture-space basis setup shadow volume extrusion by geometry shader shadow region stencil multi-pass combination of shadowed and un-shadowed shading
  15. Miscellaneous some other 3.2 goodness
  16. Near Plane Depth Clamping Example without depth clamping depth clamping enabled * * simple situation because depth complexity at z=0 is a single layer
  17. Beyond OpenGL 3.2 NVIDIA’s further contributions
  18. Thoughts of OpenGL Future what direction now?
  19. What’s Driving OpenGL Modernization? Human desire for Visual Intuition and Entertainment Embarrassing Parallelism of Graphics Increasing Semiconductor Density Particularly the hardware-amenable, latency tolerant nature of rasterization Particularly interactive video games
Advertisement