SlideShare a Scribd company logo
1 of 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

More Related Content

What's hot

Overview of Android binder IPC implementation
Overview of Android binder IPC implementationOverview of Android binder IPC implementation
Overview of Android binder IPC implementationChethan Pchethan
 
Introduction to Skia by Ryan Chou @20141008
Introduction to Skia by Ryan Chou @20141008Introduction to Skia by Ryan Chou @20141008
Introduction to Skia by Ryan Chou @20141008Ryan Chou
 
Android's HIDL: Treble in the HAL
Android's HIDL: Treble in the HALAndroid's HIDL: Treble in the HAL
Android's HIDL: Treble in the HALOpersys inc.
 
iOS Development, with Swift and XCode
iOS Development, with Swift and XCodeiOS Development, with Swift and XCode
iOS Development, with Swift and XCodeWan Leung Wong
 
An introduction to the linux kernel and device drivers (NTU CSIE 2016.03)
An introduction to the linux kernel and device drivers (NTU CSIE 2016.03)An introduction to the linux kernel and device drivers (NTU CSIE 2016.03)
An introduction to the linux kernel and device drivers (NTU CSIE 2016.03)William Liang
 
Render thead of hwui
Render thead of hwuiRender thead of hwui
Render thead of hwuiRouyun Pan
 
OpenGLES - Graphics Programming in Android
OpenGLES - Graphics Programming in Android OpenGLES - Graphics Programming in Android
OpenGLES - Graphics Programming in Android Arvind Devaraj
 
Driving containerd operations with gRPC
Driving containerd operations with gRPCDriving containerd operations with gRPC
Driving containerd operations with gRPCDocker, Inc.
 
Learning AOSP - Android Linux Device Driver
Learning AOSP - Android Linux Device DriverLearning AOSP - Android Linux Device Driver
Learning AOSP - Android Linux Device DriverNanik Tolaram
 
Firefox OS Graphics inside
Firefox OS Graphics insideFirefox OS Graphics inside
Firefox OS Graphics insideSotaro Ikeda
 
Inside Android's UI
Inside Android's UIInside Android's UI
Inside Android's UIOpersys inc.
 
Android's Multimedia Framework
Android's Multimedia FrameworkAndroid's Multimedia Framework
Android's Multimedia FrameworkOpersys inc.
 
Eclipse plug in development
Eclipse plug in developmentEclipse plug in development
Eclipse plug in developmentMartin Toshev
 
OpenGL ES EGL Spec&APIs
OpenGL ES EGL Spec&APIsOpenGL ES EGL Spec&APIs
OpenGL ES EGL Spec&APIsJungsoo Nam
 

What's hot (20)

Overview of Android binder IPC implementation
Overview of Android binder IPC implementationOverview of Android binder IPC implementation
Overview of Android binder IPC implementation
 
Introduction to Skia by Ryan Chou @20141008
Introduction to Skia by Ryan Chou @20141008Introduction to Skia by Ryan Chou @20141008
Introduction to Skia by Ryan Chou @20141008
 
Android's HIDL: Treble in the HAL
Android's HIDL: Treble in the HALAndroid's HIDL: Treble in the HAL
Android's HIDL: Treble in the HAL
 
iOS Development, with Swift and XCode
iOS Development, with Swift and XCodeiOS Development, with Swift and XCode
iOS Development, with Swift and XCode
 
Init of Android
Init of AndroidInit of Android
Init of Android
 
An introduction to the linux kernel and device drivers (NTU CSIE 2016.03)
An introduction to the linux kernel and device drivers (NTU CSIE 2016.03)An introduction to the linux kernel and device drivers (NTU CSIE 2016.03)
An introduction to the linux kernel and device drivers (NTU CSIE 2016.03)
 
Render thead of hwui
Render thead of hwuiRender thead of hwui
Render thead of hwui
 
Jenkins-CI
Jenkins-CIJenkins-CI
Jenkins-CI
 
OpenGLES - Graphics Programming in Android
OpenGLES - Graphics Programming in Android OpenGLES - Graphics Programming in Android
OpenGLES - Graphics Programming in Android
 
Driving containerd operations with gRPC
Driving containerd operations with gRPCDriving containerd operations with gRPC
Driving containerd operations with gRPC
 
Jenkins CI
Jenkins CIJenkins CI
Jenkins CI
 
Learning AOSP - Android Linux Device Driver
Learning AOSP - Android Linux Device DriverLearning AOSP - Android Linux Device Driver
Learning AOSP - Android Linux Device Driver
 
Firefox OS Graphics inside
Firefox OS Graphics insideFirefox OS Graphics inside
Firefox OS Graphics inside
 
Embedded Android : System Development - Part II (Linux device drivers)
Embedded Android : System Development - Part II (Linux device drivers)Embedded Android : System Development - Part II (Linux device drivers)
Embedded Android : System Development - Part II (Linux device drivers)
 
Inside Android's UI
Inside Android's UIInside Android's UI
Inside Android's UI
 
Android's Multimedia Framework
Android's Multimedia FrameworkAndroid's Multimedia Framework
Android's Multimedia Framework
 
Eclipse plug in development
Eclipse plug in developmentEclipse plug in development
Eclipse plug in development
 
Android Internals
Android InternalsAndroid Internals
Android Internals
 
OpenGL ES EGL Spec&APIs
OpenGL ES EGL Spec&APIsOpenGL ES EGL Spec&APIs
OpenGL ES EGL Spec&APIs
 
Android IPC Mechanism
Android IPC MechanismAndroid IPC Mechanism
Android IPC Mechanism
 

Viewers also liked

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
 

Viewers also liked (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)
 

Similar to 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
 

Similar to 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
 

More from 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
 

More from 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
 

Recently uploaded

The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 

Recently uploaded (20)

The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 

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