Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
introduction to TextureView + OpenGL ES
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Daichi Furiya (Wasabeef)
November 06, 2015
Programming
1.2k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
introduction to TextureView + OpenGL ES
Daichi Furiya (Wasabeef)
November 06, 2015
Transcript
26 slides
TextureView OpenGL ES Wasabeef
About Me @wasabeef_jp AbemaTV, Inc. (CyberAgent, Inc.)
What would you like to do?
What would you like to do? ・3D Graphics Game (Unity,
Unreal Engine, Cocos2d-x) ・Filter (Camera, Image, Movie)
OpenGL ES by Khronos Group
OpenGL ES “Android includes support for high performance 2D and
3D graphics with the Open Graphics Library (OpenGL®), specifically, the OpenGL ES API.”
OpenGL ES ・OpenGL ES 1.0/1.1 - API level 1+ ・OpenGL
ES 2.0 - API level 8+ ・OpenGL ES 3.0 - API level 18+ ・OpenGL ES 3.1 - API level 21+
Vulkan by Khronos Group
Vulkan
Surface
SurfaceView
SurfaceHolder
SurfaceHolder public class MySurfaceView extends SurfaceView { public MySurfaceView(Context context)
{ super(context); SurfaceHolder holder = this.getHolder(); } }
SurfaceHolder.Callback public class MySurfaceView extends SurfaceView implements SurfaceHolder.Callback { public
MySurfaceView(Context context) { super(context); getHolder().addCallback(this); } @Override public void surfaceCreated(SurfaceHolder arg0) { /***/ } @Override public void surfaceChanged( SurfaceHolder arg0, int arg1, int arg2, int arg3) { /***/ } @Override public void surfaceDestroyed(SurfaceHolder arg0) { /***/ } }
GLSurfaceView
TextureView
SurfaceTexture
SurfaceTextureListener
SurfaceTextureListener private class MySurfaceTextureListener implements SurfaceTextureListener { @Override public void
onSurfaceTextureAvailable( SurfaceTexture surface, int width, int height) { /***/ } @Override public void onSurfaceTextureSizeChanged( SurfaceTexture surface, int width, int height) { /***/ } @Override public boolean onSurfaceTextureDestroyed( SurfaceTexture surface) { /***/ } @Override public void onSurfaceTextureUpdated( SurfaceTexture surface) { /***/ } }
GLTextureView http://bit.ly/1RAnLrw
Shader
Shader public static final String SAMPLE_SHADER = "" + "void
main()\n" + "{\n" + " gl_FragColor =vec4(1.0, 0.0, 0.0, 1.0)\n” + "}";
Shader public static final String COLOR_SHADER = "" + "varying
highp vec2 textureCoordinate;\n" + "uniform sampler2D inputImageTexture;\n" + "uniform lowp mat4 colorMatrix;\n" + "uniform lowp float intensity;\n" + "void main()\n" + "{\n" + " lowp vec4 textureColor = texture2D(inputImageTexture, textureCoordinate);\n" + " lowp vec4 outputColor = textureColor * colorMatrix;\n" + " gl_FragColor = (intensity * outputColor) + ((1.0 - intensity) * textureColor);\n" + "}";
Shader private static int loadShader(int type, String src) { int
shader = GLES20.glCreateShader(type); if (shader != 0) { GLES20.glShaderSource(shader, src); GLES20.glCompileShader(shader); int[] compiled = new int[1]; GLES20.glGetShaderiv( shader, GLES20.GL_COMPILE_STATUS, compiled, 0); if (compiled[0] == 0) { GLES20.glDeleteShader(shader); shader = 0; } } return shader; }
Summary ・OpenGL ES2 (API level 8+) ・TextureView (API level 14+)
・SurfaceTexture ・SurfaceTextureListener ・GLTextureView (Custom) ・Shader (GLSL)
Thanks.
More Decks by Daichi Furiya (Wasabeef)
See All by Daichi Furiya (Wasabeef)
DevFest Tokyo 2025 - Flutter のアプリアーキテクチャ現在地点
wasabeef
6
3k
About Flutter Architecture
wasabeef
1
350
2023 Flutter/Dart Summary
wasabeef
0
150
I/O Extended 2023 - Dart と Flutter の新機能
wasabeef
0
250
I/O Extended 2023 - Flutter 活用事例
wasabeef
10
3.2k
What it Takes to be a Flutter Developer
wasabeef
0
280
FlutterKaigi 2022 Keynote
wasabeef
1
770
Flutter Hooks を使ったアプリ開発 / App Development with the Flutter Hooks
wasabeef
2
1.6k
Flutter 2021 の振り返りと今後のアプリ開発に向けて / Looking back on Flutter 2021 and for future app development.
wasabeef
4
2.3k
Other Decks in Programming
See All in Programming
Будущее локальных LLM – Алексей Голобурдин, PythoNN
sobolevn
0
120
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
300
社内AIエージェント「Askワンバン」における コストチューニングの取り組み
t0yohei
0
170
선언형 햅틱 라이브러리 진동을 소개합니다
l2hyunwoo
1
310
AIがコードを書いてくれる時代、我々は何を確かめるのか
yosuke_furukawa
PRO
13
5.9k
Web Framework Benchmark Battle 2026, Any%
a_matsuda
3
3.2k
Spec-driven Development with AI
simas
PRO
0
2.3k
Growing PicoRuby's Ecosystem on ESP32
yuuu
2
130
Coding with AI: How to trust the storyteller (AWS Community Day Adria, Ljubljana 2026)
slobodan
0
140
Modernizing iOS Apps
seyfoyun
0
150
地方こそサーバーレス — 10年続けた、顔が見えるチームで確かな基盤を / Serverless Matters Most in Regional Areas — 10 Years of Building Reliable Foundations with Close-Knit Teams
seike460
PRO
1
440
私なりのハーネスエンジニアリング ~独自の言語処理系の開発を通して~
seosoft
0
200
Featured
See All Featured
How to build a perfect <img>
jonoalderson
1
6.2k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.4k
We Are The Robots
honzajavorek
0
440
sira's awesome portfolio website redesign presentation
elsirapls
0
510
Between Models and Reality
mayunak
4
580
Deep Space Network (abreviated)
tonyrice
0
410
The Mindset for Success: Future Career Progression
greggifford
PRO
0
560
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.9k
Mobile First: as difficult as doing things right
swwweet
225
10k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
2
3.9k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.3k
Navigating Weather and Climate Data
rabernat
0
590