Your SlideShare is downloading. ×
OpenGL - Bringing the 3D World into the Android
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

OpenGL - Bringing the 3D World into the Android

393
views

Published on

OpenGL harness the full power of the gpu to create 2D and 3D compelling graphics in a cross-platform manner. In this session we will introduce the OpenGL fundamentals, and we will focus on creating …

OpenGL harness the full power of the gpu to create 2D and 3D compelling graphics in a cross-platform manner. In this session we will introduce the OpenGL fundamentals, and we will focus on creating functional OpenGL applications as well as demonstrating WebGL, which brings the OpenGL APIs into the the web world.

As presented in DroidCon Tel Aviv 2014 by:
Ziv Gilad
http://il.droidcon.com

Published in: Technology, Art & Photos

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
393
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
16
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • Multi Platform - Linux, MacOS X, and Windows
    Cross-language – c++, C# and Java to Python and Lua
  • Transcript

    • 1. Ziv Gilad Ziv.gilad@gmail.com
    • 2. First - few Examples Few Examples from the WebGL World: • Trigger Rally • Jellyfish Simulation • Train Demo • Mammoth
    • 3. What is OpenGL? • Hardware-accelerated 3D graphics • API for rendering 2D and 3D • Cross-language • Multi-platform • Part of the Khronos Group • Royalty-free • Client-based rendering • Immediate mode rendering
    • 4. Android Support • Android uses OpenGL ES • OpenGL ES 1.0 and 1.1 • Android 1.0 and higher • OpenGL ES 2.0 • Android 2.2 (API level 8) and higher • OpenGL ES 3.0 • Android 4.3 (API level 18) and higher may support • Requires device manufacturer support
    • 5. WebGL for Android • Android also supports OpenGL for the Web • WebGL is the OpenGL ES JavaScript APIS • Browser Support: • FireFox for Mobile 4 • Chrome for Android 25 • Opera Mobile 12
    • 6. 3D Models • Defined using meshes • Mesh composed of triangles • Triangles are 3 vertices • Vertices are x, y, z triples • No surface properties • No color • No Mateial
    • 7. 3D Model Example
    • 8. 3D Models • Can be written in Notepad • In practice we use 3D creation tools • Blender • Clara.io • Maya • Cinema4D • Unity • 3ds Max
    • 9. Create a vertex array Create Simple Model
    • 10. Demo Vertices Example
    • 11. Create an index array Create Simple Model
    • 12. OpenGL Pipeline Vertex Buffer Attributes Vertex Shader Fragmant (Pixel) Shader Frame Buffer Uniforms Varyings Coordinates, Colors, Normals
    • 13. Transitions • glsl-transition
    • 14. Transition Example
    • 15. Vertex Shader • Invoked per each vertex • Shader Input: • Per vertex – Attributes • Globally for all vertices – Uniforms • Manipulate vertex position: • Scale • Rotate • Translate • Can send data to fragmant shader - Varying
    • 16. Vertex Affine Transform • Rotation: • Scaling: • Translation:
    • 17. Cameras, Perspective, Viewports • Camera position and orientation • Model – View matrix • Field of view (FOV) • Perspective matrix • Viewport • 2D projection of 3D scene
    • 18. Demo Wireframe Cube Example
    • 19. Demo Colored Cube Example
    • 20. Vertices vs Fragments • More fragments than vertices
    • 21. Demo Colored Cube Interpolation Example
    • 22. Vertices vs Fragments • More fragments than vertices • Vertex shader varying are interpolated
    • 23. Textures What if we want to display this image On this surface?
    • 24. Textures And get the following result?
    • 25. Textures • Display image on the surface • Use texture mapping • Apply real time effects
    • 26. Demo Textured Cube - Image
    • 27. Demo Textured Cube – Two Textures
    • 28. Lights and materials • Lightning model use physical principles • Final Color • Lights • Normals • Material
    • 29. Phong Reflection Model
    • 30. Picking • Create offscreen framebuffer • Label objects with unique colors • Off-screen – on screen render • Read Pixel Data
    • 31. Summary • OpenGL – hardware accelerated 3D graphics • Vertex Shader - manipulates per-vertex data • Fragment Shader - calculates color of individual pixels • Textures display images on the surface of geometries
    • 32. Questions?
    • 33. Ziv Gilad Ziv.gilad@gmail.com