OpenGL ES update Eisaku Ohbuchi Digital Media Professionals Inc.
What is OpenGL ES? OpenGL for mobile devices Gets rid of redundant / legacy features Extensions to make it mobile-friendly All the functionality of the desktop API Versions ES 1.0 / 1.1: fixed function ES 2.0: shader-based via GLSL ES A huge success! The dominant native 3D API for mobile devices Products from every major cell phone manufacturer Moving rapidly into other embedded markets >> 200M units shipped
What s New in 2009 OpenGL ES 2.0 platforms are shipping! Available in several popular handsets Coming soon to set-top boxes, navigation devices, etc. SDKs, books available
Working Group Activities Conformance Tests OpenGL ES 1.1 and 2.0 CTS upgrades released Now preparing the next update with some bug fixes. KTX file format Standard file format for ETC1 compressed textures Extended to handle all GL ES formats Pixel data payloads can be passed directly to GL Specification & sample loader code are coming very soon. New technology Extensions to ES 2.0 performance / functionality Extensions to expose next-generation hardware features
Improving GL / GL ES Interoperability The Dream GL Everywhere Seamless portability The Reality Relationship between GL and ES is a bit messy Porting code is more difficult than it needs to be Keeping the APIs in sync is becoming more difficult OpenGL OpenGL ES 1.x OpenGL ES 2.0
OpenGL Development Model The Model Extensions GL Specs ES Specs Cool New Tech ARB OpenGL ES WG The Emerging Reality Cool New Tech ARB OpenGL ES WG GL Specs ES Specs
The ARB / ES Convergence TSG Introducing the ARB / ES Convergence TSG Joint subcommittee of the ARB and the OpenGL ES WG Charter Encourage information sharing and communication Produce joint technology and specification roadmap Recommend ways to reduce existing differences over time Recommend ways to minimize or avoid divergence in future The Future Could OpenGL ES become a profile of OpenGL? Not a goal at present, but something to explore
The Serialization TSG Serialization is a TSG under OpenGL ES Just kicked off Use cases External displays, server and client come from different vendors Communicating across processes Better allocation of tasks with off-chip graphics HW Tools for development, debugging, profiling Networked gaming
Questions?
DMP solutions and SweetsUI engine Eisaku Ohbuchi Digital Media Professionals Inc.
Company overview Digital Media Professionals Inc.(DMP) www.dmprof.com Location: Tokyo, JAPAN. Incorporated: July/2002 Products: Graphics hardware IP cores Training services Software for our graphics hardware IPs
DMP graphics hardware IPs Advanced 3D graphics core (OpenGL ES 1.1 + DMP extension) PICA200 Programmable graphics IP core (OpenGLES1.1, 2.0, OpenVG1.1) SMAPH-S Tiny 3D graphics core (OpenGL ES1.1) PICA200 Lite PICA200 for FPGA Vector graphics IP core (OpenVG1.1) SMAPH-F
DMP Training services Location DMP Inc. Seminar Room (2 minutes walk from JR Mitaka station) Schedule OpenGL ES programming training I January 14-15 2010 OpenGL ES programming training II January 21-22 2010 GLSL Programming training course (getting started) February 18-19 2010 See details - www.dmprof.com or http://www.khronos.org/news/events/
OpenGL ES programming training I Curriculum Day 1 Introduction OpenGL ES Overview EGL Interface Drawing Primitives Setting Viewport Transformation Depth Buffer Drawing Scene Animation Day 2 Field of View Lighting(I) Blending Pixel Operation Texture Mapping(I) Fog Frame Buffer Operation Conclusions Goal To understand architecture of OpenGL ES and overview of some implementations. To be able to read programs using OpenGL ES 1.1. To be able to write 3D graphics applications for embedded systems with OpenGL ES 1.1. Capacity 12 people Tuition Fee 49,560 Yen (taxes included, for 1 person, 2 days) Khronos Member: 45,000 Yen (taxes included, for 1 person, 2 days) SIGGRAPH Asia 開催記念キャンペーン! 特別価格 37,800
OpenGL ES programming training II Curriculum Day 1 Introduction Lighting(II) Buffer Object Point Sprite Extension Matrix Palette Extension Texture Mapping(II) Compressed Texture Draw Texture Day 2 Dynamic Cube Mapping Planer Reflection Dot3 Bump Mapping Stencil Shadow Hint for Performance Evaluation Other Tips Overview of OpenGL ES 2.0 Conclusions Goal To be able to implement some visual effects using OpenGL ES 1.1 standard. To be able to give consideration to performance aspects of OpenGL ES 1.1 application. To understand basic concept of OpenGL ES 2.0 Capacity 12 people Tuition Fee 49,560 Yen (taxes included, for 1 person, 2 days) Khronos Member: 45,000 Yen (taxes included, for 1 person, 2 days) SIGGRAPH Asia 開催記念キャンペーン! 特別価格 37,800
GLSL Programming training course (getting started) Curriculum Day 1 Introduction Chapter I: Overview of OpenGL ES 2.0 OpenGL ES 2.0 Overview Programmable Shader Overview Chapter II: GLSL 1.1.0 Basics of the Shader API Mixed Mode Shading Language Grammar Day 2 Variables Functions Vertex Shader Fragment Shader Debugging and Tips for Development Chapter III: GLSL ES 1.00 OpenGL ES Shader Language Goal To understand architecture of OpenGL ES 2.0. To be able to read shader programs using GLSL 1.1. To be able to write simple shader programs using GLSL 1.1. Capacity 12 people Tuition Fee 99,750 Yen (taxes included, for 1 person, 2 days) Khronos Member: 94,500 Yen (taxes included, for 1 person, 2 days) SIGGRAPH Asia 開催記念キャンペーン! 特別価格 76,650
Software for our graphics HW core Sweets solution 3D graphics applications in embedded systems Expanding from 3D gaming to user interface applications DMP can provide a simple SW solution for demonstration and user interface development SweetsUI engine. (Small and Wonder graphics Engine for Embedded systems.) Customer application and tools SweetsUI Engine Graphics engine SDK OpenGLES1.1, 2.0 Driver Target HW OS Desktop emulator
SweetsUI 3D workflow overview 3D tools (Maya, Max, SoftimageXSI ) User definition Lua script App. DMP Engine Target HW or PC emulator Collada file Converter DMP Binary Sweets3D Sweets3D
SweetsUI 3D features Optimized 3D graphics engine for the embedded system. C-based light weight graphics engine OpenGL ES1.1 and DMP extension support Script based control with Lua file Run-time script execution support by DMP engine. Collada file import De-facto 3D authoring tool interchange format support Optimized binary format export for Engine Dynamic scene and animation control Scene graph and animation manipulation using Lua scripting and C programming.
Sweets 3D demo Simple UI application for photo exploration
Questions?
How to make an OpenVG application (not "Tiger") Eisaku Ohbuchi Digital Media Professionals Inc.
DMP graphics hardware IPs Advanced 3D graphics core (OpenGL ES 1.1 + DMP extension) PICA200 Programmable graphics IP core (OpenGLES1.1, 2.0, OpenVG1.1) SMAPH-S Tiny 3D graphics core (OpenGL ES1.1) PICA200 Lite PICA200 for FPGA Vector grapgics IP core (OpenVG1.1) SMAPH-F
What is Tiger Major vector graphics sample Khronos OpenVG reference implementation also includes this tiger sample. Major functions of Tiger sample. Path rendering Antialiasing No bitmaps No animations No masks
A not Tiger application - pdot_img Pseudo 3D vector graphics rendering Functions Path rendering Bitmap Masking Font rendering Rotating dots in 3D space Select and preview interactions You can try by downloading the source code from our web site: www.dmprof.com
Overall structure: main() Display initialization main(){ // Parameter and variavble initialization... // Init display if (!initdisplay(windowwidth, windowheight, egldisplay, eglsurface)) { cout << "Failed to initialize window" << endl; return 0; } Main loop // Init app initapp(); // Display loop while (!quit) { // Key event handling... // Repaint repaint(); } Key event Repaint
3D transformation OpenVG 1.1 supports transformation with 3x3 matrix. but it works in 2D space => No actual z value Here is pseudo 3D transformation for each dot. Rotation about x-, y-, and z-axis Perspective transformation void trans(int k) { float persx = dotdata[k][0]; float persy = dotdata[k][1]; float persz = 150; float xr,yr,zr; // rotation about x-axis: yr = persy * cos(rotx) - persz * sin(rotx); zr = persy * sin(rotx) + persz * cos(rotx); persy = yr; persz = zr; // rotation about y-axis: xr = persx * cos(roty) + persz * sin(roty); zr = persz * cos(roty) - persx * sin(roty); persx = xr; persz = zr; if (userz) { // rotation about z-axis: xr = persx * cos(rotz) - persy * sin(rotz); yr = persy * cos(rotz) + persx * sin(rotz); persx = xr; persy = yr; } float z = persz + distzo; float souzik = (distscreen)/(z); transdata[k][0] = persx * souzik; transdata[k][1] = persy * souzik; transdata[k][2] = souzik; }
Path rendering (drawing of stars) float stunit = strokewidth; // starsegs[0] = VG_MOVE_TO_ABS; starsegs[1] = VG_MOVE_TO_REL; for(int k=2; k<6; k++) starsegs[k] = VG_LINE_TO_REL; starsegs[6] = VG_CLOSE_PATH; // stardata[0] = orignx; stardata[1] = origny; stardata[2] = -(stunit / 2.0); stardata[3] = stunit / 6.0; stardata[4] = stunit; stardata[5] = 0.0; stardata[6] = -stunit; stardata[7] = -(2.0 * stunit) / 3.0; stardata[8] = stunit / 2.0; stardata[9] = stunit; stardata[10] = stunit / 2.0; stardata[11] = -stunit; Append path data // Append path data vgappendpathdata(mypath, 7, starsegs, stardata);
Path rendering (drawing of stars) 3. VG_LINE_TO_REL (stunit, 0.0) 2. VG_MOVE_TO_REL (-(stunit / 2.0), stunit / 6.0) (orgx, orgy) 4. VG_LINE_TO_REL (-stunit, 2.0*stUnit/3.0) 5. VG_LINE_TO_REL (stunit/2.0, stunit) 6. VG_LINE_TO_REL (stunit/2.0, -stunit) 7. VG_CLOSE_PATH 1. VG_MOVE_TO_ABS (orgx, orgy)
Path rendering (drawing of stars) Append path data Transform matrix Blending mode Paint pattern Draw path // Append path data vgappendpathdata(mypath, 7, starsegs, stardata); // Transform matrix generation vgseti(vg_matrix_mode, VG_MATRIX_FILL_PAINT_TO_USER); vgloadidentity(); vgtranslate(tmpdata[0]-(zsc*swo2), tmpdata[1]-(zsc*swo2)); vgscale(zsc*swod, zsc*swod); // Blend mode configuration vgseti(vg_blend_mode, spec? VG_BLEND_ADDITIVE : VG_BLEND_SRC_OVER); // Paint pattern set vgpaintpattern(imgpaint, img[imgindx]); // Draw path vgdrawpath(mypath, fshape? VG_FILL_PATH : VG_STROKE_PATH); vgclearpath(mypath, VG_PATH_CAPABILITY_ALL);
Draw image, blending and masking Set masking and blend mode Color transform Draw image int imgindx = (5 + voffs) % numimg; vgseti(vg_masking, VG_TRUE); vgseti(vg_blend_mode, VG_BLEND_SRC_OVER); float falpha = (float)fcount/(float)fstep; float ctval_w[8] = { 1.0,1.0,1.0,(1.0-fAlpha), 0.0,0.0,0.0,0.0}; vgsetfv(vg_color_transform_values, 8, ctval_w); vgdrawimage(img[(imgindx==0)? (numimg-1) : (imgindx-1)]); ctval_w[3] = falpha; vgsetfv(vg_color_transform_values, 8, ctval_w); vgdrawimage(img[imgindx]); if (++fcount==fstep) fading = false;
Color transformation
Benefit of vector graphics Scalable, high quality rendering with lightweight graphics core Font rendering 2D or 2.5D user interface Map rendering Native OpenVG application can be fast! Few overhead Seamless programming with native application. Let s develop graphics applications with OpenVG API!
Questions?