GATAV 9. Goodby flatland Welcome to 3D!
|
|
- Britney Newman
- 6 years ago
- Views:
Transcription
1 GATAV 9. Goodby flatland Welcome to 3D!
2 TOC 1. OpenGL ES the 3D-API 2. The buffer concept - a technical necessity 3. Introducing GLSurfaceView the 3D-View 4. GLSurfaceView.Renderer the interface to 3D-content 5. Hello World 3D 6. Add Motion and Interaction 7. Add freaky Viewing 8. Highly-skilled construction worker 9. Distinguished architect Graphical Apps - The Android View: Prof. Dr. Bender, Prof. Dr. Tronnier 2
3 OpenGL ES the 3D-API for embedded accelerated 3D graphics low-level 3D-API to process graphics on a dedicated GPU consists of well-defined subsets of desktop OpenGL main differences to OpenGL: no glbegin/glend; everything (coordinates, colors, textures,...) is handled by arrays no quad or polygon primitives; nothing but triangles, triangle strips, triangle fans absence of higher primitives (cube, sphere, cylinder,...); neither GLU nor GLUT assistance a lot of must be... Graphical Apps - The Android View: Prof. Dr. Bender, Prof. Dr. Tronnier 3
4 OpenGL ES - Versions OpenGL ES 1.X for fixed function hardware OpenGL 1.5 specifications OpenGL ES 2.X: for programmable hardware OpenGL 2.0 specifications ability to create vertex and fragment shaders no glpushmatrix/glpopmatrix,... you have to write everything yourself! warning: not compatible with Open GL ES 1.X! precise specifications: Graphical Apps - The Android View: Prof. Dr. Bender, Prof. Dr. Tronnier 4
5 OpenGL ES Connection to Java EGL is an interface between Khronos rendering APIs (such as OpenGL ES) and the underlying native platform windowing system import javax.microedition.khronos.egl.eglconfig; OpenGL ES is implemented in C! access to C-library functions via wrapper class GL10 import javax.microedition.khronos.opengles.gl10; an implementation of the GL interface big problem: C extensivly uses pointers to arrays, Java doesn t have such evil properties solution: use new objects named buffers Graphical Apps - The Android View: Prof. Dr. Bender, Prof. Dr. Tronnier 5
6 The buffer concept - a technical necessity A ByteBuffer is a fixed-capacity buffer that holds byte values ByteBuffers are used to create and transport arrays of values of various datatypes to OpenGL ES ByteBuffers must be placed on a particular part of the heap to hide from the garbage collector FloatBuffer, ShortBuffer, IntBuffer,... are used to wrap and fill the underlying ByteBuffer Graphical Apps - The Android View: Prof. Dr. Bender, Prof. Dr. Tronnier 6
7 The buffer concept Example FloatBuffer vertexbuffer; v0 y v1 float geometry[] = { x -0.5f, 0.5f, 0.5f, // v0-0.5f, -0.5f, 0.5f, // v2 z 0.5f, 0.5f, 0.5f }; // v1 v2 // Buffers with multi-byte datatypes (e.g., short, int, float) // must have their byte order (big oder little endian) // set to native order v3 ByteBuffer vertexbb = ByteBuffer.allocateDirect(geometry.length*4); vertexbb.order(byteorder.nativeorder()); vertexbuffer = vertexbb.asfloatbuffer(); // creation from the ByteBuffer vertexbuffer.put(geometry); // fill it vertexbuffer.position(0); // rewind it Graphical Apps - The Android View: Prof. Dr. Bender, Prof. Dr. Tronnier 7
8 Introducing GLSurfaceView the 3D-View an API class that: manages an EGL display enabling OpenGL ES to render into a surface provides the glue code to connect OpenGL ES to the View system provides the glue code to make OpenGL ES work with the Activity life-cycle Graphical Apps - The Android View: Prof. Dr. Bender, Prof. Dr. Tronnier 8
9 Introducing GLSurfaceView creates and manages a separate dedicated rendering thread to enable smooth animation supports both on-demand and continuous rendering mode accepts and holds a user-provided Renderer object that does the actual rendering is usually subclassed to handle touch events by overriding the appropriate methods be carefull: you may need to communicate with the Renderer object running in the rendering thread! standard Java cross-thread communication call queueevent(runnable) Graphical Apps - The Android View: Prof. Dr. Bender, Prof. Dr. Tronnier 9
10 GLSurfaceView.Renderer the interface to 3D-content Create your own Renderer class implementing this interfaces methods: public void onsurfacecreated(gl10 gl, EGLConfig config) called whenever the drawing context has to be (re)created public void onsurfacechanged(gl10 gl, int width, int height) called when the surface changes size public void ondrawframe(gl10 gl) called every frame responsible for drawing the whole scene Graphical Apps - The Android View: Prof. Dr. Bender, Prof. Dr. Tronnier 10
11 Hello World 3D Example public class GLES01 extends Activity { private GLSurfaceView protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); touchableglsurfaceview = new TouchableGLSurfaceView(this); setcontentview(touchableglsurfaceview); protected void onresume() { super.onresume(); touchableglsurfaceview.onresume(); protected void onpause() { super.onpause(); touchableglsurfaceview.onpause(); } } Graphical Apps - The Android View: Prof. Dr. Bender, Prof. Dr. Tronnier 11
12 Hello World 3D Example class TouchableGLSurfaceView extends GLSurfaceView { private OurRenderer ourrenderer; public TouchableGLSurfaceView(Context context) { super(context); ourrenderer = new OurRenderer(); setrenderer(ourrenderer); } // the implementation of the renderer interface private class OurRenderer implements GLSurfaceView.Renderer { private FloatBuffer vertexbuffer; public OurRenderer() { float geometry[] = { -0.5f, 0.5f, 0.5f, -0.5f, -0.5f, 0.5f, 0.5f, 0.5f, 0.5f }; ByteBuffer vertexbb = ByteBuffer.allocateDirect(geometry.length*4); vertexbb.order(byteorder.nativeorder()); vertexbuffer = vertexbb.asfloatbuffer(); vertexbuffer.put(geometry); vertexbuffer.position(0); } Graphical Apps - The Android View: Prof. Dr. Bender, Prof. Dr. Tronnier 12 v0 v2 y v3 v1 x z
13 Hello World 3D Example // the implementation of the renderer interface (cont.) // creation of viewport // initialization of some opengl features public void onsurfacecreated(gl10 gl, EGLConfig config) { gl.gldisable(gl10.gl_dither); gl.glhint(gl10.gl_perspective_correction_hint, GL10.GL_FASTEST); } gl.glclearcolor(0, 0, 0, 1); gl.glenable(gl10.gl_cull_face); //gl.glshademodel(gl10.gl_flat); gl.glshademodel(gl10.gl_smooth); gl.glenable(gl10.gl_depth_test); Graphical Apps - The Android View: Prof. Dr. Bender, Prof. Dr. Tronnier 13
14 Hello World 3D Example // the implementation of the renderer interface (cont.) // resize of viewport // set projection matrix public void onsurfacechanged(gl10 gl, int width, int height) { gl.glviewport(0, 0, width, height); } float aspectratio = (float) width / height; gl.glmatrixmode(gl10.gl_projection); gl.glloadidentity(); GLU.gluPerspective(gl, 45.0f, aspectratio, 1.0f, f); GLU.gluLookAt(gl,0.0f,0.0f,5.0f,0.0f,0.0f,0.0f,0.0f,1.0f,0.0f); gl.glmatrixmode(gl10.gl_modelview); Graphical Apps - The Android View: Prof. Dr. Bender, Prof. Dr. Tronnier 14
15 Hello World 3D Example // the implementation of the renderer interface (cont.) public void ondrawframe(gl10 gl) { // the first thing to do: clear screen and depth buffer gl.glclear(gl10.gl_color_buffer_bit GL10.GL_DEPTH_BUFFER_BIT); // reset modelview matrix gl.glmatrixmode(gl10.gl_modelview); gl.glloadidentity(); } }} gl.glcolor4f(1.0f, 0.0f, 0.0f, 0.0f); gl.glenableclientstate(gl10.gl_vertex_array); gl.glvertexpointer(3, GL10.GL_FLOAT, 0, vertexbuffer); gl.gldrawarrays(gl10.gl_triangles, 0, 3); gl.gldisableclientstate(gl10.gl_vertex_array); Graphical Apps - The Android View: Prof. Dr. Bender, Prof. Dr. Tronnier 15
16 Hello World 3D the result amazing? Graphical Apps - The Android View: Prof. Dr. Bender, Prof. Dr. Tronnier 16
17 Add Motion and Interaction Motion private long milsecperrotation=5*1000; private double angle=0.0f; private long lasttime;... // create an automatic rotation long time = System.currentTimeMillis(); long deltatime = time - lasttime; lasttime = time; angle = (float) (angle / milsecperrotation * deltatime); gl.glrotatef((float) angle, 0.0f, 1.0f, 0.0f); gl.glcolor4f(1.0f, 0.0f, 0.0f, 0.0f);... Graphical Apps - The Android View: Prof. Dr. Bender, Prof. Dr. Tronnier 17
18 Add Motion and Interaction Interaction Random ran = new public boolean ontouchevent(motionevent event) { switch (event.getaction() & MotionEvent.ACTION_MASK) { case MotionEvent.ACTION_DOWN: ourrenderer.r=ran.nextfloat(); ourrenderer.g=ran.nextfloat(); ourrenderer.b=ran.nextfloat(); break; } return true; }... Graphical Apps - The Android View: Prof. Dr. Bender, Prof. Dr. Tronnier 18
19 Add freaky Viewing adults only Introduce: virtual trackball viewing concept (pretty cool but freaking massive mathematics quaternions ) in combination with sophisticated touch handling and options menu to drastically uprade your viewing experience (roll, zoom, pan)! Graphical Apps - The Android View: Prof. Dr. Bender, Prof. Dr. Tronnier 19
20 Highly-skilled construction worker building higher primitives gldrawarrays (int mode, int first, int count) reads vertex data from the enabled arrays by marching straight through the array without skipping or hopping because gldrawarrays() does not allows hopping around the arrays, you still have to repeat the shared information once per face gldrawelements (int mode, int count, int type, Buffer indices) draws a sequence of primitives by hopping around arrays with the associated array indices reduces both the number of function calls and the number of information to transfer makes reuse of information by OpenGL caching possible Graphical Apps - The Android View: Prof. Dr. Bender, Prof. Dr. Tronnier 20
21 Highly-skilled construction worker - front FloatBuffer frontvertexbuffer; v4 v5 // front side, two triangles, without // individual color // drawarrays v0 y v1 float geometryfront[] = { -0.5f, 0.5f, 0.5f, // v0 v6 x -0.5f, -0.5f, 0.5f, // v2 0.5f, 0.5f, 0.5f, // v1 z v7 0.5f, 0.5f, 0.5f, // v1-0.5f, -0.5f, 0.5f, // v2 v2 0.5f, -0.5f, 0.5f };// v3 v3 ByteBuffer frontvertexbb = ByteBuffer.allocateDirect(geometryFront.length*4); frontvertexbb.order(byteorder.nativeorder()); frontvertexbuffer = frontvertexbb.asfloatbuffer(); frontvertexbuffer.put(geometryfront); frontvertexbuffer.position(0); Graphical Apps - The Android View: Prof. Dr. Bender, Prof. Dr. Tronnier 21
22 Highly-skilled construction worker - front v4 v5 v0 y v1 v6 x z v7 v2 // draw front side gl.glcolor4f(1.0f, 0.0f, 0.0f, 0.0f); gl.glenableclientstate(gl10.gl_vertex_array); gl.glvertexpointer(3, GL10.GL_FLOAT, 0, frontvertexbuffer); gl.gldrawarrays(gl10.gl_triangles, 0, 6); gl.gldisableclientstate(gl10.gl_vertex_array); v3 Graphical Apps - The Android View: Prof. Dr. Bender, Prof. Dr. Tronnier 22
23 Highly-skilled construction worker - right FloatBuffer rightvertexbuffer; v4 v5 // right side, two triangles, with // individual vertex color // drawarrays v0 y v1 float geometryright[] = { 0.5f, 0.5f, 0.5f, // v1 v6 x 0.5f, -0.5f, 0.5f, 0.5f, 0.5f, -0.5f, // v3 // v5 z v7 0.5f, -0.5f, 0.5f, // v3 0.5f, -0.5f, -0.5f, // v7 v2 0.5f, 0.5f, -0.5f }; // v5 v3 ByteBuffer rightvertexbb = ByteBuffer.allocateDirect(geometryRight.length*4); rightvertexbb.order(byteorder.nativeorder()); rightvertexbuffer = rightvertexbb.asfloatbuffer(); rightvertexbuffer.put(geometryright); rightvertexbuffer.position(0); Graphical Apps - The Android View: Prof. Dr. Bender, Prof. Dr. Tronnier 23
24 Highly-skilled construction worker - right FloatBuffer rightcolorbuffer; v4 v5 float colorright[] = { 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, // v1 // v3 v0 y v1 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, // v5 // v3 v6 x 1.0f, 1.0f, 1.0f, 0.0f, // v7 0.0f, 0.0f, 1.0f, 0.0f }; // v5 z v7 v2 ByteBuffer rightcolorbb = ByteBuffer.allocateDirect(colorRight.length * 4); rightcolorbb.order(byteorder.nativeorder()); rightcolorbuffer = rightcolorbb.asfloatbuffer(); rightcolorbuffer.put(colorright); rightcolorbuffer.position(0); v3 Graphical Apps - The Android View: Prof. Dr. Bender, Prof. Dr. Tronnier 24
25 Highly-skilled construction worker - right v4 v5 v0 y v1 v6 x z v7 // draw right side gl.glenableclientstate(gl10.gl_vertex_array); gl.glenableclientstate(gl10.gl_color_array); gl.glvertexpointer(3, GL10.GL_FLOAT, 0, rightvertexbuffer); gl.glcolorpointer(4, GL10.GL_FLOAT, 0, rightcolorbuffer); gl.gldrawarrays(gl10.gl_triangles, 0, 6); gl.gldisableclientstate(gl10.gl_color_array); gl.gldisableclientstate(gl10.gl_vertex_array); v2 v3 Graphical Apps - The Android View: Prof. Dr. Bender, Prof. Dr. Tronnier 25
26 Highly-skilled construction worker - top // top side, two triangles, with individual // vertex color v4 v5 // drawelements using topology float geometrytop[] = { -0.5f, 0.5f, -0.5f, // v4 v0 y v1 0.5f, 0.5f, -0.5f, // v5-0.5f, 0.5f, 0.5f, // v0 v6 x 0.5f, 0.5f, 0.5f }; // v1 z v7 float colortop[] = { 0.0f, 0.0f, 1.0f, 0.0f, // v4 1.0f, 1.0f, 1.0f, 0.0f, // v5 1.0f, 0.0f, 0.0f, 0.0f, // v0 0.0f, 1.0f, 0.0f, 0.0f};// v1 v2 v3 short topologytop[] = { 2, 3, 0, // v0, v1, v4 3, 1, 0};// v1, v5, v4 Graphical Apps - The Android View: Prof. Dr. Bender, Prof. Dr. Tronnier 26
27 Highly-skilled construction worker - top ByteBuffer topvertexbb = ByteBuffer.allocateDirect(geometryTop.length*4); topvertexbb.order(byteorder.nativeorder()); topvertexbuffer = topvertexbb.asfloatbuffer(); topvertexbuffer.put(geometrytop); topvertexbuffer.position(0); ByteBuffer topcolorbb = ByteBuffer.allocateDirect(colorTop.length * 4); topcolorbb.order(byteorder.nativeorder()); topcolorbuffer = topcolorbb.asfloatbuffer(); topcolorbuffer.put(colortop); topcolorbuffer.position(0); ByteBuffer toptopologybb = ByteBuffer.allocateDirect(topologyTop.length*2); toptopologybb.order(byteorder.nativeorder()); toptopologybuffer = toptopologybb.asshortbuffer(); toptopologybuffer.put(topologytop); toptopologybuffer.position(0); Graphical Apps - The Android View: Prof. Dr. Bender, Prof. Dr. Tronnier 27 v0 v2 v4 v6 z y v1 v3 x v5 v7
28 Highly-skilled construction worker - top v4 v5 v0 y v1 v6 x z v7 // draw top side gl.glenableclientstate(gl10.gl_vertex_array); gl.glenableclientstate(gl10.gl_color_array); gl.glvertexpointer(3, GL10.GL_FLOAT, 0, topvertexbuffer); gl.glcolorpointer(4, GL10.GL_FLOAT, 0, topcolorbuffer); gl.gldrawelements(gl10.gl_triangles, toptopologybuffer.limit(), GL10.GL_UNSIGNED_SHORT, toptopologybuffer); gl.gldisableclientstate(gl10.gl_color_array); gl.gldisableclientstate(gl10.gl_vertex_array); Graphical Apps - The Android View: Prof. Dr. Bender, Prof. Dr. Tronnier 28 v2 v3
29 Highly-skilled construction worker - result v4 v5 v0 y v1 v6 x z v7 v2 v3 Graphical Apps - The Android View: Prof. Dr. Bender, Prof. Dr. Tronnier 29
30 Distinguished architect modular design principle Use higher primitives and matrix arithmetic for modelling! Cube(float size) Cylinder(float baseradius, float topradius, float height, int stacks, int slices, boolean basecap, boolean topcap) Disk(float innerradius, float outerradius, int stacks) Sphere(float newradius, int slices, int stacks) Graphical Apps - The Android View: Prof. Dr. Bender, Prof. Dr. Tronnier 30
31 Distinguished architect - ingredients Graphical Apps - The Android View: Prof. Dr. Bender, Prof. Dr. Tronnier 31
32 Lesson learned: The fun isn t over yet! The suprises of the ANDROID API get even bigger with 3D! THANK YOU FOR YOUR ATTENTION! Graphical Apps - The Android View: Prof. Dr. Bender, Prof. Dr. Tronnier 32
Android and OpenGL. Android Smartphone Programming. Matthias Keil. University of Freiburg
Android and OpenGL Android Smartphone Programming Matthias Keil Institute for Computer Science Faculty of Engineering 1. Februar 2016 Outline 1 OpenGL Introduction 2 Displaying Graphics 3 Interaction 4
More informationMobile Application Programing: Android. OpenGL Operation
Mobile Application Programing: Android OpenGL Operation Activities Apps are composed of activities Activities are self-contained tasks made up of one screen-full of information Activities start one another
More informationMobile Application Programing: Android. OpenGL Operation
Mobile Application Programing: Android OpenGL Operation Activities Apps are composed of activities Activities are self-contained tasks made up of one screen-full of information Activities start one another
More informationCOMP3421 Computer Graphics
COMP3421 Computer Graphics Introduction Angela Finlayson Email: angf@cse.unsw.edu.au Computer Graphics Algorithms to automatically render images from models. Light Camera hi mum Objects model image Computer
More informationOpenGL on Android. Lecture 7. Android and Low-level Optimizations Summer School. 27 July 2015
OpenGL on Android Lecture 7 Android and Low-level Optimizations Summer School 27 July 2015 This work is licensed under the Creative Commons Attribution 4.0 International License. To view a copy of this
More informationUnderstanding M3G 2.0 and its Effect on Producing Exceptional 3D Java-Based Graphics. Sean Ellis Consultant Graphics Engineer ARM, Maidenhead
Understanding M3G 2.0 and its Effect on Producing Exceptional 3D Java-Based Graphics Sean Ellis Consultant Graphics Engineer ARM, Maidenhead Introduction M3G 1.x Recap ARM M3G Integration M3G 2.0 Update
More informationMobile Application Programming: Android. OpenGL Operation
Mobile Application Programming: Android OpenGL Operation OpenGL ES C-Based Performance-Oriented Graphics Library Wrapper libraries provided for Java, C#, etc. Produces 2D images from 2D or 3D geometric
More informationModule 13C: Using The 3D Graphics APIs OpenGL ES
Module 13C: Using The 3D Graphics APIs OpenGL ES BREW TM Developer Training Module Objectives See the steps involved in 3D rendering View the 3D graphics capabilities 2 1 3D Overview The 3D graphics library
More informationWebGL (Web Graphics Library) is the new standard for 3D graphics on the Web, designed for rendering 2D graphics and interactive 3D graphics.
About the Tutorial WebGL (Web Graphics Library) is the new standard for 3D graphics on the Web, designed for rendering 2D graphics and interactive 3D graphics. This tutorial starts with a basic introduction
More informationNew topic for Java course: Introduction to 3D graphics programming
New topic for Java course: Introduction to 3D graphics programming with JOGL Dejan Mitrović Prof. Dr Mirjana Ivanović AGENDA 1. Motivation and goals 2. JOGL 3. Proposed subjects 4. Conclusions 2/29 1 1.1.
More informationIntroduction to OpenGL. CS 4620 Balazs Kovacs, 2014 Daniel Schroeder, 2013 Pramook Khungurn, 2012
Introduction to OpenGL CS 4620 Balazs Kovacs, 2014 Daniel Schroeder, 2013 Pramook Khungurn, 2012 Introduction Show how to produce graphics using OpenGL Introduce our framework for OpenGL programming OpenGL
More informationThe Rendering Pipeline (1)
The Rendering Pipeline (1) Alessandro Martinelli alessandro.martinelli@unipv.it 30 settembre 2014 The Rendering Pipeline (1) Rendering Architecture First Rendering Pipeline Second Pipeline: Illumination
More informationHands-On Workshop: 3D Automotive Graphics on Connected Radios Using Rayleigh and OpenGL ES 2.0
Hands-On Workshop: 3D Automotive Graphics on Connected Radios Using Rayleigh and OpenGL ES 2.0 FTF-AUT-F0348 Hugo Osornio Luis Olea A P R. 2 0 1 4 TM External Use Agenda Back to the Basics! What is a GPU?
More informationCS451Real-time Rendering Pipeline
1 CS451Real-time Rendering Pipeline JYH-MING LIEN DEPARTMENT OF COMPUTER SCIENCE GEORGE MASON UNIVERSITY Based on Tomas Akenine-Möller s lecture note You say that you render a 3D 2 scene, but what does
More informationCENG 477 Introduction to Computer Graphics. Graphics Hardware and OpenGL
CENG 477 Introduction to Computer Graphics Graphics Hardware and OpenGL Introduction Until now, we focused on graphic algorithms rather than hardware and implementation details But graphics, without using
More informationJOGL 3D GRAPHICS. Drawing a 3D line. In this chapter, let us see how to deal with 3D graphics.
http://www.tutorialspoint.com/jogl/jogl_3d_graphics.htm JOGL 3D GRAPHICS Copyright tutorialspoint.com In this chapter, let us see how to deal with 3D graphics. Drawing a 3D line Let us draw a simple line
More informationDave Shreiner, ARM March 2009
4 th Annual Dave Shreiner, ARM March 2009 Copyright Khronos Group, 2009 - Page 1 Motivation - What s OpenGL ES, and what can it do for me? Overview - Lingo decoder - Overview of the OpenGL ES Pipeline
More informationShaders. Slide credit to Prof. Zwicker
Shaders Slide credit to Prof. Zwicker 2 Today Shader programming 3 Complete model Blinn model with several light sources i diffuse specular ambient How is this implemented on the graphics processor (GPU)?
More informationCoding OpenGL ES 3.0 for Better Graphics Quality
Coding OpenGL ES 3.0 for Better Graphics Quality Part 2 Hugo Osornio Rick Tewell A P R 1 1 t h 2 0 1 4 TM External Use Agenda Exercise 1: Array Structure vs Vertex Buffer Objects vs Vertex Array Objects
More informationGLSL Overview: Creating a Program
1. Create the OpenGL application GLSL Overview: Creating a Program Primarily concerned with drawing Preferred approach uses buffer objects All drawing done in terms of vertex arrays Programming style differs
More informationCS293: Java Graphics with JOGL, Solutions
UNIVERSITY OF SURREY c B.Sc. Undergraduate Programmes in Computing B.Sc. Undergraduate Programmes in Mathematical Studies Level HE2 Examination CS293: Java Graphics with JOGL, s Time allowed: 2 hours Spring
More informationProgramming of Mobile Services, Spring 2012
Programming of Mobile Services, Spring 2012 HI1017 Lecturer: Anders Lindström, anders.lindstrom@sth.kth.se Lecture 6 Today s topics Android graphics - Views, Canvas, Drawables, Paint - Double buffering,
More informationPROCEDURAL OBJECT MODELING
PROCEDURAL OBJECT MODELING 1 OUTLINE Building a Sphere Building a Torus 2 A SPHERE!! Specifying vertices by hand is tedious Some objects are better represented mathematically These are better expressed
More informationViewport 2.0 API Porting Guide for Locators
Viewport 2.0 API Porting Guide for Locators Introduction This document analyzes the choices for porting plug-in locators (MPxLocatorNode) to Viewport 2.0 mostly based on the following factors. Portability:
More informationCiril Bohak. - INTRODUCTION TO WEBGL
2016 Ciril Bohak ciril.bohak@fri.uni-lj.si - INTRODUCTION TO WEBGL What is WebGL? WebGL (Web Graphics Library) is an implementation of OpenGL interface for cmmunication with graphical hardware, intended
More informationCS 428: Fall Introduction to. OpenGL primer. Andrew Nealen, Rutgers, /13/2010 1
CS 428: Fall 2010 Introduction to Computer Graphics OpenGL primer Andrew Nealen, Rutgers, 2010 9/13/2010 1 Graphics hardware Programmable {vertex, geometry, pixel} shaders Powerful GeForce 285 GTX GeForce480
More informationIntroduction to Android
Introduction to Android http://myphonedeals.co.uk/blog/33-the-smartphone-os-complete-comparison-chart www.techradar.com/news/phone-and-communications/mobile-phones/ios7-vs-android-jelly-bean-vs-windows-phone-8-vs-bb10-1159893
More informationF03_c. 观摩 : SurfaceView 小框架 基於軟硬整合觀點. 的特殊性设计 ( c) By 高煥堂
F03_c 观摩 : SurfaceView 小框架 基於軟硬整合觀點 的特殊性设计 ( c) By 高煥堂 3 范例:JNI + 基於軟硬整合觀點 OpenGL ES C 引擎 范例 ( 一 ) 撰写 , 实现 Renderer 特殊性接口, 并定义 Native 函数, 来与 C/C++ 层的 OpenGL 引擎衔接 ondrawframe( ) onsurfacechanged( ) onsurfacecreated(
More informationECE 104 Fundamentals of Computer Graphics Project 1
ECE 104 Fundamentals of Computer Graphics Project 1 Due date: April 19 th, 2002 Project Objectives: As part of this warm-up project you will (1) create your first working graphics program based on OpenGL,
More informationTo Do. Computer Graphics (Fall 2008) Course Outline. Course Outline. Methodology for Lecture. Demo: Surreal (HW 3)
Computer Graphics (Fall 2008) COMS 4160, Lecture 9: OpenGL 1 http://www.cs.columbia.edu/~cs4160 To Do Start thinking (now) about HW 3. Milestones are due soon. Course Course 3D Graphics Pipeline 3D Graphics
More informationWebGL. WebGL. Bring 3D to the Masses. WebGL. The web has text, images, and video. We want to support. Put it in on a webpage
WebGL WebGL Patrick Cozzi University of Pennsylvania CIS 565 - Fall 2012 The web has text, images, and video What is the next media-type? We want to support Windows, Linux, Mac Desktop and mobile 2 Bring
More informationCS452/552; EE465/505. Review & Examples
CS452/552; EE465/505 Review & Examples 2-05 15 Outline Review and Examples:! Shaders, Buffers & Binding! Example: Draw 3 Triangles Vertex lists; gl.drawarrays( ) Edge lists: gl.drawelements( )! Example:
More informationGraphics Programming. Computer Graphics, VT 2016 Lecture 2, Chapter 2. Fredrik Nysjö Centre for Image analysis Uppsala University
Graphics Programming Computer Graphics, VT 2016 Lecture 2, Chapter 2 Fredrik Nysjö Centre for Image analysis Uppsala University Graphics programming Typically deals with How to define a 3D scene with a
More informationPerformance OpenGL Programming (for whatever reason)
Performance OpenGL Programming (for whatever reason) Mike Bailey Oregon State University Performance Bottlenecks In general there are four places a graphics system can become bottlenecked: 1. The computer
More informationOPENGL AND GLSL. Computer Graphics
OPENGL AND GLSL Computer Graphics 1 OUTLINE I. Detecting GLSL Errors II. Drawing a (gasp) Triangle! III. (Simple) Animation 2 Interactive Computer Graphics, http://www.mechapen.com/projects.html WHAT IS
More informationProgramming of Graphics
Peter Mileff PhD Programming of Graphics Introduction to OpenGL University of Miskolc Department of Information Technology OpenGL libraries GL (Graphics Library): Library of 2D, 3D drawing primitives and
More informationAPI Background. Prof. George Wolberg Dept. of Computer Science City College of New York
API Background Prof. George Wolberg Dept. of Computer Science City College of New York Objectives Graphics API history OpenGL API OpenGL function format Immediate Mode vs Retained Mode Examples The Programmer
More informationE.Order of Operations
Appendix E E.Order of Operations This book describes all the performed between initial specification of vertices and final writing of fragments into the framebuffer. The chapters of this book are arranged
More informationRendering. Part 1 An introduction to OpenGL
Rendering Part 1 An introduction to OpenGL Olivier Gourmel VORTEX Team IRIT University of Toulouse gourmel@irit.fr Image synthesis The Graphics Processing Unit (GPU): A highly parallel architecture specialized
More informationIN ACTION THIRD EDITION. W. Frank Ableson Robi Sen Chris King C. Enrique Ortiz MANNING
IN ACTION THIRD EDITION W. Frank Ableson Robi Sen Chris King C. Enrique Ortiz MANNING Android in Action, Third Edition by W. Frank Abelson Robi Sen Chris King C. Enrique Ortiz Chapter 9 Copyright 2011
More informationWebGL. Announcements. WebGL for Graphics Developers. WebGL for Web Developers. Homework 5 due Monday, 04/16. Final on Tuesday, 05/01
Announcements Patrick Cozzi University of Pennsylvania CIS 565 - Spring 2012 Homework 5 due Monday, 04/16 In-class quiz Wednesday, 04/18 Final on Tuesday, 05/01 6-8pm David Rittenhouse Lab A7 Networking
More informationIntroduction to the Graphics Module Framework
Introduction to the Graphics Module Framework Introduction Unlike the C++ module, which required nothing beyond what you typed in, the graphics module examples rely on lots of extra files - shaders, textures,
More information2: Introducing image synthesis. Some orientation how did we get here? Graphics system architecture Overview of OpenGL / GLU / GLUT
COMP27112 Computer Graphics and Image Processing 2: Introducing image synthesis Toby.Howard@manchester.ac.uk 1 Introduction In these notes we ll cover: Some orientation how did we get here? Graphics system
More informationUlf Assarsson Department of Computer Engineering Chalmers University of Technology
Ulf Assarsson Department of Computer Engineering Chalmers University of Technology Tracing Photons One way to form an image is to follow rays of light from a point source finding which rays enter the lens
More informationGATAV 5. Animations Using a Game Loop
GATAV 5. Animations Using a Game Loop TOC 1. The basic principle. 2. Creating bubbles. 3. Making the bubbles more look alive. 4. The appearent look. 5. Making the audiance impressed. 6. Now it up to you:
More informationGPU Quality and Application Portability
GPU Quality and Application Portability Kalle Raita Senior Software Architect, drawelements Copyright Khronos Group, 2010 - Page 1 drawelements Ltd. drawelements Based in Helsinki, Finland Founded in 2008
More informationLECTURE 02 OPENGL API
COMPUTER GRAPHICS LECTURE 02 OPENGL API Still from Pixar s Inside Out, 2015 IMRAN IHSAN ASSISTANT PROFESSOR WWW.IMRANIHSAN.COM EARLY HISTORY OF APIS IFIPS (1973) formed two committees to come up with a
More informationSpring 2009 Prof. Hyesoon Kim
Spring 2009 Prof. Hyesoon Kim Application Geometry Rasterizer CPU Each stage cane be also pipelined The slowest of the pipeline stage determines the rendering speed. Frames per second (fps) Executes on
More informationMobile Performance Tools and GPU Performance Tuning. Lars M. Bishop, NVIDIA Handheld DevTech Jason Allen, NVIDIA Handheld DevTools
Mobile Performance Tools and GPU Performance Tuning Lars M. Bishop, NVIDIA Handheld DevTech Jason Allen, NVIDIA Handheld DevTools NVIDIA GoForce5500 Overview World-class 3D HW Geometry pipeline 16/32bpp
More informationSpring 2011 Prof. Hyesoon Kim
Spring 2011 Prof. Hyesoon Kim Application Geometry Rasterizer CPU Each stage cane be also pipelined The slowest of the pipeline stage determines the rendering speed. Frames per second (fps) Executes on
More informationIntroduction to Computer Graphics. Hardware Acceleration Review
Introduction to Computer Graphics Hardware Acceleration Review OpenGL Project Setup Create a command-line style project in Xcode 4 Select the project file and click Build Phases tab Add OpenGL.framework
More informationMORE OPENGL. Pramook Khungurn CS 4621, Fall 2011
MORE OPENGL Pramook Khungurn CS 4621, Fall 2011 SETTING UP THE CAMERA Recall: OpenGL Vertex Transformations Coordinates specified by glvertex are transformed. End result: window coordinates (in pixels)
More informationCS 4620 Program 3: Pipeline
CS 4620 Program 3: Pipeline out: Wednesday 14 October 2009 due: Friday 30 October 2009 1 Introduction In this assignment, you will implement several types of shading in a simple software graphics pipeline.
More informationAdding New Features to the CS 5625 Framework. Pramook Khungurn
Adding New Features to the CS 5625 Framework Pramook Khungurn Understanding the CS 5625 framework Features Lazy loading of data loads data only when needed Caching of data no loading same file twice GPU
More informationobject (say a cube) will be made up of triangles, each with three vertices, each with known object coordinates.
hello world 3d: basic approach object (say a cube) will be made up of triangles, each with three vertices, each with known object coordinates. object coordinates of vertices will be put in an OpenGL buffer
More informationReal-Time Rendering (Echtzeitgraphik) Michael Wimmer
Real-Time Rendering (Echtzeitgraphik) Michael Wimmer wimmer@cg.tuwien.ac.at Walking down the graphics pipeline Application Geometry Rasterizer What for? Understanding the rendering pipeline is the key
More informationPowerVR Framework. October 2015
PowerVR Framework October 2015 Gerry Raptis Leading Developer Technology Engineer, PowerVR Graphics PowerVR Tools and SDK Overview Tools Development Debugging Optimisation Authoring SDK Development Learning
More informationLSU EE Homework 5 Solution Due: 27 November 2017
LSU EE 4702 1 Homework 5 Solution Due: 27 November 2017 The solution code is in the repository in file hw05-shdr-sol.cc. Running the makefile will generate an executable for the solution named hw05-sol.
More informationCHAPTER 1 Graphics Systems and Models 3
?????? 1 CHAPTER 1 Graphics Systems and Models 3 1.1 Applications of Computer Graphics 4 1.1.1 Display of Information............. 4 1.1.2 Design.................... 5 1.1.3 Simulation and Animation...........
More informationProfiling and Debugging Games on Mobile Platforms
Profiling and Debugging Games on Mobile Platforms Lorenzo Dal Col Senior Software Engineer, Graphics Tools Gamelab 2013, Barcelona 26 th June 2013 Agenda Introduction to Performance Analysis with ARM DS-5
More informationCS230 : Computer Graphics Lecture 4. Tamar Shinar Computer Science & Engineering UC Riverside
CS230 : Computer Graphics Lecture 4 Tamar Shinar Computer Science & Engineering UC Riverside Shadows Shadows for each pixel do compute viewing ray if ( ray hits an object with t in [0, inf] ) then compute
More informationGeometry Primitives. Computer Science Department University of Malta. Sandro Spina Computer Graphics and Simulation Group. CGSG Geometry Primitives
Geometry Primitives Sandro Spina Computer Graphics and Simulation Group Computer Science Department University of Malta 1 The Building Blocks of Geometry The objects in our virtual worlds are composed
More informationGPU Programming EE Final Examination
Name GPU Programming EE 4702-1 Final Examination Tuesday, 5 December 2017 12:30 14:30 CST Alias Problem 1 Problem 2 Problem 3 Problem 4 Exam Total (15 pts) (20 pts) (30 pts) (35 pts) (100 pts) Good Luck!
More informationCOMP3421. Introduction to 3D Graphics
COMP3421 Introduction to 3D Graphics 3D coordinates Moving to 3D is simply a matter of adding an extra dimension to our points and vectors: 3D coordinates 3D coordinate systems can be left or right handed.
More informationOpenGL BOF Siggraph 2011
OpenGL BOF Siggraph 2011 OpenGL BOF Agenda OpenGL 4 update Barthold Lichtenbelt, NVIDIA OpenGL Shading Language Hints/Kinks Bill Licea-Kane, AMD Ecosystem update Jon Leech, Khronos Viewperf 12, a new beginning
More information3D Programming. 3D Programming Concepts. Outline. 3D Concepts. 3D Concepts -- Coordinate Systems. 3D Concepts Displaying 3D Models
3D Programming Concepts Outline 3D Concepts Displaying 3D Models 3D Programming CS 4390 3D Computer 1 2 3D Concepts 3D Model is a 3D simulation of an object. Coordinate Systems 3D Models 3D Shapes 3D Concepts
More informationRasterization Overview
Rendering Overview The process of generating an image given a virtual camera objects light sources Various techniques rasterization (topic of this course) raytracing (topic of the course Advanced Computer
More informationRendering Grass with Instancing in DirectX* 10
Rendering Grass with Instancing in DirectX* 10 By Anu Kalra Because of the geometric complexity, rendering realistic grass in real-time is difficult, especially on consumer graphics hardware. This article
More informationINF555. Fundamentals of 3D. Lecture 4: Debriefing: ICP (kd-trees) Homography Graphics pipeline. Frank Nielsen
INF555 Fundamentals of 3D Lecture 4: Debriefing: ICP (kd-trees) Homography Graphics pipeline Frank Nielsen nielsen@lix.polytechnique.fr ICP: Algorithm at a glance Start from a not too far initial transformation
More informationWhat was removed? (1) OpenGL ES vs. OpenGL
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
More informationJOGL-ES 1. Rotating Boxes
JOGL-ES 1. Rotating Boxes With the release of the Java Wireless Toolkit (WTK) 2.5, developers now have two 3D APIs to play with in their MIDlets the familiar M3G (also known as Mobile 3D, and JSR-184),
More informationOpenGL SUPERBIBLE. Fifth Edition. Comprehensive Tutorial and Reference. Richard S. Wright, Jr. Nicholas Haemel Graham Sellers Benjamin Lipchak
OpenGL SUPERBIBLE Fifth Edition Comprehensive Tutorial and Reference Richard S. Wright, Jr. Nicholas Haemel Graham Sellers Benjamin Lipchak AAddison-Wesley Upper Saddle River, NJ Boston Indianapolis San
More informationGraphics Programming
Graphics Programming 3 rd Week, 2011 OpenGL API (1) API (application programming interface) Interface between an application program and a graphics system Application Program OpenGL API Graphics Library
More informationCS4621/5621 Fall Computer Graphics Practicum Intro to OpenGL/GLSL
CS4621/5621 Fall 2015 Computer Graphics Practicum Intro to OpenGL/GLSL Professor: Kavita Bala Instructor: Nicolas Savva with slides from Balazs Kovacs, Eston Schweickart, Daniel Schroeder, Jiang Huang
More information6.837 Introduction to Computer Graphics Assignment 5: OpenGL and Solid Textures Due Wednesday October 22, 2003 at 11:59pm
6.837 Introduction to Computer Graphics Assignment 5: OpenGL and Solid Textures Due Wednesday October 22, 2003 at 11:59pm In this assignment, you will add an interactive preview of the scene and solid
More informationArcGIS Runtime: Maximizing Performance of Your Apps. Will Jarvis and Ralf Gottschalk
ArcGIS Runtime: Maximizing Performance of Your Apps Will Jarvis and Ralf Gottschalk Agenda ArcGIS Runtime Version 100.0 Architecture How do we measure performance? We will use our internal Runtime Core
More informationToday s Agenda. Basic design of a graphics system. Introduction to OpenGL
Today s Agenda Basic design of a graphics system Introduction to OpenGL Image Compositing Compositing one image over another is most common choice can think of each image drawn on a transparent plastic
More informationGPU Memory Model Overview
GPU Memory Model Overview John Owens University of California, Davis Department of Electrical and Computer Engineering Institute for Data Analysis and Visualization SciDAC Institute for Ultrascale Visualization
More informationGame Programming with. presented by Nathan Baur
Game Programming with presented by Nathan Baur What is libgdx? Free, open source cross-platform game library Supports Desktop, Android, HTML5, and experimental ios support available with MonoTouch license
More informationM3G Overview. Tomi Aarnio Nokia Research Center
1 M3G Overview Tomi Aarnio Nokia Research Center 2 Objectives Get an idea of the API structure and feature set Learn practical tricks not found in the spec 3 Prerequisites Fundamentals of 3D graphics Some
More informationProgramming Guide. Aaftab Munshi Dan Ginsburg Dave Shreiner. TT r^addison-wesley
OpenGUES 2.0 Programming Guide Aaftab Munshi Dan Ginsburg Dave Shreiner TT r^addison-wesley Upper Saddle River, NJ Boston Indianapolis San Francisco New York Toronto Montreal London Munich Paris Madrid
More informationThe Application Stage. The Game Loop, Resource Management and Renderer Design
1 The Application Stage The Game Loop, Resource Management and Renderer Design Application Stage Responsibilities 2 Set up the rendering pipeline Resource Management 3D meshes Textures etc. Prepare data
More informationIntroduction to 3D Graphics
Graphics Without Polygons Volume Rendering May 11, 2010 So Far Volumetric Rendering Techniques Misc. So Far Extended the Fixed Function Pipeline with a Programmable Pipeline Programming the pipeline is
More informationThe Graphics Pipeline and OpenGL I: Transformations!
! The Graphics Pipeline and OpenGL I: Transformations! Gordon Wetzstein! Stanford University! EE 267 Virtual Reality! Lecture 2! stanford.edu/class/ee267/!! Logistics Update! all homework submissions:
More informationCS770/870 Spring 2017 Open GL Shader Language GLSL
Preview CS770/870 Spring 2017 Open GL Shader Language GLSL Review traditional graphics pipeline CPU/GPU mixed pipeline issues Shaders GLSL graphics pipeline Based on material from Angel and Shreiner, Interactive
More informationCS770/870 Spring 2017 Open GL Shader Language GLSL
CS770/870 Spring 2017 Open GL Shader Language GLSL Based on material from Angel and Shreiner, Interactive Computer Graphics, 6 th Edition, Addison-Wesley, 2011 Bailey and Cunningham, Graphics Shaders 2
More informationGraphics Hardware and OpenGL
Graphics Hardware and OpenGL Ubi Soft, Prince of Persia: The Sands of Time What does graphics hardware have to do fast? Camera Views Different views of an object in the world 1 Camera Views Lines from
More informationLecture 1 Introduction to Android. App Development for Mobile Devices. App Development for Mobile Devices. Announcement.
CSCE 315: Android Lectures (1/2) Dr. Jaerock Kwon App Development for Mobile Devices Jaerock Kwon, Ph.D. Assistant Professor in Computer Engineering App Development for Mobile Devices Jaerock Kwon, Ph.D.
More informationInformation Coding / Computer Graphics, ISY, LiTH. OpenGL! ! where it fits!! what it contains!! how you work with it 11(40)
11(40) Information Coding / Computer Graphics, ISY, LiTH OpenGL where it fits what it contains how you work with it 11(40) OpenGL The cross-platform graphics library Open = Open specification Runs everywhere
More informationInstruction for IVR interface
This document is aimed at helping users to use IVR interface developing applications that will be able to run and display on integrated computer. Instruction for IVR interface IDEALENS 2016.11.1 CONTENTS
More informationAn Introduction to 2D OpenGL
An Introduction to 2D OpenGL January 23, 2015 OpenGL predates the common use of object-oriented programming. It is a mode-based system in which state information, modified by various function calls as
More informationthe gamedesigninitiative at cornell university Lecture 12 Scene Graphs
Lecture 12 Aside: When Do We Load Assets? Main Application Application Start-up Level Load GameMode GameMode Models Scene Choice affects design Models Scene & ownership of asset manager 2 Drawing in CUGL
More informationOpenGL Essentials Training
OpenGL Essentials Training 3-day session Overview Understanding principles of 3D programming Understanding drawing Primitives Understanding transformation matrix and Coloring Understanding Blending and
More informationTransformations. Standard Transformations. David Carr Virtual Environments, Fundamentals Spring 2005 Based on Slides by E. Angel
INSTITUTIONEN FÖR SYSTEMTEKNIK LULEÅ TEKNISKA UNIVERSITET Transformations David Carr Virtual Environments, Fundamentals Spring 25 Based on Slides by E. Angel Jan-27-5 SMM9, Transformations 1 L Overview
More informationTransformations. Overview. Standard Transformations. David Carr Fundamentals of Computer Graphics Spring 2004 Based on Slides by E.
INSTITUTIONEN FÖR SYSTEMTEKNIK LULEÅ TEKNISKA UNIVERSITET Transformations David Carr Fundamentals of Computer Graphics Spring 24 Based on Slides by E. Angel Feb-1-4 SMD159, Transformations 1 L Overview
More informationOptimizing and Profiling Unity Games for Mobile Platforms. Angelo Theodorou Senior Software Engineer, MPG Gamelab 2014, 25 th -27 th June
Optimizing and Profiling Unity Games for Mobile Platforms Angelo Theodorou Senior Software Engineer, MPG Gamelab 2014, 25 th -27 th June 1 Agenda Introduction ARM and the presenter Preliminary knowledge
More informationProgramming with OpenGL Part 3: Shaders. Ed Angel Professor of Emeritus of Computer Science University of New Mexico
Programming with OpenGL Part 3: Shaders Ed Angel Professor of Emeritus of Computer Science University of New Mexico 1 Objectives Simple Shaders - Vertex shader - Fragment shaders Programming shaders with
More informationAndroid Studio Game Development
Android Studio Game Development Concepts and Design J. F. DiMarzio Android Studio Game Development Concepts and Design J. F. DiMarzio Android Studio Game Development: Concepts and Design Copyright 2015
More informationOutline. Introduction Surface of Revolution Hierarchical Modeling Blinn-Phong Shader Custom Shader(s)
Modeler Help Outline Introduction Surface of Revolution Hierarchical Modeling Blinn-Phong Shader Custom Shader(s) Objects in the Scene Controls of the object selected in the Scene. Currently the Scene
More informationSign up for crits! Announcments
Sign up for crits! Announcments Reading for Next Week FvD 16.1-16.3 local lighting models GL 5 lighting GL 9 (skim) texture mapping Modern Game Techniques CS248 Lecture Nov 13 Andrew Adams Overview The
More information