SlideShare une entreprise Scribd logo
1  sur  24
RENDERING TARGETS
2014RENDERING TARGETS
 A rendering context is required before drawing a scene. And a correponding
Framebuffer
 Recall bindFramebuffer()
 It can be
 Window system Framebuffer (Fb)
 Offscreen buffer (Implemented in a Frame Buffer Object)
 FBO is not a memory area – it is information about the actual color buffer in
memory, depth/ stencil buffers
 By default, rendering happens to the Window system framebuffer (ID ‘0’)
Need
2014NEED FOR OFFSCREEN RENDERING
 Special effects
 Refer the fire effect specified earlier (Multiple passes)
 Interfacing to “non-display” use-cases
 Ex, passing video through GPU, perform 3D effects, then re-encode back to
compressed format
 Edge detection/ computation – output is sent to a memory buffer for use by other
(non-GL) engines
FBO
2014FRAMEBUFFER OBJECT
 A Frame Buffer Object
 Can be just a color buffer (ex, a buffer of size 1920x1080x 4)
 Typically also has depth/ stencil buffer
 By default – FBO – ID “0” is never assigned to new FBO
 It is assigned to Window system provided Frame Buffer (onscreen)
 Renderbuffers and Textures can be “attached” to FBO
 For RB – application has to allocate storage
 For FBO, the GL server will allocate the storage
rtt
2014RENDER-TO-TEXTURE
 By binding a Texture to a FBO, the FBO can be used as
 Stage 1 – target of a rendering operation
 Stage 2 – used as a texture to another draw
 This is “Render-To-Texture” (RTT)
 This allows the flexibility of “discreetly” using the server to do 3D operations (not
visible onscreen), then use this output as texture input to a visible object
 If not for RTT, we have to render to regular Framebuffer then do CopyTexImage2D()
or readPixels() which are inefficient
 Offscreen rendering is needed for dynamic-reflections
APIs
2014POST-PROCESSING OPERATIONS
 Blending with Framebuffer - enables nice effects (Ref Lab #6)
 Standard Alpha-Blending
 glEnable ( GL_BLEND );
 glBlendFunc ( GL_SRC_ALPHA, GL_ONE );
 Is a “bad” way of creating effects
 Reads back previous framebuffer contents, then blend
 Makes application memory bound, specially at larger resolutions
 Stalls parallel operations within the GPU
 Recommended way is to perform Render-To-Texture, and blending where
necessary in the shader
 But needed for medical image viewing – ex Ultrasound images, > 128 slices
blending
programming
PROGRAMMING FBO AND ONSCREEN
 glGenFramebuffers
 glBindFramebuffer
 Makes this FBO used
 glFramebufferTexture2D(id)
 Indicate ‘id’ is to be used for rendering to
TEXTURE, so storage is different
 glDeleteFramebuffers
 Then, create separate object to texture with
TEXTURE ‘id’
 Then, use previous textureID id as input to
texImage2D next
 Switching to on-screen
 Change binding to screen FB
 Load different set of vertices as needed,
different program as needed
 Set texture binding to FBO texture drawn
previously
 DrawElements call
 FBOs are used to do post-processing effects
PROGRAMMING
 Clear the current screen to a
FBO off-screen, with a color
 Using this FBO as RGB texture
input, render another rectangle
on-screen
 “CheckFramebufferStatus()” -
very important
 Lab Exercise
2014LAB L5 – RENDER TO TEXTURE
OPENGL TO GLES 2
2014
CONSIDERING THE GL TO GLES
MOVEMENT
 Ensure display lists are not used
 Convert polygons to triangles/ lines
 Check for missing extensions, shaders and rendering modes
 Ex, shader language
 Ex, 3D Texture (This is added in GL ES3.0) – Ultrasound image rendering
 Performance:
 Immediate, and Tile based-Deferred
 Streaming textures
 Use specific extensions – ex eglImage
 Do not use glTexImage2D
 Find out bottlenecks through profiling – CPU or GPU ? 11
PLATFORM INTEGRATION
2014SETTING UP THE PLATFORM - EGL
 Context, Window, Surface
 Refer to sgxperf - link
 OpenGL ES –
 EGL_SWAP_BEHAVIOR == “EGL_BUFFER_PRESERVED”
 Reduces performance
 Anti-aliasing configurations
 EGL_SAMPLES (4 to 16 typically, 4 on embedded platforms)
 WebGL - preserveDrawingBuffer – attribute
 Optimisations done if it is known that app is clearing the buffer – no dirty region check
and whole scene is drawn efficiently
 Dirty region check made in some systems
Android
2014ANDROID INTEGRATION DETAILS
 Android composition uses GLES2.0 mostly as a pixel processor, not a vertex
processor
 Uninteresting rectangular windows, treated as a texture
 6 vertices
 Blending of translucent screens/ buttons/ text
 3D (GLES2.0) is natively integrated
 3D Live wallpaper backgrounds
 Video morphing during conferencing (?)
 Use the NDK
Surfaceflinger
2014
ANDROID SURFACEFLINGER
ARCHITECTURE
 Introduction to OpenGL interface on Android
 http://code.google.com/p/gdc2011-android-opengl/wiki/TalkTranscript
 HW acceleration on Android 3.0 / 4.x
 http://android-developers.blogspot.com/2011/11/android-40-graphics-and-
animations.html
composition
2014
HOW ANDROID ACCELERATES
COMPOSITION
 Indirectly, using window surfaces as textures
 eglImage extensions allow direct usage
 Rather than texImage2D
 Understand overheads of texImage2D for live images
 Below picture from IMGTECH website shows
the stack
3D
2014
HOW ANDROID ACCELERATES 3D
OPERATIONS
 Directly
 Java wrappers (bindings) provided for GLES20 APIs, for the Java application
writer
 Not all APIs
 Every API level includes more and more number of API coverage
 3D rendering gets drawn to an Android “surface”
 Then gets “composited” with other elements, before display on final screen
 http://code.google.com/p/android-native-egl-
example/source/browse/jni/renderer.cpp iOS
2014IOS INTERFACE
 Creating an application using Xcode
 http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iPhone101/A
rticles/00_Introduction.html#//apple_ref/doc/uid/TP40007514-CH1-SW1
 GL Platform integration quite different from Android
 http://developer.apple.com/library/ios/#documentation/3DDrawing/Conceptual/OpenG
LES_ProgrammingGuide/Introduction/Introduction.html#//apple_ref/doc/uid/TP400087
93-CH1-SW1
 Lot of Apple specific extensions – ex MSAA
pixmaps
2014PIXMAPS
 EGL does not specify multi-process operation
 Pixmap - A critical component in systems for composition with multiple
processes / shared memory
 EGL_KHR_image_pixmap
 http://www.khronos.org/registry/egl/extensions/KHR/EGL_KHR_image_pixmap.txt
 This is used for getting output from multiple processes as textures, and then
used by composition manager to show the composited final desktop with
blending enabled
 Accelerated with openGL / ES
 Used in Android, Xorg …. Qt
2014QT INTERFACE
 How frameworks use 3D engine for blitting, composition work
 Qt + powervr display plugin (Qt4 only)
 Qt5 + eglfs or Qt + Wayland
 GraphicsSystem
optimising
2014OPTIMISING OPENGL / ES APPLICATIONS
 Graphics performance is closely tied to a specific HW
 Size of interface to memory, cache lines
 HW shared with CPU – ex, dedicated memory banks
 Power vs Raw performance
 Intelligent Discarding of vertices/ objects (!)
 Performance is typically limited by
 Memory throughput
 GPU pixel operations per GPU clock
 CPU throughput for operations involving vertices
 Load balancing of units – within the GPU
 GPUs that are integrated into SOCs are closely tied to the CPU for operations, than discrete GPUs
 Ex, GPU drivers offload some operations to CPU
debugging
2014DEBUGGING OPENGL
 Vanishing vertices, Holes
 Improper lighting
 Missing objects in complex scenes
 Android Tools
 systrace with GPU tracing enabled (http://developer.android.com/tools/debugging/systrace.html)
 Windows Tools
 PerfHUD ES
 Perfkit/ GLExpert / gDEBugger
 Intel GPA
 Linux Tools
 PVRTune (IMG)
 GDebugger
 Standard kernel tools
 Intel GPA
 Pixel vs Vertex throughput, CPU loading, FPS, Memory limited – tuning knobs
2014REFERENCES
 Specs - http://khronos.org/opengles
 CanvasMatrix.js
 https://github.com/toji/gl-matrix
 Tools - http://www.iquilezles.org/apps/shadertoy/
 http://www.inka3d.com/ (from Maya)
 http://assimp.sourceforge.net/ - Asset importer
 ARM – Mali – Architecture Recommendations
 http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0363d/CJAFCCDE.html
 Optimising games – simple tips
 http://glenncorpes.blogspot.com/2011/09/topia-optimising-for-opengles20.html
2014APPENDIX: VIDEO AND GRAPHICS
 Graphics is computed creation
 Video is recorded as-is
 Graphics is object – based
 Video (today) is not
 Graphics is computed every frame fully
 Video is mostly delta sequences
 Motion-detection, construction, compensation
 But extensions like swap_region (Nokia) exist

Contenu connexe

Tendances

Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...Opersys inc.
 
OpenGL 4.4 - Scene Rendering Techniques
OpenGL 4.4 - Scene Rendering TechniquesOpenGL 4.4 - Scene Rendering Techniques
OpenGL 4.4 - Scene Rendering TechniquesNarann29
 
OpenGL 4.5 Update for NVIDIA GPUs
OpenGL 4.5 Update for NVIDIA GPUsOpenGL 4.5 Update for NVIDIA GPUs
OpenGL 4.5 Update for NVIDIA GPUsMark Kilgard
 
Advanced Debugging with GDB
Advanced Debugging with GDBAdvanced Debugging with GDB
Advanced Debugging with GDBDavid Khosid
 
Approaching zero driver overhead
Approaching zero driver overheadApproaching zero driver overhead
Approaching zero driver overheadCass Everitt
 
Accessing Hardware on Android
Accessing Hardware on AndroidAccessing Hardware on Android
Accessing Hardware on AndroidGary Bisson
 
Understanding the Android System Server
Understanding the Android System ServerUnderstanding the Android System Server
Understanding the Android System ServerOpersys inc.
 
Embedded Android Workshop with Pie
Embedded Android Workshop with PieEmbedded Android Workshop with Pie
Embedded Android Workshop with PieOpersys inc.
 
Dx11 performancereloaded
Dx11 performancereloadedDx11 performancereloaded
Dx11 performancereloadedmistercteam
 
Symbolic Debugging with DWARF
Symbolic Debugging with DWARFSymbolic Debugging with DWARF
Symbolic Debugging with DWARFSamy Bahra
 
Using and Customizing the Android Framework / part 4 of Embedded Android Work...
Using and Customizing the Android Framework / part 4 of Embedded Android Work...Using and Customizing the Android Framework / part 4 of Embedded Android Work...
Using and Customizing the Android Framework / part 4 of Embedded Android Work...Opersys inc.
 
Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14
Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14
Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14AMD Developer Central
 
Q4.11: Porting Android to new Platforms
Q4.11: Porting Android to new PlatformsQ4.11: Porting Android to new Platforms
Q4.11: Porting Android to new PlatformsLinaro
 

Tendances (20)

Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
 
OpenGL 4.4 - Scene Rendering Techniques
OpenGL 4.4 - Scene Rendering TechniquesOpenGL 4.4 - Scene Rendering Techniques
OpenGL 4.4 - Scene Rendering Techniques
 
OpenGL 4.5 Update for NVIDIA GPUs
OpenGL 4.5 Update for NVIDIA GPUsOpenGL 4.5 Update for NVIDIA GPUs
OpenGL 4.5 Update for NVIDIA GPUs
 
DirectX 11 Rendering in Battlefield 3
DirectX 11 Rendering in Battlefield 3DirectX 11 Rendering in Battlefield 3
DirectX 11 Rendering in Battlefield 3
 
Embedded Android : System Development - Part IV (Android System Services)
Embedded Android : System Development - Part IV (Android System Services)Embedded Android : System Development - Part IV (Android System Services)
Embedded Android : System Development - Part IV (Android System Services)
 
Advanced Debugging with GDB
Advanced Debugging with GDBAdvanced Debugging with GDB
Advanced Debugging with GDB
 
Approaching zero driver overhead
Approaching zero driver overheadApproaching zero driver overhead
Approaching zero driver overhead
 
Accessing Hardware on Android
Accessing Hardware on AndroidAccessing Hardware on Android
Accessing Hardware on Android
 
Embedded Android : System Development - Part I
Embedded Android : System Development - Part IEmbedded Android : System Development - Part I
Embedded Android : System Development - Part I
 
Understanding the Android System Server
Understanding the Android System ServerUnderstanding the Android System Server
Understanding the Android System Server
 
Programming with OpenGL
Programming with OpenGLProgramming with OpenGL
Programming with OpenGL
 
Embedded Android Workshop with Pie
Embedded Android Workshop with PieEmbedded Android Workshop with Pie
Embedded Android Workshop with Pie
 
Dx11 performancereloaded
Dx11 performancereloadedDx11 performancereloaded
Dx11 performancereloaded
 
Deep Dive into the AOSP
Deep Dive into the AOSPDeep Dive into the AOSP
Deep Dive into the AOSP
 
Introduction to OpenCL
Introduction to OpenCLIntroduction to OpenCL
Introduction to OpenCL
 
Symbolic Debugging with DWARF
Symbolic Debugging with DWARFSymbolic Debugging with DWARF
Symbolic Debugging with DWARF
 
Using and Customizing the Android Framework / part 4 of Embedded Android Work...
Using and Customizing the Android Framework / part 4 of Embedded Android Work...Using and Customizing the Android Framework / part 4 of Embedded Android Work...
Using and Customizing the Android Framework / part 4 of Embedded Android Work...
 
Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14
Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14
Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14
 
Q4.11: Porting Android to new Platforms
Q4.11: Porting Android to new PlatformsQ4.11: Porting Android to new Platforms
Q4.11: Porting Android to new Platforms
 
CUDA
CUDACUDA
CUDA
 

En vedette

GFX Part 5 - Introduction to Object Transformations in OpenGL ES
GFX Part 5 - Introduction to Object Transformations in OpenGL ESGFX Part 5 - Introduction to Object Transformations in OpenGL ES
GFX Part 5 - Introduction to Object Transformations in OpenGL ESPrabindh Sundareson
 
Technology, Innovation - A Perspective
Technology, Innovation - A PerspectiveTechnology, Innovation - A Perspective
Technology, Innovation - A PerspectivePrabindh Sundareson
 
GFX Part 1 - Introduction to GPU HW and OpenGL ES specifications
GFX Part 1 - Introduction to GPU HW and OpenGL ES specificationsGFX Part 1 - Introduction to GPU HW and OpenGL ES specifications
GFX Part 1 - Introduction to GPU HW and OpenGL ES specificationsPrabindh Sundareson
 
ONscreen vs. OFFscreen rendering v iOS - For-Mobile 3/2013
ONscreen vs. OFFscreen rendering v iOS - For-Mobile 3/2013ONscreen vs. OFFscreen rendering v iOS - For-Mobile 3/2013
ONscreen vs. OFFscreen rendering v iOS - For-Mobile 3/2013Tomáš Jukin
 
GFX Part 6 - Introduction to Vertex and Fragment Shaders in OpenGL ES
GFX Part 6 - Introduction to Vertex and Fragment Shaders in OpenGL ESGFX Part 6 - Introduction to Vertex and Fragment Shaders in OpenGL ES
GFX Part 6 - Introduction to Vertex and Fragment Shaders in OpenGL ESPrabindh Sundareson
 
John Carmack talk at SMU, April 2014 - Virtual Reality
John Carmack talk at SMU, April 2014 - Virtual RealityJohn Carmack talk at SMU, April 2014 - Virtual Reality
John Carmack talk at SMU, April 2014 - Virtual RealityPrabindh Sundareson
 
GFX Part 4 - Introduction to Texturing in OpenGL ES
GFX Part 4 - Introduction to Texturing in OpenGL ESGFX Part 4 - Introduction to Texturing in OpenGL ES
GFX Part 4 - Introduction to Texturing in OpenGL ESPrabindh Sundareson
 
GFX Part 3 - Vertices and interactions in OpenGL
GFX Part 3 - Vertices and interactions in OpenGLGFX Part 3 - Vertices and interactions in OpenGL
GFX Part 3 - Vertices and interactions in OpenGLPrabindh Sundareson
 
GFX part 8 - Three.js introduction and usage
GFX part 8 - Three.js introduction and usageGFX part 8 - Three.js introduction and usage
GFX part 8 - Three.js introduction and usagePrabindh Sundareson
 
GFX Part 2 - Introduction to GPU Programming
GFX Part 2 - Introduction to GPU ProgrammingGFX Part 2 - Introduction to GPU Programming
GFX Part 2 - Introduction to GPU ProgrammingPrabindh Sundareson
 
IEEE - Consumer Electronics Trends Opportunities (2015)
IEEE - Consumer Electronics Trends Opportunities (2015)IEEE - Consumer Electronics Trends Opportunities (2015)
IEEE - Consumer Electronics Trends Opportunities (2015)Prabindh Sundareson
 

En vedette (12)

GFX Part 5 - Introduction to Object Transformations in OpenGL ES
GFX Part 5 - Introduction to Object Transformations in OpenGL ESGFX Part 5 - Introduction to Object Transformations in OpenGL ES
GFX Part 5 - Introduction to Object Transformations in OpenGL ES
 
Technology, Innovation - A Perspective
Technology, Innovation - A PerspectiveTechnology, Innovation - A Perspective
Technology, Innovation - A Perspective
 
GFX Part 1 - Introduction to GPU HW and OpenGL ES specifications
GFX Part 1 - Introduction to GPU HW and OpenGL ES specificationsGFX Part 1 - Introduction to GPU HW and OpenGL ES specifications
GFX Part 1 - Introduction to GPU HW and OpenGL ES specifications
 
ONscreen vs. OFFscreen rendering v iOS - For-Mobile 3/2013
ONscreen vs. OFFscreen rendering v iOS - For-Mobile 3/2013ONscreen vs. OFFscreen rendering v iOS - For-Mobile 3/2013
ONscreen vs. OFFscreen rendering v iOS - For-Mobile 3/2013
 
GFX Part 6 - Introduction to Vertex and Fragment Shaders in OpenGL ES
GFX Part 6 - Introduction to Vertex and Fragment Shaders in OpenGL ESGFX Part 6 - Introduction to Vertex and Fragment Shaders in OpenGL ES
GFX Part 6 - Introduction to Vertex and Fragment Shaders in OpenGL ES
 
John Carmack talk at SMU, April 2014 - Virtual Reality
John Carmack talk at SMU, April 2014 - Virtual RealityJohn Carmack talk at SMU, April 2014 - Virtual Reality
John Carmack talk at SMU, April 2014 - Virtual Reality
 
GFX Part 4 - Introduction to Texturing in OpenGL ES
GFX Part 4 - Introduction to Texturing in OpenGL ESGFX Part 4 - Introduction to Texturing in OpenGL ES
GFX Part 4 - Introduction to Texturing in OpenGL ES
 
GFX Part 3 - Vertices and interactions in OpenGL
GFX Part 3 - Vertices and interactions in OpenGLGFX Part 3 - Vertices and interactions in OpenGL
GFX Part 3 - Vertices and interactions in OpenGL
 
GFX part 8 - Three.js introduction and usage
GFX part 8 - Three.js introduction and usageGFX part 8 - Three.js introduction and usage
GFX part 8 - Three.js introduction and usage
 
Open Shading Language (OSL)
Open Shading Language (OSL)Open Shading Language (OSL)
Open Shading Language (OSL)
 
GFX Part 2 - Introduction to GPU Programming
GFX Part 2 - Introduction to GPU ProgrammingGFX Part 2 - Introduction to GPU Programming
GFX Part 2 - Introduction to GPU Programming
 
IEEE - Consumer Electronics Trends Opportunities (2015)
IEEE - Consumer Electronics Trends Opportunities (2015)IEEE - Consumer Electronics Trends Opportunities (2015)
IEEE - Consumer Electronics Trends Opportunities (2015)
 

Similaire à GFX Part 7 - Introduction to Rendering Targets in OpenGL ES

Advanced Graphics Workshop - GFX2011
Advanced Graphics Workshop - GFX2011Advanced Graphics Workshop - GFX2011
Advanced Graphics Workshop - GFX2011Prabindh Sundareson
 
OpenGL ES based UI Development on TI Platforms
OpenGL ES based UI Development on TI PlatformsOpenGL ES based UI Development on TI Platforms
OpenGL ES based UI Development on TI PlatformsPrabindh Sundareson
 
Well Behaved Mobile Apps on AIR - Performance Related
Well Behaved Mobile Apps on AIR - Performance RelatedWell Behaved Mobile Apps on AIR - Performance Related
Well Behaved Mobile Apps on AIR - Performance RelatedRenaun Erickson
 
NVIDIA's OpenGL Functionality
NVIDIA's OpenGL FunctionalityNVIDIA's OpenGL Functionality
NVIDIA's OpenGL FunctionalityMark Kilgard
 
Creative Coders March 2013 - Introducing Starling Framework
Creative Coders March 2013 - Introducing Starling FrameworkCreative Coders March 2013 - Introducing Starling Framework
Creative Coders March 2013 - Introducing Starling FrameworkHuijie Wu
 
FrameGraph: Extensible Rendering Architecture in Frostbite
FrameGraph: Extensible Rendering Architecture in FrostbiteFrameGraph: Extensible Rendering Architecture in Frostbite
FrameGraph: Extensible Rendering Architecture in FrostbiteElectronic Arts / DICE
 
Gdc 14 bringing unreal engine 4 to open_gl
Gdc 14 bringing unreal engine 4 to open_glGdc 14 bringing unreal engine 4 to open_gl
Gdc 14 bringing unreal engine 4 to open_glchangehee lee
 
Sig13 ce future_gfx
Sig13 ce future_gfxSig13 ce future_gfx
Sig13 ce future_gfxCass Everitt
 
JIT Spraying Never Dies - Bypass CFG By Leveraging WARP Shader JIT Spraying.pdf
JIT Spraying Never Dies - Bypass CFG By Leveraging WARP Shader JIT Spraying.pdfJIT Spraying Never Dies - Bypass CFG By Leveraging WARP Shader JIT Spraying.pdf
JIT Spraying Never Dies - Bypass CFG By Leveraging WARP Shader JIT Spraying.pdfSamiraKids
 
VisionizeBeforeVisulaize_IEVC_Final
VisionizeBeforeVisulaize_IEVC_FinalVisionizeBeforeVisulaize_IEVC_Final
VisionizeBeforeVisulaize_IEVC_FinalMasatsugu HASHIMOTO
 
Parallel Graphics in Frostbite - Current & Future (Siggraph 2009)
Parallel Graphics in Frostbite - Current & Future (Siggraph 2009)Parallel Graphics in Frostbite - Current & Future (Siggraph 2009)
Parallel Graphics in Frostbite - Current & Future (Siggraph 2009)Johan Andersson
 
Computer Graphics - Lecture 01 - 3D Programming I
Computer Graphics - Lecture 01 - 3D Programming IComputer Graphics - Lecture 01 - 3D Programming I
Computer Graphics - Lecture 01 - 3D Programming I💻 Anton Gerdelan
 
[Unite Seoul 2019] Mali GPU Architecture and Mobile Studio
[Unite Seoul 2019] Mali GPU Architecture and Mobile Studio [Unite Seoul 2019] Mali GPU Architecture and Mobile Studio
[Unite Seoul 2019] Mali GPU Architecture and Mobile Studio Owen Wu
 

Similaire à GFX Part 7 - Introduction to Rendering Targets in OpenGL ES (20)

Advanced Graphics Workshop - GFX2011
Advanced Graphics Workshop - GFX2011Advanced Graphics Workshop - GFX2011
Advanced Graphics Workshop - GFX2011
 
OpenGL ES based UI Development on TI Platforms
OpenGL ES based UI Development on TI PlatformsOpenGL ES based UI Development on TI Platforms
OpenGL ES based UI Development on TI Platforms
 
Well Behaved Mobile Apps on AIR - Performance Related
Well Behaved Mobile Apps on AIR - Performance RelatedWell Behaved Mobile Apps on AIR - Performance Related
Well Behaved Mobile Apps on AIR - Performance Related
 
OpenGL 4 for 2010
OpenGL 4 for 2010OpenGL 4 for 2010
OpenGL 4 for 2010
 
NVIDIA's OpenGL Functionality
NVIDIA's OpenGL FunctionalityNVIDIA's OpenGL Functionality
NVIDIA's OpenGL Functionality
 
Introduction to 2D/3D Graphics
Introduction to 2D/3D GraphicsIntroduction to 2D/3D Graphics
Introduction to 2D/3D Graphics
 
Adobe MAX Recap
Adobe MAX RecapAdobe MAX Recap
Adobe MAX Recap
 
Creative Coders March 2013 - Introducing Starling Framework
Creative Coders March 2013 - Introducing Starling FrameworkCreative Coders March 2013 - Introducing Starling Framework
Creative Coders March 2013 - Introducing Starling Framework
 
FrameGraph: Extensible Rendering Architecture in Frostbite
FrameGraph: Extensible Rendering Architecture in FrostbiteFrameGraph: Extensible Rendering Architecture in Frostbite
FrameGraph: Extensible Rendering Architecture in Frostbite
 
Open gl
Open glOpen gl
Open gl
 
Gdc 14 bringing unreal engine 4 to open_gl
Gdc 14 bringing unreal engine 4 to open_glGdc 14 bringing unreal engine 4 to open_gl
Gdc 14 bringing unreal engine 4 to open_gl
 
Sig13 ce future_gfx
Sig13 ce future_gfxSig13 ce future_gfx
Sig13 ce future_gfx
 
JIT Spraying Never Dies - Bypass CFG By Leveraging WARP Shader JIT Spraying.pdf
JIT Spraying Never Dies - Bypass CFG By Leveraging WARP Shader JIT Spraying.pdfJIT Spraying Never Dies - Bypass CFG By Leveraging WARP Shader JIT Spraying.pdf
JIT Spraying Never Dies - Bypass CFG By Leveraging WARP Shader JIT Spraying.pdf
 
Android native gl
Android native glAndroid native gl
Android native gl
 
VisionizeBeforeVisulaize_IEVC_Final
VisionizeBeforeVisulaize_IEVC_FinalVisionizeBeforeVisulaize_IEVC_Final
VisionizeBeforeVisulaize_IEVC_Final
 
Parallel Graphics in Frostbite - Current & Future (Siggraph 2009)
Parallel Graphics in Frostbite - Current & Future (Siggraph 2009)Parallel Graphics in Frostbite - Current & Future (Siggraph 2009)
Parallel Graphics in Frostbite - Current & Future (Siggraph 2009)
 
Computer Graphics - Lecture 01 - 3D Programming I
Computer Graphics - Lecture 01 - 3D Programming IComputer Graphics - Lecture 01 - 3D Programming I
Computer Graphics - Lecture 01 - 3D Programming I
 
Opengl basics
Opengl basicsOpengl basics
Opengl basics
 
[Unite Seoul 2019] Mali GPU Architecture and Mobile Studio
[Unite Seoul 2019] Mali GPU Architecture and Mobile Studio [Unite Seoul 2019] Mali GPU Architecture and Mobile Studio
[Unite Seoul 2019] Mali GPU Architecture and Mobile Studio
 
Computer graphics workbook
Computer graphics workbookComputer graphics workbook
Computer graphics workbook
 

Plus de Prabindh Sundareson

Synthetic Data and Graphics Techniques in Robotics
Synthetic Data and Graphics Techniques in RoboticsSynthetic Data and Graphics Techniques in Robotics
Synthetic Data and Graphics Techniques in RoboticsPrabindh Sundareson
 
Machine learning in the Indian Context - IEEE talk at SRM Institute
Machine learning in the Indian Context - IEEE talk at SRM InstituteMachine learning in the Indian Context - IEEE talk at SRM Institute
Machine learning in the Indian Context - IEEE talk at SRM InstitutePrabindh Sundareson
 
ICCE Asia 2017 - Program Outline
ICCE Asia 2017 - Program OutlineICCE Asia 2017 - Program Outline
ICCE Asia 2017 - Program OutlinePrabindh Sundareson
 
Call for Papers - ICCE Asia 2017
Call for Papers - ICCE Asia 2017Call for Papers - ICCE Asia 2017
Call for Papers - ICCE Asia 2017Prabindh Sundareson
 
Gfx2014 Graphics Workshop - Lab manual
Gfx2014 Graphics Workshop - Lab manualGfx2014 Graphics Workshop - Lab manual
Gfx2014 Graphics Workshop - Lab manualPrabindh Sundareson
 
ANGLE on Windows for OpenGLES2.0
ANGLE on Windows for OpenGLES2.0ANGLE on Windows for OpenGLES2.0
ANGLE on Windows for OpenGLES2.0Prabindh Sundareson
 
Yocto usage for Graphics SDK on AM335x
Yocto usage for Graphics SDK on AM335xYocto usage for Graphics SDK on AM335x
Yocto usage for Graphics SDK on AM335xPrabindh Sundareson
 
ARM Linux Embedded memory protection techniques
ARM Linux Embedded memory protection techniquesARM Linux Embedded memory protection techniques
ARM Linux Embedded memory protection techniquesPrabindh Sundareson
 
Qt5 (minimal) on beaglebone, with Yocto
Qt5 (minimal) on beaglebone, with YoctoQt5 (minimal) on beaglebone, with Yocto
Qt5 (minimal) on beaglebone, with YoctoPrabindh Sundareson
 
Moksha - HTML5/CSS with Qt5+Snowshoe on AM335x
Moksha - HTML5/CSS with Qt5+Snowshoe on AM335xMoksha - HTML5/CSS with Qt5+Snowshoe on AM335x
Moksha - HTML5/CSS with Qt5+Snowshoe on AM335xPrabindh Sundareson
 

Plus de Prabindh Sundareson (19)

Synthetic Data and Graphics Techniques in Robotics
Synthetic Data and Graphics Techniques in RoboticsSynthetic Data and Graphics Techniques in Robotics
Synthetic Data and Graphics Techniques in Robotics
 
Work and Life
Work and Life Work and Life
Work and Life
 
GPU Algorithms and trends 2018
GPU Algorithms and trends 2018GPU Algorithms and trends 2018
GPU Algorithms and trends 2018
 
Machine learning in the Indian Context - IEEE talk at SRM Institute
Machine learning in the Indian Context - IEEE talk at SRM InstituteMachine learning in the Indian Context - IEEE talk at SRM Institute
Machine learning in the Indian Context - IEEE talk at SRM Institute
 
Students Hackathon - 2017
Students Hackathon - 2017Students Hackathon - 2017
Students Hackathon - 2017
 
ICCE Asia 2017 - Program Outline
ICCE Asia 2017 - Program OutlineICCE Asia 2017 - Program Outline
ICCE Asia 2017 - Program Outline
 
Call for Papers - ICCE Asia 2017
Call for Papers - ICCE Asia 2017Call for Papers - ICCE Asia 2017
Call for Papers - ICCE Asia 2017
 
GFX2014 OpenGL ES Quiz
GFX2014 OpenGL ES QuizGFX2014 OpenGL ES Quiz
GFX2014 OpenGL ES Quiz
 
Gfx2014 Graphics Workshop - Lab manual
Gfx2014 Graphics Workshop - Lab manualGfx2014 Graphics Workshop - Lab manual
Gfx2014 Graphics Workshop - Lab manual
 
Render to Texture with Three.js
Render to Texture with Three.jsRender to Texture with Three.js
Render to Texture with Three.js
 
ANGLE on Windows for OpenGLES2.0
ANGLE on Windows for OpenGLES2.0ANGLE on Windows for OpenGLES2.0
ANGLE on Windows for OpenGLES2.0
 
Yocto usage for Graphics SDK on AM335x
Yocto usage for Graphics SDK on AM335xYocto usage for Graphics SDK on AM335x
Yocto usage for Graphics SDK on AM335x
 
Gfx2013 lab manual
Gfx2013 lab manualGfx2013 lab manual
Gfx2013 lab manual
 
ARM Linux Embedded memory protection techniques
ARM Linux Embedded memory protection techniquesARM Linux Embedded memory protection techniques
ARM Linux Embedded memory protection techniques
 
Qt5 (minimal) on beaglebone, with Yocto
Qt5 (minimal) on beaglebone, with YoctoQt5 (minimal) on beaglebone, with Yocto
Qt5 (minimal) on beaglebone, with Yocto
 
Moksha - HTML5/CSS with Qt5+Snowshoe on AM335x
Moksha - HTML5/CSS with Qt5+Snowshoe on AM335xMoksha - HTML5/CSS with Qt5+Snowshoe on AM335x
Moksha - HTML5/CSS with Qt5+Snowshoe on AM335x
 
Qt5.0.0 eglfs abort issue
Qt5.0.0 eglfs abort issueQt5.0.0 eglfs abort issue
Qt5.0.0 eglfs abort issue
 
Cache profiling on ARM Linux
Cache profiling on ARM LinuxCache profiling on ARM Linux
Cache profiling on ARM Linux
 
Qt5 beta1 on ti platforms
Qt5 beta1 on ti platformsQt5 beta1 on ti platforms
Qt5 beta1 on ti platforms
 

Dernier

Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 

Dernier (20)

Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 

GFX Part 7 - Introduction to Rendering Targets in OpenGL ES

  • 2. 2014RENDERING TARGETS  A rendering context is required before drawing a scene. And a correponding Framebuffer  Recall bindFramebuffer()  It can be  Window system Framebuffer (Fb)  Offscreen buffer (Implemented in a Frame Buffer Object)  FBO is not a memory area – it is information about the actual color buffer in memory, depth/ stencil buffers  By default, rendering happens to the Window system framebuffer (ID ‘0’) Need
  • 3. 2014NEED FOR OFFSCREEN RENDERING  Special effects  Refer the fire effect specified earlier (Multiple passes)  Interfacing to “non-display” use-cases  Ex, passing video through GPU, perform 3D effects, then re-encode back to compressed format  Edge detection/ computation – output is sent to a memory buffer for use by other (non-GL) engines FBO
  • 4. 2014FRAMEBUFFER OBJECT  A Frame Buffer Object  Can be just a color buffer (ex, a buffer of size 1920x1080x 4)  Typically also has depth/ stencil buffer  By default – FBO – ID “0” is never assigned to new FBO  It is assigned to Window system provided Frame Buffer (onscreen)  Renderbuffers and Textures can be “attached” to FBO  For RB – application has to allocate storage  For FBO, the GL server will allocate the storage rtt
  • 5. 2014RENDER-TO-TEXTURE  By binding a Texture to a FBO, the FBO can be used as  Stage 1 – target of a rendering operation  Stage 2 – used as a texture to another draw  This is “Render-To-Texture” (RTT)  This allows the flexibility of “discreetly” using the server to do 3D operations (not visible onscreen), then use this output as texture input to a visible object  If not for RTT, we have to render to regular Framebuffer then do CopyTexImage2D() or readPixels() which are inefficient  Offscreen rendering is needed for dynamic-reflections APIs
  • 6. 2014POST-PROCESSING OPERATIONS  Blending with Framebuffer - enables nice effects (Ref Lab #6)  Standard Alpha-Blending  glEnable ( GL_BLEND );  glBlendFunc ( GL_SRC_ALPHA, GL_ONE );  Is a “bad” way of creating effects  Reads back previous framebuffer contents, then blend  Makes application memory bound, specially at larger resolutions  Stalls parallel operations within the GPU  Recommended way is to perform Render-To-Texture, and blending where necessary in the shader  But needed for medical image viewing – ex Ultrasound images, > 128 slices blending programming
  • 7. PROGRAMMING FBO AND ONSCREEN  glGenFramebuffers  glBindFramebuffer  Makes this FBO used  glFramebufferTexture2D(id)  Indicate ‘id’ is to be used for rendering to TEXTURE, so storage is different  glDeleteFramebuffers  Then, create separate object to texture with TEXTURE ‘id’  Then, use previous textureID id as input to texImage2D next  Switching to on-screen  Change binding to screen FB  Load different set of vertices as needed, different program as needed  Set texture binding to FBO texture drawn previously  DrawElements call  FBOs are used to do post-processing effects
  • 8. PROGRAMMING  Clear the current screen to a FBO off-screen, with a color  Using this FBO as RGB texture input, render another rectangle on-screen  “CheckFramebufferStatus()” - very important  Lab Exercise
  • 9. 2014LAB L5 – RENDER TO TEXTURE
  • 11. 2014 CONSIDERING THE GL TO GLES MOVEMENT  Ensure display lists are not used  Convert polygons to triangles/ lines  Check for missing extensions, shaders and rendering modes  Ex, shader language  Ex, 3D Texture (This is added in GL ES3.0) – Ultrasound image rendering  Performance:  Immediate, and Tile based-Deferred  Streaming textures  Use specific extensions – ex eglImage  Do not use glTexImage2D  Find out bottlenecks through profiling – CPU or GPU ? 11
  • 13. 2014SETTING UP THE PLATFORM - EGL  Context, Window, Surface  Refer to sgxperf - link  OpenGL ES –  EGL_SWAP_BEHAVIOR == “EGL_BUFFER_PRESERVED”  Reduces performance  Anti-aliasing configurations  EGL_SAMPLES (4 to 16 typically, 4 on embedded platforms)  WebGL - preserveDrawingBuffer – attribute  Optimisations done if it is known that app is clearing the buffer – no dirty region check and whole scene is drawn efficiently  Dirty region check made in some systems Android
  • 14. 2014ANDROID INTEGRATION DETAILS  Android composition uses GLES2.0 mostly as a pixel processor, not a vertex processor  Uninteresting rectangular windows, treated as a texture  6 vertices  Blending of translucent screens/ buttons/ text  3D (GLES2.0) is natively integrated  3D Live wallpaper backgrounds  Video morphing during conferencing (?)  Use the NDK Surfaceflinger
  • 15. 2014 ANDROID SURFACEFLINGER ARCHITECTURE  Introduction to OpenGL interface on Android  http://code.google.com/p/gdc2011-android-opengl/wiki/TalkTranscript  HW acceleration on Android 3.0 / 4.x  http://android-developers.blogspot.com/2011/11/android-40-graphics-and- animations.html composition
  • 16. 2014 HOW ANDROID ACCELERATES COMPOSITION  Indirectly, using window surfaces as textures  eglImage extensions allow direct usage  Rather than texImage2D  Understand overheads of texImage2D for live images  Below picture from IMGTECH website shows the stack 3D
  • 17. 2014 HOW ANDROID ACCELERATES 3D OPERATIONS  Directly  Java wrappers (bindings) provided for GLES20 APIs, for the Java application writer  Not all APIs  Every API level includes more and more number of API coverage  3D rendering gets drawn to an Android “surface”  Then gets “composited” with other elements, before display on final screen  http://code.google.com/p/android-native-egl- example/source/browse/jni/renderer.cpp iOS
  • 18. 2014IOS INTERFACE  Creating an application using Xcode  http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iPhone101/A rticles/00_Introduction.html#//apple_ref/doc/uid/TP40007514-CH1-SW1  GL Platform integration quite different from Android  http://developer.apple.com/library/ios/#documentation/3DDrawing/Conceptual/OpenG LES_ProgrammingGuide/Introduction/Introduction.html#//apple_ref/doc/uid/TP400087 93-CH1-SW1  Lot of Apple specific extensions – ex MSAA pixmaps
  • 19. 2014PIXMAPS  EGL does not specify multi-process operation  Pixmap - A critical component in systems for composition with multiple processes / shared memory  EGL_KHR_image_pixmap  http://www.khronos.org/registry/egl/extensions/KHR/EGL_KHR_image_pixmap.txt  This is used for getting output from multiple processes as textures, and then used by composition manager to show the composited final desktop with blending enabled  Accelerated with openGL / ES  Used in Android, Xorg …. Qt
  • 20. 2014QT INTERFACE  How frameworks use 3D engine for blitting, composition work  Qt + powervr display plugin (Qt4 only)  Qt5 + eglfs or Qt + Wayland  GraphicsSystem optimising
  • 21. 2014OPTIMISING OPENGL / ES APPLICATIONS  Graphics performance is closely tied to a specific HW  Size of interface to memory, cache lines  HW shared with CPU – ex, dedicated memory banks  Power vs Raw performance  Intelligent Discarding of vertices/ objects (!)  Performance is typically limited by  Memory throughput  GPU pixel operations per GPU clock  CPU throughput for operations involving vertices  Load balancing of units – within the GPU  GPUs that are integrated into SOCs are closely tied to the CPU for operations, than discrete GPUs  Ex, GPU drivers offload some operations to CPU debugging
  • 22. 2014DEBUGGING OPENGL  Vanishing vertices, Holes  Improper lighting  Missing objects in complex scenes  Android Tools  systrace with GPU tracing enabled (http://developer.android.com/tools/debugging/systrace.html)  Windows Tools  PerfHUD ES  Perfkit/ GLExpert / gDEBugger  Intel GPA  Linux Tools  PVRTune (IMG)  GDebugger  Standard kernel tools  Intel GPA  Pixel vs Vertex throughput, CPU loading, FPS, Memory limited – tuning knobs
  • 23. 2014REFERENCES  Specs - http://khronos.org/opengles  CanvasMatrix.js  https://github.com/toji/gl-matrix  Tools - http://www.iquilezles.org/apps/shadertoy/  http://www.inka3d.com/ (from Maya)  http://assimp.sourceforge.net/ - Asset importer  ARM – Mali – Architecture Recommendations  http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0363d/CJAFCCDE.html  Optimising games – simple tips  http://glenncorpes.blogspot.com/2011/09/topia-optimising-for-opengles20.html
  • 24. 2014APPENDIX: VIDEO AND GRAPHICS  Graphics is computed creation  Video is recorded as-is  Graphics is object – based  Video (today) is not  Graphics is computed every frame fully  Video is mostly delta sequences  Motion-detection, construction, compensation  But extensions like swap_region (Nokia) exist