Cosc 5/4730 OpenGL ES An introduction. OpenGL ES GL was first developed by SGI as a priority graphics language – OpenGL was developed initially by SGI.

Slides:



Advertisements
Similar presentations
Programming with OpenGL - Getting started - Hanyang University Han Jae-Hyek.
Advertisements

Välkommen till Sommarkollo Introduce XNA Game Studio Express Make A Game!
Android basics. About Android Linux based operating system Open source Designed for handheld devices Developed by Android Inc. Google (2005) Open Handset.
Chapter 2: Graphics Programming
Graphics Pipeline.
This work is licensed under the Creative Commons Attribution 4.0 International License. To view a copy of this license, visit
Cosc 5/4730 OpenGL ES.
CS378 - Mobile Computing 3D Graphics.
 The success of GL lead to OpenGL (1992), a platform-independent API that was  Easy to use  Close enough to the hardware to get excellent performance.
Cosc 5/4730 Game Design. A short game design primer. A game or animation is built on an animation loop. – Instance variables of “objects” are updated.
Further Programming for 3D applications CE Introduction to Further Programming for 3D application Bob Hobbs Faculty of Computing, Engineering and.
Ch 1 Intro to Graphics page 1CS 367 First Day Agenda Best course you have ever had (survey) Info Cards Name, , Nickname C / C++ experience, EOS experience.
3D Rendering with JOGL Introduction to Java OpenGL Graphic Library By Ricardo Veguilla
SMARTPHONE OPERATION SYSTEM MARKET IN U.S. Ryan (Jang-Hoon) Doo ISM 158.
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
Course Overview, Introduction to CG Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Friday, September 5, 2003.
Antigone Engine Kevin Kassing – Period
CS 480/680 Computer Graphics Course Overview Dr. Frederick C Harris, Jr. Fall 2012.
What is ? Open Graphics Library A cross-language, multi-platform API for rendering 2D and 3D computer graphics. The API is used to interact with a Graphics.
GPU Programming Robert Hero Quick Overview (The Old Way) Graphics cards process Triangles Graphics cards process Triangles Quads.
Programming Concepts. Derive a new class from Activity of the framework Prepare the data beforehand, e.g., vertices, colours, normal vectors, texture.
INTRO TO COMPUTER GRAPHICS TEXT EDWARD ANGEL: EDITION 5 CS770/870
UniS CS297 Graphics with Java and OpenGL Introduction.
Linear Interpolation, Brief Introduction to OpenGL Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Monday, September.
OpenGL Shading Language (Advanced Computer Graphics) Ernest Tatum.
C O M P U T E R G R A P H I C S Jie chen Computer graphic -- OpenGL Howto.
3D API By Clayton Azzopardi (Group 10). Introduction Android uses the OpenGL ES 1.0 API Android uses the OpenGL ES 1.0 API Open Graphics Library for Embedded.
CSC 461: Lecture 41 CSC461: Lecture 4 Introduction to OpenGL Objectives: Development of the OpenGL API OpenGL Architecture -- OpenGL as a state machine.
OpenGl Graphics Programming. Introduction OpenGL is a low-level graphics library specification. It makes available to the programmer a small set of geomteric.
CS 450: COMPUTER GRAPHICS REVIEW: INTRODUCTION TO COMPUTER GRAPHICS – PART 2 SPRING 2015 DR. MICHAEL J. REALE.
The Graphics Rendering Pipeline 3D SCENE Collection of 3D primitives IMAGE Array of pixels Primitives: Basic geometric structures (points, lines, triangles,
1 Angel and Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 Introduction to Computer Graphics 靜宜大學 資訊工程系 蔡奇偉 副教授
Graphics Systems and OpenGL. Business of Generating Images Images are made up of pixels.
CSC 461: Lecture 3 1 CSC461 Lecture 3: Models and Architectures  Objectives –Learn the basic design of a graphics system –Introduce pipeline architecture.
1 Angel and Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 Introduction to Computer Graphics Ed Angel Professor Emeritus of Computer.
1 Introduction to Computer Graphics SEN Introduction to OpenGL Graphics Applications.
OpenGL-ES 3.0 And Beyond Boston What is EGL? EGL handles: –provides available surface specifications –context management –surface binding –render.
© Copyright Khronos Group, Page 1 Shaders Go Mobile: An Introduction to OpenGL ES 2.0 Tom Olson, Texas Instruments Inc.
CS 4363/6353 OPENGL BACKGROUND. WHY IS THIS CLASS SO HARD TO TEACH? (I’LL STOP WHINING SOON) Hardware (GPUs) double in processing power ever 6 months!
CS 480/680 Intro Dr. Frederick C Harris, Jr. Fall 2014.
به نام خدا تنظیم کننده : فرانه حدادی استاد : مهندس زمانیان تابستان 92.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
1Computer Graphics Lecture 4 - Models and Architectures John Shearer Culture Lab – space 2
COMPUTER GRAPHICS CSCI 375. What do I need to know?  Familiarity with  Trigonometry  Analytic geometry  Linear algebra  Data structures  OOP.
NVTune Kenneth Hurley. NVIDIA CONFIDENTIAL NVTune Overview What issues are we trying to solve? Games and applications need to have high frame rates Answer.
Review of OpenGL Basics
Introduction to OpenGL  OpenGL is a graphics API  Software library  Layer between programmer and graphics hardware (and software)  OpenGL can fit in.
1 3D API OPENGL ES v1.0 Owned by Silicon Graphics (SGL) Control was then transferred to Khronos Group Introduction.
Advanced Computer Graphics Spring 2014 K. H. Ko School of Mechatronics Gwangju Institute of Science and Technology.
CSE 381 – Advanced Game Programming GLSL. Rendering Revisited.
WebGL Presentation by: Viet Nguyen.  Final Project Outline  Introduction  History  Support  Implementation  Advantages  Disadvantages  Conclusion.
Computer Graphics 3 Lecture 6: Other Hardware-Based Extensions Benjamin Mora 1 University of Wales Swansea Dr. Benjamin Mora.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
CS378 - Mobile Computing 3D Graphics.
 Learn some important functions and process in OpenGL ES  Draw some triangles on the screen  Do some transformation on each triangle in each frame.
What are Computer Graphics Basically anything that is on you Monitor – This includes the text that you will see Text isn’t Advanced Graphics But…. Understanding.
Mobile & Casual Gaming OpenGL ES Intro. /red/chapter03.html.
GPU Computing for GIS James Mower Department of Geography and Planning University at Albany.
1 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 Models and Architectures 靜宜大學 資訊工程系 蔡奇偉 副教授 2012.
Computer Graphics (Fall 2003) COMS 4160, Lecture 5: OpenGL 1 Ravi Ramamoorthi Many slides courtesy Greg Humphreys.
Antigone Engine.
Advanced Graphics Algorithms Ying Zhu Georgia State University
Introduction to OpenGL
Chapter 6 GPU, Shaders, and Shading Languages
Introduction to Computer Graphics with WebGL
Introduction to Computer Graphics with WebGL
CIS 441/541: Introduction to Computer Graphics Lecture 15: shaders
Introduction to OpenGL
OpenGL Background CS 4722.
OpenGL-Rendering Pipeline
Presentation transcript:

Cosc 5/4730 OpenGL ES An introduction

OpenGL ES GL was first developed by SGI as a priority graphics language – OpenGL was developed initially by SGI and working group of other people in – Open GL is used from games to supercomputers OpenGL and OpenGL ES are managed by a consortium, called the Khronos group. – OpenGL ES (Embedded Systems) is a subset of OpenGL intended for devices like mobile phones.

Open GL ES (2) OpenGL ES 1.0 had much functionality stripped from the original OpenGL API and a little bit added. Two of the more significant differences between OpenGL ES and OpenGL are the removal of the glBegin... glEnd calling semantics for primitive rendering (in favor of vertex arrays) and the introduction of fixed-point data types for vertex coordinates and attributes to better support the computational abilities of embedded processors, which often lack an FPU. OpenGL ES 1.1 adds to the OpenGL ES 1.0 functionality by introducing additional features such as mandatory support for multitexture, better multitexture support (with combiners and dot product texture operations), automatic mipmap generation, vertex buffer objects, state queries, user clip planes, and greater control over point rendering. OpenGL ES 2.0, publicly released in March 2007 [1], eliminates most of the fixed- function rendering pipeline in favor of a programmable one. Almost all rendering features of the transform and lighting pipelines, such as the specification of materials and light parameters formerly specified by the fixed-function API, are replaced by shaders written by the graphics programmer. As a result, OpenGL ES 2.0 is not backwards compatible with OpenGL ES 1.1. [1]

Device support. OpenGL ES 1.0 has been chosen as the official 3D graphics API in Symbian OS and the Android platform. OpenGL ES 1.0 plus some features of 2.0 and Cg are supported by the PlayStation 3 as one of official graphics APIs (the other one being low level libgcm library). OpenGL ES 1.1 is one of the 3D libraries for the iPhone SDK. OpenGL ES 1.0 and 1.1 are supported in the BlackBerry 5.0+ operating system series. However, only the BlackBerry Storm 2 and the BlackBerry Curve 8530 have the hardware to support OpenGL ES 1.x. Future models will support OpenGL ES as well. OpenGL ES 1.1 and 2.0 are supported for Palm webOS, using the Plug-in Development Kit OpenGL ES 2.0 will be used as the 3D library for the Pandora console and is one of the 3D libraries for the iPhone SDK (only enabled for the iPhone 3GS and the new iPod Touch with the PowerVR SGX), and Palm Pre. It is also rumored that Windows Mobile 7 from Microsoft will also support OpenGL ES 2.0. This version was also chosen for WebGL, OpenGL for browsers. Nokia N900 also supports OpenGL ES 2.0. Since the release of NDK r3 the Android platform supports OpenGL ES 2.0 as well. – Reference

This lecture Since openGL ES usages is the same across platforms, I'm going to use android as basis for this lecture. – Later in the lecture I show the how the blackberry screens work. – This is also not a graphics course. To cover OpenGL requires a great deal of time, which is provided in the Graphics course, which spends the entire course covering OpenGL.

javax.microedition.khronos.opengles This package provides the APIs for OpenGL. GL – parent interface for the Java(TM) programming language bindings for OpenGL(R) ES 1.0, 1.1, and extensions. GL10 – interface contains the Java(TM) programming language bindings for OpenGL(R) ES 1.0 core functionality GL10Ext – interface contains the Java(TM) programming language bindings for the OES_query_matrix extension to OpenGL(R) ES 1.0. GL11 – The GL11 interface contains the Java(TM) programming language bindings for OpenGL(R) ES 1.1 core functionality. GL11Ext – optional profile extensions comprise the following: OES_draw_texture and OES_matrix_palette GL11Extension – Pack Extension Pack consists of the following extensions: OES_texture_env_crossbar, OES_texture_mirrored_repeat, OES_texture_cube_map, OES_blend_subtract, OES_blend_func_separate, OES_blend_equation_separate, OES_stencil_wrap, OES_extended_matrix_palette, OES_framebuffer_object

Android Provides two ways to render OpenGL – Based on API 1, extend a SurfaceView Start a OpenGL thread, where all OpenGL calls must be called initialize the EGL Initialize GL now start drawing – This is actually how it is still done with the Blackberry. – Based on Android 1.5+ We’ll focus on this for android extend/instantiate a GLSurfaceView and extend /implement a GLSurfaceView.Rendener start drawing.

Example public class OpenGlDemo extends Activity { public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); GLSurfaceView view = new GLSurfaceView(this); view.setRenderer(new OpenGLRenderer()); – OpenGLRenderer is a class that implements Renderer setContentView(view); }

GLSurfaceView The API class in Android that helps you write OpenGL ES applications. – Providing the glue code to connect OpenGL ES to the View system. – Providing the glue code to make OpenGL ES work with the Activity life-cycle. – Making it easy to choose an appropriate frame buffer pixel format. – Creating and managing a separate rendering thread to enable smooth animation. – Providing easy-to-use debugging tools for tracing OpenGL ES API calls and checking for errors.

Renderer GLSurfaceView.Renderer is a generic render interface. In your implementation of this renderer you should put all your calls to render a frame. There are three functions to implement: – Called when the surface is created or recreated. public void onSurfaceCreated(GL10 gl, EGLConfig config) A place to setup things that don't change over rendering cycles – Called to draw the current frame. public void onDrawFrame(GL10 gl) this is where the drawing actually takes place – Called when the surface changed size. public void onSurfaceChanged(GL10 gl, int width, int height) called if the devices changes from landscape to portrait or back again.

Events Touch/key events. Make sure these are all handled in the GLSurfaceView – Instead of the activity.

See the Demos OpenGLDemo.zip – Very basic framework. Draws a Square. OpenGL.zip – Demo showing Triangle, cube, lighting. Vortex – Triangles, with touch events. Extends the GLSurfaceView instead of implements.

BLACKBERRY OpenGL ES

Blackberry Supported on only the newer phones. – Storm 2, Torch, a newest Bold 9650 See blackberry for a spec list.

The basics. Not very simple to get started. Extends a FullScreen (can use MainScreen) – Which implements a thread, where all OpenGL calls for drawing go. Initialize – initialize the EGL – Initialize GL now start drawing in the run part of the thread. – Use the examples to get an idea

If we had… If we had about a week of lectures I could cover this correctly, but we don’t. Check the two examples for how to initialize and get started. OpenGlTest.zip – Multi colored triangle. ThreeDCube.zip – Renders a 3D spinning cube.

References Tutorials: – General OpenGL ES tutorials (25 parts) – A great OpenGL ES Tutorial for Android (5 parts) – (7 parts) – D_graphics_using_OpenGL_ES_944406_11.jsp JavaDocs – – CN/reference/javax/microedition/khronos/opengles/package-summary.html – click on the javax.microedition.khronos.opengls. This has much better descriptions of the methods, then android. OpenGL ES Game Development book.

Q A &