SlideShare a Scribd company logo
Intro to OpenGL ES
ES = Embedded (and mobile) Systems
OpenGL ES versions
● 1.x - deprecated, fixed function pipeline
● 2.0 - programmable pipeline, the most widespread API
● 3.0 - enhanced graphics (multiple rendering targets etc.)
○ 3.1 - general purpose compute (compute shaders, independent vertex and fragment shaders)
○ 3.2 - extensions to v.3.1 (based on Android Extension Pack)
Compatible devices
iOS Android
OpenGL ES Version Device Distribution
2.0 37.2%
3.0 45.1%
3.1 17.7%
Device
OpenGL ES Version
2.0 3.X
iPhone X
iPhone 8/8 Plus
iPhone 7/7 Plus
iPhone 6s/6s Plus
iPhone SE
iPhone 6/6 Plus
iPhone 5s
iPhone 5/5c
iPhone 4/4s
iPhone 3GS
Fixed vs Programmable
Fixed function pipeline (OpenGL ES 1.x)
Vertices Transform and
Lighting
Primitive
Assembly
Rasterizer
Color
Sum
Texture
Environment
Fog
Alpha
Test
Depth
Stencil
Color
Buffer
Blend
Dither Frame Buffer
Programmable pipeline (OpenGL ES 2.0)
Vertices Vertex
Shader
Primitive
Assembly
Rasterizer
Color
Sum
Fragment
Shader
Fog
Alpha
Test
Depth
Stencil
Color
Buffer
Blend
Dither Frame Buffer
Intro to OpenGL ES 2.0
Simplest Vertex Shader Code
attribute vec4 vPosition;
void main() {
gl_Position = vPosition;
gl_PointSize = 10.0; // Makes sense only when drawing points
}
Simplest Fragment Shader Code
precision mediump float;
void main() {
gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0); //Everything will be green...
}
Let’s draw!
But first we need a surface...
● GLKit framework (GLKView and GLKViewController) on iOS
● GLSurfaceView or TextureView on Android
GLSurfaceView (Android)
● Implement and set rendering callback!
● OpenGL context will be created and attached to surface for you
(still possible to create on your own)
● The rendering context stores the appropriate OpenGL ES state
(state machine)
Renderer callback (pseudocode)
glView.setRenderer(new GLSurfaceView.Renderer() {
@Override
public void onSurfaceCreated(GL10 unused, EGLConfig config) {
createNative();
}
@Override
public void onSurfaceChanged(GL10 unused, int width, int height) {
initNative(width, height);
}
@Override
public void onDrawFrame(GL10 unused) {
drawNative();
}
});
createNative()
Create vertex/fragment shader
GLuint createShader(GLenum shaderType, const char *pSource) {
GLuint shader = glCreateShader(shaderType);
if (shader) {
glShaderSource(shader, 1, &pSource, NULL);
glCompileShader(shader);
GLint compiled = 0;
glGetShaderiv(shader, GL_COMPILE_STATUS, &compiled);
if (!compiled) {
// Log error, clear memory...
...
}
}
return shader;
}
Create and link program
GLuint createProgram(GLuint vertexShader, GLuint fragmentShader) {
GLuint program = glCreateProgram();
if (program) {
glAttachShader(program, vertexShader);
glAttachShader(program, fragmentShader);
glLinkProgram(program);
GLint linkStatus = GL_FALSE;
glGetProgramiv(program, GL_LINK_STATUS, &linkStatus);
if (linkStatus != GL_TRUE) {
// Handle error
...
}
}
return program;
}
initNative(width, height)
Viewport
void initNative(int w, int h) {
// Specifies the affine transformation of x and y
// from normalized device coordinates
// to window coordinates.
glViewport(0, 0, w, h);
}
Image from https://developer.android.com/guide/topics/graphics/opengl.html#coordinate-mapping
drawNative()
Draw with shader
void drawSomething(GLuint shaderId) {
glClearColor(.0f, .0f, .0f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT);
glUseProgram(shaderId);
// draw with program...
...
glUseProgram(0);
}
glDrawElements
● GL_POINTS
● GL_LINE_STRIP
● GL_LINE_LOOP
● GL_LINES
● GL_TRIANGLE_STRIP
● GL_TRIANGLE_FAN
● GL_TRIANGLES
Image from https://stackoverflow.com/questions/13789269/draw-a-ring-with-different-color-sector
Draw square
GLuint vPositionHandle = glGetAttribLocation(programId, "vPosition");
static const GLfloat triangleVertices[] = {
-0.5, 0.5, 0.0f, // square left top vertex, 0 index
-0.5, -0.5, 0.0f, // square left bottom vertex, 1 index
0.5, -0.5, 0.0f, // square right bottom vertex, 2 index
0.5, 0.5, 0.0f, // square right top vertex, 3 index
};
const GLubyte indices[] = {0, 1, 2, 0, 2, 3};
glVertexAttribPointer(vPositionHandle, 3, GL_FLOAT, GL_FALSE, 0, triangleVertices);
glEnableVertexAttribArray(vPositionHandle);
glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_BYTE, indices);
Texturing
Texture Vertex Shader
attribute vec4 vPosition;
attribute vec2 vTexCoord;
varying vec2 v_TexCoordinate;
void main() {
v_TexCoordinate = vTexCoord;
gl_Position = vPosition;
}
Texture Fragment Shader
precision mediump float;
uniform sampler2D tex;
varying vec2 v_TexCoordinate;
void main() {
gl_FragColor = texture2D(tex, v_TexCoordinate);
}
http://www.learnopengles.com/android-lesson-four-introducing-basic-texturing/texture-coordinates/
Set texture coordinates
GLfloat texCoords[] = {
0, 0,
0, 1,
1, 1,
1, 0
};
GLuint vTexCoordHandle;
vTexCoordHandle = glGetAttribLocation(textureShader->getId(), "vTexCoord");
glVertexAttribPointer(vTexCoordHandle, 2, GL_FLOAT, GL_FALSE, 0, texCoords);
glEnableVertexAttribArray(vTexCoordHandle);
Bind texture
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, textureId);
glUniform1i(glGetUniformLocation(programId, "tex"), 0);
Transformations
Vertex Shader
attribute vec4 vPosition;
attribute vec4 vColor;
varying vec4 v_Color;
uniform mat4 uMVPMatrix;
void main() {
v_Color = vColor;
gl_Position = uMVPMatrix * vPosition;
}
Fragment Shader
precision mediump float;
varying vec4 v_Color;
varying vec2 v_TexCoordinate;
void main() {
gl_FragColor = v_Color;
}
Cube vertices and indices
float d = 0.5f;
const GLfloat vertices[] = {
// near cube face
-d, d, d, // left top vertex, 0 index
-d, -d, d, // left bottom vertex, 1 index
d, -d, d, // right bottom vertex, 2 index
d, d, d, // right top vertex, 3 index
// far cube face
-d, d, -d, // left top vertex, 4 index
-d, -d, -d, // left bottom vertex, 5 index
d, -d, -d, // right bottom vertex, 6 index
d, d, -d, // right top vertex, 7 index
};
const GLubyte indices[] = {
0, 1, 2, 2, 3, 0, // front face
6, 5, 4, 4, 7, 6, // rear face
4, 0, 3, 3, 7, 4, // top face
1, 5, 6, 6, 2, 1, // bottom face
4, 5, 1, 1, 0, 4, // left face
3, 2, 6, 6, 7, 3, // right face
};
Set colors per vertex
const float colors[] = {
0.0f, 1.0f, 1.0f,
1.0f, 0.0f, 0.0f,
1.0f, 1.0f, 0.0f,
0.0f, 1.0f, 0.0f,
0.0f, 0.0f, 1.0f,
1.0f, 0.0f, 1.0f,
1.0f, 1.0f, 1.0f,
0.0f, 1.0f, 1.0f,
};
const int componentsPerColor = 3;
GLuint colorHandle = glGetAttribLocation(programId, "vColor");
glEnableVertexAttribArray(colorHandle);
glVertexAttribPointer(colorHandle, 4, GL_FLOAT, false, componentsPerColor * 4, colors);
Set matrices
//on init...
projMatr = matr4::frustum(-aspectRatio, aspectRatio, -1, 1, 3, 7);
viewMatr = matr4::lookAt(0, 0, -4, 0, 0, 0, 0, 1, 0);
//on draw...
modelMatr = matr4::rotateX(angleX) * matr4::rotateY(angleY) * matr4::rotateZ(angleZ);
matr4 mvp = projMatr * viewMatr * modelMatr;
GLuint modelViewProjectionHandle = glGetUniformLocation(programId, "uMVPMatrix");
GL2::uniformMatrix4fv(modelViewProjectionHandle, 1, GL_FALSE, mvp.ptr());
Intro to OpenGL ES 2.0
References
1. https://www.khronos.org/opengles/sdk/docs/reference_cards/OpenGL-ES-2_0-Reference-card.pdf
2. https://www.amazon.com/OpenGL-ES-2-0-Programming-Guide-ebook/dp/B004Z6EW5O
3. https://developer.apple.com/library/content/documentation/3DDrawing/Conceptual/OpenGLES_Prog
rammingGuide/Introduction/Introduction.html
4. https://developer.android.com/training/graphics/opengl/index.html
Android sample on GitHub
https://github.com/AlexanderKozubets/opengl-sample-android
Thank you for attention!

More Related Content

PDF
FLTK Summer Course - Part VIII - Eighth Impact - Exercises
PPT
Drawing Figures
DOCX
(Www.entrance exam.net)-tcs placement sample paper 2
DOCX
verilog code
PDF
Data Structure - 2nd Study
PDF
C++ Expression Templateを使って式をコンパイル時に微分
PPT
Interesting facts on c
FLTK Summer Course - Part VIII - Eighth Impact - Exercises
Drawing Figures
(Www.entrance exam.net)-tcs placement sample paper 2
verilog code
Data Structure - 2nd Study
C++ Expression Templateを使って式をコンパイル時に微分
Interesting facts on c

What's hot (14)

PDF
2014 computer science_question_paper
PDF
Proyecto final curso – Electrónica Digital I
PDF
C++ Question on References and Function Overloading
DOC
Digital logic circuits important question and answers for 5 units
PDF
C++ Programming - 1st Study
PPTX
Gerbang Logika Dasar
DOCX
7segment scetch
PDF
C++ TUTORIAL 2
PPTX
New presentation oop
PDF
Lec 11 12_sept [compatibility mode]
DOCX
Assignement of programming & problem solving u.s ass.(1)
PDF
An Expressive Model for Instance Decomposition Based Parallel SAT Solvers
PDF
C questions
PDF
1z0 851 exam-java standard edition 6 programmer certified professional
2014 computer science_question_paper
Proyecto final curso – Electrónica Digital I
C++ Question on References and Function Overloading
Digital logic circuits important question and answers for 5 units
C++ Programming - 1st Study
Gerbang Logika Dasar
7segment scetch
C++ TUTORIAL 2
New presentation oop
Lec 11 12_sept [compatibility mode]
Assignement of programming & problem solving u.s ass.(1)
An Expressive Model for Instance Decomposition Based Parallel SAT Solvers
C questions
1z0 851 exam-java standard edition 6 programmer certified professional
Ad

Similar to Intro to OpenGL ES 2.0 (20)

PDF
Getting Started with OpenGL ES
PDF
The Ring programming language version 1.5.4 book - Part 119 of 185
PPT
Open gles
PDF
The Ring programming language version 1.5.1 book - Part 134 of 180
PPTX
Introduction to open gl in android droidcon - slides
PDF
The Ring programming language version 1.7 book - Part 141 of 196
PDF
Android open gl2_droidcon_2014
PPT
Introduction to open_gl_in_android
PDF
The Ring programming language version 1.6 book - Part 164 of 189
PDF
The Ring programming language version 1.10 book - Part 156 of 212
PDF
The Ring programming language version 1.7 book - Part 183 of 196
PDF
The Ring programming language version 1.5.4 book - Part 114 of 185
PPT
CS 354 Viewing Stuff
PPTX
GFX Part 6 - Introduction to Vertex and Fragment Shaders in OpenGL ES
PDF
Development with OpenGL and Qt
PDF
The Ring programming language version 1.5.2 book - Part 149 of 181
PDF
The Ring programming language version 1.9 book - Part 191 of 210
PDF
A Novice's Guide to WebGL
PDF
lectureAll-OpenGL-complete-Guide-Tutorial.pdf
Getting Started with OpenGL ES
The Ring programming language version 1.5.4 book - Part 119 of 185
Open gles
The Ring programming language version 1.5.1 book - Part 134 of 180
Introduction to open gl in android droidcon - slides
The Ring programming language version 1.7 book - Part 141 of 196
Android open gl2_droidcon_2014
Introduction to open_gl_in_android
The Ring programming language version 1.6 book - Part 164 of 189
The Ring programming language version 1.10 book - Part 156 of 212
The Ring programming language version 1.7 book - Part 183 of 196
The Ring programming language version 1.5.4 book - Part 114 of 185
CS 354 Viewing Stuff
GFX Part 6 - Introduction to Vertex and Fragment Shaders in OpenGL ES
Development with OpenGL and Qt
The Ring programming language version 1.5.2 book - Part 149 of 181
The Ring programming language version 1.9 book - Part 191 of 210
A Novice's Guide to WebGL
lectureAll-OpenGL-complete-Guide-Tutorial.pdf
Ad

Recently uploaded (20)

PPTX
ManageIQ - Sprint 268 Review - Slide Deck
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PPTX
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PPTX
CHAPTER 2 - PM Management and IT Context
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
Softaken Excel to vCard Converter Software.pdf
PPTX
Transform Your Business with a Software ERP System
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PPT
Introduction Database Management System for Course Database
ManageIQ - Sprint 268 Review - Slide Deck
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Odoo Companies in India – Driving Business Transformation.pdf
Design an Analysis of Algorithms II-SECS-1021-03
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
How Creative Agencies Leverage Project Management Software.pdf
Wondershare Filmora 15 Crack With Activation Key [2025
Upgrade and Innovation Strategies for SAP ERP Customers
How to Migrate SBCGlobal Email to Yahoo Easily
VVF-Customer-Presentation2025-Ver1.9.pptx
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
CHAPTER 2 - PM Management and IT Context
Odoo POS Development Services by CandidRoot Solutions
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Softaken Excel to vCard Converter Software.pdf
Transform Your Business with a Software ERP System
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Introduction Database Management System for Course Database

Intro to OpenGL ES 2.0

  • 2. ES = Embedded (and mobile) Systems
  • 3. OpenGL ES versions ● 1.x - deprecated, fixed function pipeline ● 2.0 - programmable pipeline, the most widespread API ● 3.0 - enhanced graphics (multiple rendering targets etc.) ○ 3.1 - general purpose compute (compute shaders, independent vertex and fragment shaders) ○ 3.2 - extensions to v.3.1 (based on Android Extension Pack)
  • 4. Compatible devices iOS Android OpenGL ES Version Device Distribution 2.0 37.2% 3.0 45.1% 3.1 17.7% Device OpenGL ES Version 2.0 3.X iPhone X iPhone 8/8 Plus iPhone 7/7 Plus iPhone 6s/6s Plus iPhone SE iPhone 6/6 Plus iPhone 5s iPhone 5/5c iPhone 4/4s iPhone 3GS
  • 6. Fixed function pipeline (OpenGL ES 1.x) Vertices Transform and Lighting Primitive Assembly Rasterizer Color Sum Texture Environment Fog Alpha Test Depth Stencil Color Buffer Blend Dither Frame Buffer
  • 7. Programmable pipeline (OpenGL ES 2.0) Vertices Vertex Shader Primitive Assembly Rasterizer Color Sum Fragment Shader Fog Alpha Test Depth Stencil Color Buffer Blend Dither Frame Buffer
  • 9. Simplest Vertex Shader Code attribute vec4 vPosition; void main() { gl_Position = vPosition; gl_PointSize = 10.0; // Makes sense only when drawing points }
  • 10. Simplest Fragment Shader Code precision mediump float; void main() { gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0); //Everything will be green... }
  • 12. But first we need a surface... ● GLKit framework (GLKView and GLKViewController) on iOS ● GLSurfaceView or TextureView on Android
  • 13. GLSurfaceView (Android) ● Implement and set rendering callback! ● OpenGL context will be created and attached to surface for you (still possible to create on your own) ● The rendering context stores the appropriate OpenGL ES state (state machine)
  • 14. Renderer callback (pseudocode) glView.setRenderer(new GLSurfaceView.Renderer() { @Override public void onSurfaceCreated(GL10 unused, EGLConfig config) { createNative(); } @Override public void onSurfaceChanged(GL10 unused, int width, int height) { initNative(width, height); } @Override public void onDrawFrame(GL10 unused) { drawNative(); } });
  • 16. Create vertex/fragment shader GLuint createShader(GLenum shaderType, const char *pSource) { GLuint shader = glCreateShader(shaderType); if (shader) { glShaderSource(shader, 1, &pSource, NULL); glCompileShader(shader); GLint compiled = 0; glGetShaderiv(shader, GL_COMPILE_STATUS, &compiled); if (!compiled) { // Log error, clear memory... ... } } return shader; }
  • 17. Create and link program GLuint createProgram(GLuint vertexShader, GLuint fragmentShader) { GLuint program = glCreateProgram(); if (program) { glAttachShader(program, vertexShader); glAttachShader(program, fragmentShader); glLinkProgram(program); GLint linkStatus = GL_FALSE; glGetProgramiv(program, GL_LINK_STATUS, &linkStatus); if (linkStatus != GL_TRUE) { // Handle error ... } } return program; }
  • 19. Viewport void initNative(int w, int h) { // Specifies the affine transformation of x and y // from normalized device coordinates // to window coordinates. glViewport(0, 0, w, h); } Image from https://developer.android.com/guide/topics/graphics/opengl.html#coordinate-mapping
  • 21. Draw with shader void drawSomething(GLuint shaderId) { glClearColor(.0f, .0f, .0f, 1.0f); glClear(GL_COLOR_BUFFER_BIT); glUseProgram(shaderId); // draw with program... ... glUseProgram(0); }
  • 22. glDrawElements ● GL_POINTS ● GL_LINE_STRIP ● GL_LINE_LOOP ● GL_LINES ● GL_TRIANGLE_STRIP ● GL_TRIANGLE_FAN ● GL_TRIANGLES Image from https://stackoverflow.com/questions/13789269/draw-a-ring-with-different-color-sector
  • 23. Draw square GLuint vPositionHandle = glGetAttribLocation(programId, "vPosition"); static const GLfloat triangleVertices[] = { -0.5, 0.5, 0.0f, // square left top vertex, 0 index -0.5, -0.5, 0.0f, // square left bottom vertex, 1 index 0.5, -0.5, 0.0f, // square right bottom vertex, 2 index 0.5, 0.5, 0.0f, // square right top vertex, 3 index }; const GLubyte indices[] = {0, 1, 2, 0, 2, 3}; glVertexAttribPointer(vPositionHandle, 3, GL_FLOAT, GL_FALSE, 0, triangleVertices); glEnableVertexAttribArray(vPositionHandle); glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_BYTE, indices);
  • 25. Texture Vertex Shader attribute vec4 vPosition; attribute vec2 vTexCoord; varying vec2 v_TexCoordinate; void main() { v_TexCoordinate = vTexCoord; gl_Position = vPosition; }
  • 26. Texture Fragment Shader precision mediump float; uniform sampler2D tex; varying vec2 v_TexCoordinate; void main() { gl_FragColor = texture2D(tex, v_TexCoordinate); } http://www.learnopengles.com/android-lesson-four-introducing-basic-texturing/texture-coordinates/
  • 27. Set texture coordinates GLfloat texCoords[] = { 0, 0, 0, 1, 1, 1, 1, 0 }; GLuint vTexCoordHandle; vTexCoordHandle = glGetAttribLocation(textureShader->getId(), "vTexCoord"); glVertexAttribPointer(vTexCoordHandle, 2, GL_FLOAT, GL_FALSE, 0, texCoords); glEnableVertexAttribArray(vTexCoordHandle);
  • 30. Vertex Shader attribute vec4 vPosition; attribute vec4 vColor; varying vec4 v_Color; uniform mat4 uMVPMatrix; void main() { v_Color = vColor; gl_Position = uMVPMatrix * vPosition; }
  • 31. Fragment Shader precision mediump float; varying vec4 v_Color; varying vec2 v_TexCoordinate; void main() { gl_FragColor = v_Color; }
  • 32. Cube vertices and indices float d = 0.5f; const GLfloat vertices[] = { // near cube face -d, d, d, // left top vertex, 0 index -d, -d, d, // left bottom vertex, 1 index d, -d, d, // right bottom vertex, 2 index d, d, d, // right top vertex, 3 index // far cube face -d, d, -d, // left top vertex, 4 index -d, -d, -d, // left bottom vertex, 5 index d, -d, -d, // right bottom vertex, 6 index d, d, -d, // right top vertex, 7 index }; const GLubyte indices[] = { 0, 1, 2, 2, 3, 0, // front face 6, 5, 4, 4, 7, 6, // rear face 4, 0, 3, 3, 7, 4, // top face 1, 5, 6, 6, 2, 1, // bottom face 4, 5, 1, 1, 0, 4, // left face 3, 2, 6, 6, 7, 3, // right face };
  • 33. Set colors per vertex const float colors[] = { 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, }; const int componentsPerColor = 3; GLuint colorHandle = glGetAttribLocation(programId, "vColor"); glEnableVertexAttribArray(colorHandle); glVertexAttribPointer(colorHandle, 4, GL_FLOAT, false, componentsPerColor * 4, colors);
  • 34. Set matrices //on init... projMatr = matr4::frustum(-aspectRatio, aspectRatio, -1, 1, 3, 7); viewMatr = matr4::lookAt(0, 0, -4, 0, 0, 0, 0, 1, 0); //on draw... modelMatr = matr4::rotateX(angleX) * matr4::rotateY(angleY) * matr4::rotateZ(angleZ); matr4 mvp = projMatr * viewMatr * modelMatr; GLuint modelViewProjectionHandle = glGetUniformLocation(programId, "uMVPMatrix"); GL2::uniformMatrix4fv(modelViewProjectionHandle, 1, GL_FALSE, mvp.ptr());
  • 36. References 1. https://www.khronos.org/opengles/sdk/docs/reference_cards/OpenGL-ES-2_0-Reference-card.pdf 2. https://www.amazon.com/OpenGL-ES-2-0-Programming-Guide-ebook/dp/B004Z6EW5O 3. https://developer.apple.com/library/content/documentation/3DDrawing/Conceptual/OpenGLES_Prog rammingGuide/Introduction/Introduction.html 4. https://developer.android.com/training/graphics/opengl/index.html
  • 37. Android sample on GitHub https://github.com/AlexanderKozubets/opengl-sample-android
  • 38. Thank you for attention!