What was removed? (1) OpenGL ES vs. OpenGL

Similar documents
Dave Shreiner, ARM March 2009

OpenGL on Android. Lecture 7. Android and Low-level Optimizations Summer School. 27 July 2015

Mobile Graphics Ecosystem. Tom Olson OpenGL ES working group chair

Programming Guide. Aaftab Munshi Dan Ginsburg Dave Shreiner. TT r^addison-wesley

Mobile graphics API Overview

Introduction to Shaders.

Whiz-Bang Graphics and Media Performance for Java Platform, Micro Edition (JavaME)

Lecture 2. Shaders, GLSL and GPGPU

Cg 2.0. Mark Kilgard

X. GPU Programming. Jacobs University Visualization and Computer Graphics Lab : Advanced Graphics - Chapter X 1

Tutorial on GPU Programming #2. Joong-Youn Lee Supercomputing Center, KISTI

Developing Mobile 3D Applications with OpenGL ES and M3G

Shader Programs. Lecture 30 Subsections 2.8.2, Robb T. Koether. Hampden-Sydney College. Wed, Nov 16, 2011

Developing Mobile 3D Applications with OpenGL ES and M3G

GPGPU on Mobile Devices

Graphics Processing Unit Architecture (GPU Arch)

GLSL Introduction. Fu-Chung Huang. Thanks for materials from many other people

Real-Time Rendering (Echtzeitgraphik) Michael Wimmer

Graphics Pipeline & APIs

GLSL Introduction. Fu-Chung Huang. Thanks for materials from many other people

OpenGL SUPERBIBLE. Fifth Edition. Comprehensive Tutorial and Reference. Richard S. Wright, Jr. Nicholas Haemel Graham Sellers Benjamin Lipchak

COMP371 COMPUTER GRAPHICS

Copyright Khronos Group, Page Graphic Remedy. All Rights Reserved

Real - Time Rendering. Graphics pipeline. Michal Červeňanský Juraj Starinský

20 Years of OpenGL. Kurt Akeley. Copyright Khronos Group, Page 1

Normalized Device Coordinate System (NDC) World Coordinate System. Example Coordinate Systems. Device Coordinate System

World Coordinate System

Graphics Pipeline & APIs

Optimizing Games for ATI s IMAGEON Aaftab Munshi. 3D Architect ATI Research

Rendering Objects. Need to transform all geometry then

Shaders. Slide credit to Prof. Zwicker

Mention driver developers in the room. Because of time this will be fairly high level, feel free to come talk to us afterwards

OpenGL Status - November 2013 G-Truc Creation

WebGL (Web Graphics Library) is the new standard for 3D graphics on the Web, designed for rendering 2D graphics and interactive 3D graphics.

Free Downloads OpenGL ES 3.0 Programming Guide

OpenGL ES 2.0 : Start Developing Now. Dan Ginsburg Advanced Micro Devices, Inc.

E.Order of Operations

OpenGL ES. Kristof Beets 3 rd Party Relations Manager Imagination Technologies

Graphics Programming

Coming to a Pixel Near You: Mobile 3D Graphics on the GoForce WMP. Chris Wynn NVIDIA Corporation

POWERVR MBX & SGX OpenVG Support and Resources

The Graphics Pipeline

Module 13C: Using The 3D Graphics APIs OpenGL ES

Understanding M3G 2.0 and its Effect on Producing Exceptional 3D Java-Based Graphics. Sean Ellis Consultant Graphics Engineer ARM, Maidenhead

CS770/870 Fall 2015 Advanced GLSL

The Application Stage. The Game Loop, Resource Management and Renderer Design

Graphics Hardware, Graphics APIs, and Computation on GPUs. Mark Segal

Programming shaders & GPUs Christian Miller CS Fall 2011

API Background. Prof. George Wolberg Dept. of Computer Science City College of New York

Today s Agenda. Basic design of a graphics system. Introduction to OpenGL

RSX Best Practices. Mark Cerny, Cerny Games David Simpson, Naughty Dog Jon Olick, Naughty Dog

CS450/550. Pipeline Architecture. Adapted From: Angel and Shreiner: Interactive Computer Graphics6E Addison-Wesley 2012

Introduction to the OpenGL Shading Language

Hardware Accelerated Graphics for High Performance JavaFX Mobile Applications

CS 428: Fall Introduction to. OpenGL primer. Andrew Nealen, Rutgers, /13/2010 1

OpenGL BOF Siggraph 2011

Grafica Computazionale: Lezione 30. Grafica Computazionale. Hiding complexity... ;) Introduction to OpenGL. lezione30 Introduction to OpenGL

OpenGL: Open Graphics Library. Introduction to OpenGL Part II. How do I render a geometric primitive? What is OpenGL

OpenGL ES 3.0 Emulator

Supplement to Lecture 22

General Purpose computation on GPUs. Liangjun Zhang 2/23/2005

Programmable Graphics Hardware

To Do. Computer Graphics (Fall 2008) Course Outline. Course Outline. Methodology for Lecture. Demo: Surreal (HW 3)

SHADER PROGRAMMING. Based on Jian Huang s lecture on Shader Programming

Graphics Hardware. Instructor Stephen J. Guy

12.2 Programmable Graphics Hardware

Today. Rendering - III. Outline. Texturing: The 10,000m View. Texture Coordinates. Specifying Texture Coordinates in GL

Spring 2009 Prof. Hyesoon Kim

Graphics Performance Optimisation. John Spitzer Director of European Developer Technology

OUTLINE. Learn the basic design of a graphics system Introduce pipeline architecture Examine software components for a graphics system

Copyright Khronos Group 2012 Page 1. Teaching GL. Dave Shreiner Director, Graphics and GPU Computing, ARM 1 December 2012

Working with Metal Overview

Next Generation OpenGL Neil Trevett Khronos President NVIDIA VP Mobile Copyright Khronos Group Page 1

OPENGL RENDERING PIPELINE

Rationale for Non-Programmable Additions to OpenGL 2.0

Spring 2011 Prof. Hyesoon Kim

GoForce 3D: Coming to a Pixel Near You

Introduction to OpenGL ES 3.0

OpenGL 3 Overview. Barthold Lichtenbelt, NVIDIA OpenGL ARB Chair. Copyright Khronos Group, Page 1

2.11 Particle Systems

C P S C 314 S H A D E R S, O P E N G L, & J S RENDERING PIPELINE. Mikhail Bessmeltsev

CS452/552; EE465/505. Image Processing Frame Buffer Objects

ARM. Mali GPU. OpenGL ES Application Optimization Guide. Version: 2.0. Copyright 2011, 2013 ARM. All rights reserved. ARM DUI 0555B (ID051413)

GPU Memory Model. Adapted from:

Coding OpenGL ES 3.0 for Better Graphics Quality

CS475/CS675 - Computer Graphics. OpenGL Drawing

Programmable Graphics Hardware

ARM. Mali GPU. OpenGL ES Application Optimization Guide. Version: 3.0. Copyright 2011, 2013 ARM. All rights reserved. ARM DUI 0555C (ID102813)

Graphics Hardware. Graphics Processing Unit (GPU) is a Subsidiary hardware. With massively multi-threaded many-core. Dedicated to 2D and 3D graphics

LECTURE 02 OPENGL API

CS130 : Computer Graphics. Tamar Shinar Computer Science & Engineering UC Riverside

WebGL and GLSL Basics. CS559 Fall 2015 Lecture 10 October 6, 2015

Graphics Architectures and OpenCL. Michael Doggett Department of Computer Science Lund university

Programmable GPUs. Real Time Graphics 11/13/2013. Nalu 2004 (NVIDIA Corporation) GeForce 6. Virtua Fighter 1995 (SEGA Corporation) NV1

Tips for game development: Graphics, Audio, Sensor bada Developer Day in Seoul Dec 08, 2010

Shader Programming. Daniel Wesslén, Stefan Seipel, Examples

December Copyright Khronos Group, Page 1

GPU Memory Model Overview

OpenGL. White Square Code 11/4/09. OpenGL. OpenGL. OpenGL

Rasterization Overview

Transcription:

SLIDE 2 Outline What is? vs. OpenGL Profiles and versions EGL Surfaces on Windows CE and Symbian Implementations SLIDE 3 SLIDE 4 What is? Small-footprint subset of OpenGL OpenGL is too large for embedded devices! Created with the blessing and cooperation of the OpenGL ARB July 31 st 2006 ARB handed control of OpenGL over to Khronos Powerful, low-level API with full functionality for 3D games Can do almost everything OpenGL can Available on all key platforms Software and hardware implementations available Fully extensible Enables vendor differentiation and exploration of new functionality Extensions like in OpenGL No redundancy! Convenience functions removed on mobile devices Java Applications C++ Applications Scenegraph API Game Middleware M3G (JSR 184) Engine Engines

SLIDE 5 SLIDE 6 vs. OpenGL OpenGL glbegin/glend 1 Pi Primitive ii Types all no quads & polygons Data Types float, double, int, etc float, fixed gldraw/read Pixels glreadpixels only Textures 1D, 2D, 3D, cube 2D Stencil optional Window Bindings WGL, GLX, etc EGL What was removed? (1) glbegin/glend use vertex array or vertex objects Data types No double precision floating point Use float, fixed, int, short or byte No 32-bit indices Use 16-bit or 8-bit indices Convenience functions GLU, evaluators, picking, feedback, display lists Reduced state queries Render targets No quad dbuffer, No indexed dmode No frame buffer writing (gldrawpixels, glbitmap) 1 : Except for Security Critical profile SLIDE 7 SLIDE 8 What was removed? (2) Complex, rarely used features Polygon stippling Double sided d materials 1D, 3D, cube map textures Non-low level primitives Quads, quad-strips, polygons Versions and Profiles Two major tracks Not compatible parallel rather than competitive 1.x Fixed function pipeline Suitable for software implementations (<100 KB) All 1.x backwards compatible 3 different profiles 2.x Vertex and pixel shader using GLSL ES All 2.x backwards compatible

SLIDE 9 SLIDE 10 1.x 2.x 1.0 specification released in 2003 Aimed at software implementations Used for Playstation 3 (with many extensions though) 1.1 specification released in 2004 Buffer objects Vertex skinning 1.2+ only if market requires it Profiles Common Lite (CL): fixed-point only Common (CM): fixed-point & floating point Safety Critical (SC): glbegin/glend, display lists, no texture matrix, no compressed textures Draft released in 2005 Derived from OpenGL 2.0 pipeline p No fixed function Not compatible to 1.x! Only a single profile Floating point or integer no fixed point anymore Shading language GLSL ES Two models: Online compiling (like PC): OES_shader_source Offline compiling: OES_shader_binary More burden on the application programmer SLIDE 11 SLIDE 12 Fixed Function vs. Programable Vertex Shader Transform Primitive Vertex Primitive and API Processing Shader Assembly Lighting Uniforms Textures Varying 0 Attribute 0 Varying 1 Attribute 1 Varying 2 Fog Color Sum Texture Fragment Shader Environment Rasterizer Attribute 2 Attribute 3 Vertex Shader Varying 3 Varying Attribute gl_position gl_pointsize Alpha, Depth & Stencil Tests Blending Dither Framebuffer Temporary Variables

SLIDE 13 SLIDE 14 Fragment Shader Vertex Arrays vs. Vertex Buffer Objects Vertex Arrays The way to go in 1.0 Vertex data stored in client memory Vertex Buffer Objects Added with 1.1 (as did OpenGL 1.5) Data stored in server (GPU-side) memory Faster for static geometry Vertex color, normals, tex-coords and indices Can not be read back SLIDE 15 SLIDE 16 Surface Types Selected during initialization via EGL Window surface On-screen, double buffered Fully managed (owned) by the GPU Usually not video memory access (2D blitting requires using texturing) PBuffer surface OS independent, single buffered Fully managed (owned) by the GPU PixMap surface OS dependent, single buffered Fully owned by the OS, slow, allows memory access CFbsBitmap in Symbian HBITMAP in Windows Initialization with EGL (1) NativeWindowType m_window; // = &Window() under Symbian // = CreateWindow() under WinCE EGLDisplay m_display; EGLConfig m_config; EGLContext m_context; EGLSurface m_surface; static const EGLint attrib_ list[] = EGL_RED_SIZE, 8, // 8 bit red channel EGL_GREEN_SIZE, 8, // 8 bit green channel EGL_BLUE_SIZE, 8, // 8 bit blue channel EGL_ALPHA_SIZE, EGL_DONT_CARE, // any alpha size EGL_DEPTH_SIZE, 32, // 32 bit z-buffer EGL_STENCIL_SIZE, EGL_DONT_CARE, // any stencil EGL_NONE // terminate t list

SLIDE 17 SLIDE 18 Initialization with EGL (2) Rendering with 1.x (1) void init() EGLint numconfigs, majorversion, minorversion; m_display = eglgetdisplay(egl_default_display); eglinitialize(m_display, &majorversion, &minorversion); eglgetconfigs(m_display, NULL, 0, &numconfigs); eglchooseconfig(m_display, attrib_list, &m_config, 1, &numconfigs); m_context = eglcreatecontext(m_display, m_config, NULL, NULL); m_surface = eglcreatewindowsurface(m_display,m_config,m_window,null); eglmakecurrent(m_display, m_surface, m_surface, m_context); void deinit() eglmakecurrent(m_display, NULL, NULL, NULL); egldestroycontext(m_display, m_context); egldestroysurface(m_display, m_surface); eglterminate(m_display); const GLbyte vertices[] = -10, 10, 10, 10, -10, 10, 10, 10, 10, -10, -10, 10, -10, 10, -10, 10, -10, -10, 10, 10, -10, -10, -10, -10 const GLubyte indices[] = 0, 3, 1, 2, 0, 1, 6, 5, 4, 5, 7, 4, 4, 7, 3, 0, 4, 3, 2, 1, 5, 6, 2, 5, 4, 0, 2, 6, 4, 2, 3, 7, 1, 7, 5, 1 const GLbyte normals[] = -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1, 1, 1, -1, -1, -1, -1 taken from Rasteroid sample code SLIDE 19 SLIDE 20 Rendering with 1.x (2) void render() glclearcolor(0.1f, 0.2f, 0.4f, 0.f); glclear(gl_color_buffer_bit); glenableclientstate(gl_vertex_array); glvertexpointer(3, GL_BYTE, 0, vertices); glenableclientstate(gl_normal_array); glnormalpointer(gl_byte, 0, normals); glmatrixmode(gl_modelview); glloadidentity(); gltranslatef(0.f, 0.f, -50.f); glrotatef(45.0f, 1.0f, 0.0f, 0f -1.0f); gldrawelements(gl_triangles, 36, GL_UNSIGNED_BYTE, indices); eglswapbuffers(m_display, m_surface); taken from Rasteroid sample code Rendering with fixed point Fixed point counterparts for every floating point function gllightf() gllightx() glmaterialfv() glmaterialxv() glclearcolor() glclearcolorx() #define INT2FIXED(x) ((x)<<16) #define FLOAT2FIXED(x) ((int)((f)*65536.0f)) #define EGL_ONE (1<<16) void render() glclearcolorx(1<<16, 0, 0, 0); glclear(gl_color_buffer_bit); gltranslatex(0 0 INT2FIXED(100)); gltranslatex(0, 0, -INT2FIXED(100)); glrotatex(float2fixed(12.3f), 0, 0, -EGL_ONE);

SLIDE 21 SLIDE 22 Software Implementations All implementations only cover version 1.x! NokiaGL Just for Nokia devices Rasteroid from Hybrid Free for non-commercial use http://www.hybrid.fi Vincent Open source implementation http://sourceforge.net/projects/ogl-es Reference implementation Wraps OpenGL Only for PC development Hardware Implementations Intel 2700G Addon processor for XScale, based on PowerVR MBX Used in Dell Axim X50v, Samsung M7000 SH-Mobile3 Based on PowerVR MBX Used in Fujsitsu F902i, Mitsubishi D902i TI OMAP2420 ARM CPU with 3D rendering extension Based on PowerVR MBX Used in Nokia N93 & N95, Sharp SH902, Sony Ericsson SO902i, NEC 902i, Panasonic P902i Philips Nexperia PNX4008 Used in Sony Ericsson W950, M600 & P990 ATI Imageon Series NVIDIA Goforce Series Used in Gizmondo, O2 XDA Flame