├── FFmpeg工具
├── RawViewer.exe
├── libfaac
│ ├── include
│ │ ├── faac.h
│ │ └── faaccfg.h
│ └── lib
│ │ └── libfaac.a
├── librtmp
│ ├── include
│ │ ├── amf.h
│ │ ├── http.h
│ │ ├── log.h
│ │ └── rtmp.h
│ └── lib
│ │ └── librtmp.a
├── libx264
│ ├── include
│ │ ├── x264.h
│ │ └── x264_config.h
│ └── lib
│ │ └── libx264.a
├── libyuv
│ ├── include
│ │ ├── libyuv.h
│ │ └── libyuv
│ │ │ ├── basic_types.h
│ │ │ ├── compare.h
│ │ │ ├── convert.h
│ │ │ ├── convert_argb.h
│ │ │ ├── convert_from.h
│ │ │ ├── convert_from_argb.h
│ │ │ ├── cpu_id.h
│ │ │ ├── format_conversion.h
│ │ │ ├── mjpeg_decoder.h
│ │ │ ├── planar_functions.h
│ │ │ ├── rotate.h
│ │ │ ├── rotate_argb.h
│ │ │ ├── row.h
│ │ │ ├── scale.h
│ │ │ ├── scale_argb.h
│ │ │ ├── scale_row.h
│ │ │ ├── version.h
│ │ │ └── video_common.h
│ └── lib
│ │ └── libyuv.a
└── yuvplayer.exe
├── OpenGLES01-环境搭建
├── .DS_Store
├── OpenGLES01-环境搭建.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── qinmin.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── qinmin.xcuserdatad
│ │ ├── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ ├── OpenGLES01-环境搭建.xcscheme
│ │ └── xcschememanagement.plist
├── OpenGLES01-环境搭建
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Base.lproj
│ │ ├── .DS_Store
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ ├── Info.plist
│ ├── OpenGLESView.h
│ ├── OpenGLESView.m
│ ├── ViewController.h
│ ├── ViewController.m
│ └── main.m
├── OpenGLES01-环境搭建Tests
│ ├── Info.plist
│ └── OpenGLES01_____Tests.m
└── OpenGLES01-环境搭建UITests
│ ├── Info.plist
│ └── OpenGLES01_____UITests.m
├── OpenGLES02-着色器
├── .DS_Store
├── OpenGLES02-着色器.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── qinmin.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── qinmin.xcuserdatad
│ │ ├── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ ├── OpenGLES02-着色器.xcscheme
│ │ └── xcschememanagement.plist
├── OpenGLES02-着色器
│ ├── .DS_Store
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ ├── Info.plist
│ ├── OpenGLESView.h
│ ├── OpenGLESView.m
│ ├── Shader
│ │ ├── frag.glsl
│ │ └── vert.glsl
│ ├── Utils
│ │ ├── GLUtil.c
│ │ └── GLUtil.h
│ ├── ViewController.h
│ ├── ViewController.m
│ └── main.m
├── OpenGLES02-着色器Tests
│ ├── Info.plist
│ └── OpenGLES02____Tests.m
└── OpenGLES02-着色器UITests
│ ├── Info.plist
│ └── OpenGLES02____UITests.m
├── OpenGLES03-绘制球形
├── OpenGLES03-绘制球形.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── qinmin.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── qinmin.xcuserdatad
│ │ ├── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ ├── OpenGLES03-绘制球形.xcscheme
│ │ └── xcschememanagement.plist
├── OpenGLES03-绘制球形
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ ├── Info.plist
│ ├── OpenGLESView.h
│ ├── OpenGLESView.m
│ ├── Shader
│ │ ├── frag.glsl
│ │ └── vert.glsl
│ ├── Utils
│ │ ├── GLUtil.c
│ │ └── GLUtil.h
│ ├── ViewController.h
│ ├── ViewController.m
│ └── main.m
├── OpenGLES03-绘制球形Tests
│ ├── Info.plist
│ └── OpenGLES03_____Tests.m
└── OpenGLES03-绘制球形UITests
│ ├── Info.plist
│ └── OpenGLES03_____UITests.m
├── OpenGLES04-缓存技术
├── OpenGLES04-缓存技术.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── qinmin.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── qinmin.xcuserdatad
│ │ ├── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ ├── OpenGLES04-缓存技术.xcscheme
│ │ └── xcschememanagement.plist
├── OpenGLES04-缓存技术
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ ├── Info.plist
│ ├── OpenGLESView.h
│ ├── OpenGLESView.m
│ ├── Shader
│ │ ├── frag.glsl
│ │ └── vert.glsl
│ ├── Utils
│ │ ├── GLUtil.c
│ │ ├── GLUtil.h
│ │ ├── UIImage+GLES.h
│ │ └── UIImage+GLES.m
│ ├── ViewController.h
│ ├── ViewController.m
│ └── main.m
├── OpenGLES04-缓存技术Tests
│ ├── Info.plist
│ └── OpenGLES04_____Tests.m
└── OpenGLES04-缓存技术UITests
│ ├── Info.plist
│ └── OpenGLES04_____UITests.m
├── OpenGLES05-纹理贴图
├── OpenGLES05-纹理贴图.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── qinmin.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── qinmin.xcuserdatad
│ │ ├── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ ├── OpenGLES05-纹理贴图.xcscheme
│ │ └── xcschememanagement.plist
├── OpenGLES05-纹理贴图
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ ├── Info.plist
│ ├── OpenGLESView.h
│ ├── OpenGLESView.m
│ ├── Shader
│ │ ├── frag.glsl
│ │ └── vert.glsl
│ ├── Utils
│ │ ├── GLUtil.c
│ │ ├── GLUtil.h
│ │ └── jpeg
│ │ │ ├── JpegUtil.c
│ │ │ ├── JpegUtil.h
│ │ │ ├── include
│ │ │ ├── android
│ │ │ │ ├── jconfig.h
│ │ │ │ ├── jerror.h
│ │ │ │ ├── jmorecfg.h
│ │ │ │ └── jpeglib.h
│ │ │ └── ios
│ │ │ │ ├── jconfig.h
│ │ │ │ ├── jerror.h
│ │ │ │ ├── jmorecfg.h
│ │ │ │ └── jpeglib.h
│ │ │ └── prebuilt
│ │ │ ├── android
│ │ │ ├── Android.mk
│ │ │ ├── arm64-v8a
│ │ │ │ └── libjpeg.a
│ │ │ ├── armeabi-v7a
│ │ │ │ └── libjpeg.a
│ │ │ ├── armeabi
│ │ │ │ └── libjpeg.a
│ │ │ └── x86
│ │ │ │ └── libjpeg.a
│ │ │ └── ios
│ │ │ └── libjpeg.a
│ ├── ViewController.h
│ ├── ViewController.m
│ ├── flower.jpg
│ ├── main.m
│ ├── pic.jpg
│ └── wood.jpg
├── OpenGLES05-纹理贴图Tests
│ ├── Info.plist
│ └── OpenGLES05_____Tests.m
└── OpenGLES05-纹理贴图UITests
│ ├── Info.plist
│ └── OpenGLES05_____UITests.m
├── OpenGLES06-图像膨胀腐蚀模糊
├── OpenGLES06-图像膨胀腐蚀模糊.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ ├── mac.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ │ │ └── qinmin.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ ├── mac.xcuserdatad
│ │ ├── xcdebugger
│ │ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ │ ├── OpenGLES06-图像膨胀腐蚀模糊.xcscheme
│ │ │ └── xcschememanagement.plist
│ │ └── qinmin.xcuserdatad
│ │ └── xcschemes
│ │ ├── OpenGLES06-图像膨胀腐蚀模糊.xcscheme
│ │ └── xcschememanagement.plist
├── OpenGLES06-图像膨胀腐蚀模糊
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ ├── Info.plist
│ ├── OpenGLESView.h
│ ├── OpenGLESView.m
│ ├── Shader
│ │ ├── blur_frag.glsl
│ │ ├── blur_vert.glsl
│ │ ├── corrode_frag.glsl
│ │ ├── corrode_vert.glsl
│ │ ├── expand_frag.glsl
│ │ ├── expand_vert.glsl
│ │ ├── frag.glsl
│ │ └── vert.glsl
│ ├── Utils
│ │ ├── GLUtil.c
│ │ ├── GLUtil.h
│ │ ├── TextureUtil.c
│ │ ├── TextureUtil.h
│ │ ├── jpeg
│ │ │ ├── JpegUtil.c
│ │ │ ├── JpegUtil.h
│ │ │ ├── include
│ │ │ │ ├── android
│ │ │ │ │ ├── jconfig.h
│ │ │ │ │ ├── jerror.h
│ │ │ │ │ ├── jmorecfg.h
│ │ │ │ │ └── jpeglib.h
│ │ │ │ └── ios
│ │ │ │ │ ├── jconfig.h
│ │ │ │ │ ├── jerror.h
│ │ │ │ │ ├── jmorecfg.h
│ │ │ │ │ └── jpeglib.h
│ │ │ └── prebuilt
│ │ │ │ ├── android
│ │ │ │ ├── Android.mk
│ │ │ │ ├── arm64-v8a
│ │ │ │ │ └── libjpeg.a
│ │ │ │ ├── armeabi-v7a
│ │ │ │ │ └── libjpeg.a
│ │ │ │ ├── armeabi
│ │ │ │ │ └── libjpeg.a
│ │ │ │ └── x86
│ │ │ │ │ └── libjpeg.a
│ │ │ │ └── ios
│ │ │ │ └── libjpeg.a
│ │ └── png
│ │ │ ├── PngUtil.c
│ │ │ ├── PngUtil.h
│ │ │ ├── include
│ │ │ ├── android
│ │ │ │ ├── png.h
│ │ │ │ ├── pngconf.h
│ │ │ │ └── pnglibconf.h
│ │ │ └── ios
│ │ │ │ ├── png.h
│ │ │ │ ├── pngconf.h
│ │ │ │ └── pnglibconf.h
│ │ │ └── prebuilt
│ │ │ ├── android
│ │ │ ├── Android.mk
│ │ │ ├── arm64-v8a
│ │ │ │ └── libpng.a
│ │ │ ├── armeabi-v7a
│ │ │ │ └── libpng.a
│ │ │ ├── armeabi
│ │ │ │ └── libpng.a
│ │ │ └── x86
│ │ │ │ └── libpng.a
│ │ │ └── ios
│ │ │ └── libpng.a
│ ├── ViewController.h
│ ├── ViewController.m
│ ├── main.m
│ └── wood.jpg
├── OpenGLES06-图像膨胀腐蚀模糊Tests
│ ├── Info.plist
│ └── OpenGLES06_________Tests.m
└── OpenGLES06-图像膨胀腐蚀模糊UITests
│ ├── Info.plist
│ └── OpenGLES06_________UITests.m
├── OpenGLES07-像素的代数运算
├── OpenGLES07-像素的代数运算.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── qinmin.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── qinmin.xcuserdatad
│ │ └── xcschemes
│ │ ├── OpenGLES07-像素的代数运算.xcscheme
│ │ └── xcschememanagement.plist
├── OpenGLES07-像素的代数运算
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ ├── Info.plist
│ ├── OpenGLESView.h
│ ├── OpenGLESView.m
│ ├── Shader
│ │ ├── frag.glsl
│ │ └── vert.glsl
│ ├── Utils
│ │ ├── GLUtil.c
│ │ ├── GLUtil.h
│ │ ├── TextureUtil.c
│ │ ├── TextureUtil.h
│ │ ├── jpeg
│ │ │ ├── JpegUtil.c
│ │ │ ├── JpegUtil.h
│ │ │ ├── include
│ │ │ │ ├── android
│ │ │ │ │ ├── jconfig.h
│ │ │ │ │ ├── jerror.h
│ │ │ │ │ ├── jmorecfg.h
│ │ │ │ │ └── jpeglib.h
│ │ │ │ └── ios
│ │ │ │ │ ├── jconfig.h
│ │ │ │ │ ├── jerror.h
│ │ │ │ │ ├── jmorecfg.h
│ │ │ │ │ └── jpeglib.h
│ │ │ └── prebuilt
│ │ │ │ ├── android
│ │ │ │ ├── Android.mk
│ │ │ │ ├── arm64-v8a
│ │ │ │ │ └── libjpeg.a
│ │ │ │ ├── armeabi-v7a
│ │ │ │ │ └── libjpeg.a
│ │ │ │ ├── armeabi
│ │ │ │ │ └── libjpeg.a
│ │ │ │ └── x86
│ │ │ │ │ └── libjpeg.a
│ │ │ │ └── ios
│ │ │ │ └── libjpeg.a
│ │ └── png
│ │ │ ├── PngUtil.c
│ │ │ ├── PngUtil.h
│ │ │ ├── include
│ │ │ ├── android
│ │ │ │ ├── png.h
│ │ │ │ ├── pngconf.h
│ │ │ │ └── pnglibconf.h
│ │ │ └── ios
│ │ │ │ ├── png.h
│ │ │ │ ├── pngconf.h
│ │ │ │ └── pnglibconf.h
│ │ │ └── prebuilt
│ │ │ ├── android
│ │ │ ├── Android.mk
│ │ │ ├── arm64-v8a
│ │ │ │ └── libpng.a
│ │ │ ├── armeabi-v7a
│ │ │ │ └── libpng.a
│ │ │ ├── armeabi
│ │ │ │ └── libpng.a
│ │ │ └── x86
│ │ │ │ └── libpng.a
│ │ │ └── ios
│ │ │ └── libpng.a
│ ├── ViewController.h
│ ├── ViewController.m
│ ├── flower.jpg
│ ├── main.m
│ └── wood.jpg
├── OpenGLES07-像素的代数运算Tests
│ ├── Info.plist
│ └── OpenGLES07________Tests.m
└── OpenGLES07-像素的代数运算UITests
│ ├── Info.plist
│ └── OpenGLES07________UITests.m
├── OpenGLES08-图像边缘检测
├── OpenGLES08-图像边缘检测.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── qinmin.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── qinmin.xcuserdatad
│ │ └── xcschemes
│ │ ├── OpenGLES08-图像边缘检测.xcscheme
│ │ └── xcschememanagement.plist
├── OpenGLES08-图像边缘检测
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ ├── Info.plist
│ ├── ViewController.h
│ ├── ViewController.m
│ └── main.m
├── OpenGLES08-图像边缘检测Tests
│ ├── Info.plist
│ └── OpenGLES08_______Tests.m
└── OpenGLES08-图像边缘检测UITests
│ ├── Info.plist
│ └── OpenGLES08_______UITests.m
├── OpenGLES09-GLSL实现常见特效
├── OpenGLES09-GLSL实现常见特效.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── qinmin.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── qinmin.xcuserdatad
│ │ ├── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ ├── OpenGLES09-GLSL实现常见特效.xcscheme
│ │ └── xcschememanagement.plist
├── OpenGLES09-GLSL实现常见特效
│ ├── 1.jpg
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ ├── Info.plist
│ ├── OpenGLESView.h
│ ├── OpenGLESView.m
│ ├── Shader
│ │ ├── cameo.glsl
│ │ ├── cirlce.glsl
│ │ ├── frag.glsl
│ │ ├── gray.glsl
│ │ ├── mosaic.glsl
│ │ ├── upsidedown.glsl
│ │ ├── vert.glsl
│ │ └── watercolor.glsl
│ ├── Utils
│ │ ├── GLUtil.c
│ │ ├── GLUtil.h
│ │ ├── TextureUtil.c
│ │ ├── TextureUtil.h
│ │ ├── jpeg
│ │ │ ├── JpegUtil.c
│ │ │ ├── JpegUtil.h
│ │ │ ├── include
│ │ │ │ ├── android
│ │ │ │ │ ├── jconfig.h
│ │ │ │ │ ├── jerror.h
│ │ │ │ │ ├── jmorecfg.h
│ │ │ │ │ └── jpeglib.h
│ │ │ │ └── ios
│ │ │ │ │ ├── jconfig.h
│ │ │ │ │ ├── jerror.h
│ │ │ │ │ ├── jmorecfg.h
│ │ │ │ │ └── jpeglib.h
│ │ │ └── prebuilt
│ │ │ │ ├── android
│ │ │ │ ├── Android.mk
│ │ │ │ ├── arm64-v8a
│ │ │ │ │ └── libjpeg.a
│ │ │ │ ├── armeabi-v7a
│ │ │ │ │ └── libjpeg.a
│ │ │ │ ├── armeabi
│ │ │ │ │ └── libjpeg.a
│ │ │ │ └── x86
│ │ │ │ │ └── libjpeg.a
│ │ │ │ └── ios
│ │ │ │ └── libjpeg.a
│ │ └── png
│ │ │ ├── PngUtil.c
│ │ │ ├── PngUtil.h
│ │ │ ├── include
│ │ │ ├── android
│ │ │ │ ├── png.h
│ │ │ │ ├── pngconf.h
│ │ │ │ └── pnglibconf.h
│ │ │ └── ios
│ │ │ │ ├── png.h
│ │ │ │ ├── pngconf.h
│ │ │ │ └── pnglibconf.h
│ │ │ └── prebuilt
│ │ │ ├── android
│ │ │ ├── Android.mk
│ │ │ ├── arm64-v8a
│ │ │ │ └── libpng.a
│ │ │ ├── armeabi-v7a
│ │ │ │ └── libpng.a
│ │ │ ├── armeabi
│ │ │ │ └── libpng.a
│ │ │ └── x86
│ │ │ │ └── libpng.a
│ │ │ └── ios
│ │ │ └── libpng.a
│ ├── ViewController.h
│ ├── ViewController.m
│ ├── flower.jpg
│ ├── main.m
│ ├── noise.jpg
│ └── wood.jpg
├── OpenGLES09-GLSL实现常见特效Tests
│ ├── Info.plist
│ └── OpenGLES09_GLSL______Tests.m
└── OpenGLES09-GLSL实现常见特效UITests
│ ├── Info.plist
│ └── OpenGLES09_GLSL______UITests.m
├── OpenGLES10-Instance技术
├── OpenGLES10-Instance技术.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── qinmin.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── qinmin.xcuserdatad
│ │ └── xcschemes
│ │ ├── OpenGLES10-Instance技术.xcscheme
│ │ └── xcschememanagement.plist
├── OpenGLES10-Instance技术
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ ├── Info.plist
│ ├── OpenGLESView.h
│ ├── OpenGLESView.m
│ ├── Shader
│ │ ├── frag.glsl
│ │ └── vert.glsl
│ ├── Utils
│ │ ├── GLUtil.c
│ │ ├── GLUtil.h
│ │ ├── TextureUtil.c
│ │ ├── TextureUtil.h
│ │ ├── jpeg
│ │ │ ├── JpegUtil.c
│ │ │ ├── JpegUtil.h
│ │ │ ├── include
│ │ │ │ ├── android
│ │ │ │ │ ├── jconfig.h
│ │ │ │ │ ├── jerror.h
│ │ │ │ │ ├── jmorecfg.h
│ │ │ │ │ └── jpeglib.h
│ │ │ │ └── ios
│ │ │ │ │ ├── jconfig.h
│ │ │ │ │ ├── jerror.h
│ │ │ │ │ ├── jmorecfg.h
│ │ │ │ │ └── jpeglib.h
│ │ │ └── prebuilt
│ │ │ │ ├── android
│ │ │ │ ├── Android.mk
│ │ │ │ ├── arm64-v8a
│ │ │ │ │ └── libjpeg.a
│ │ │ │ ├── armeabi-v7a
│ │ │ │ │ └── libjpeg.a
│ │ │ │ ├── armeabi
│ │ │ │ │ └── libjpeg.a
│ │ │ │ └── x86
│ │ │ │ │ └── libjpeg.a
│ │ │ │ └── ios
│ │ │ │ └── libjpeg.a
│ │ └── png
│ │ │ ├── PngUtil.c
│ │ │ ├── PngUtil.h
│ │ │ ├── include
│ │ │ ├── android
│ │ │ │ ├── png.h
│ │ │ │ ├── pngconf.h
│ │ │ │ └── pnglibconf.h
│ │ │ └── ios
│ │ │ │ ├── png.h
│ │ │ │ ├── pngconf.h
│ │ │ │ └── pnglibconf.h
│ │ │ └── prebuilt
│ │ │ ├── android
│ │ │ ├── Android.mk
│ │ │ ├── arm64-v8a
│ │ │ │ └── libpng.a
│ │ │ ├── armeabi-v7a
│ │ │ │ └── libpng.a
│ │ │ ├── armeabi
│ │ │ │ └── libpng.a
│ │ │ └── x86
│ │ │ │ └── libpng.a
│ │ │ └── ios
│ │ │ └── libpng.a
│ ├── ViewController.h
│ ├── ViewController.m
│ ├── main.m
│ └── wood.jpg
├── OpenGLES10-Instance技术Tests
│ ├── Info.plist
│ └── OpenGLES10_Instance__Tests.m
└── OpenGLES10-Instance技术UITests
│ ├── Info.plist
│ └── OpenGLES10_Instance__UITests.m
├── OpenGLES11-相机视频渲染
├── OpenGLES11-相机视频渲染.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ ├── mac.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ │ │ └── qinmin.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ ├── mac.xcuserdatad
│ │ ├── xcdebugger
│ │ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ │ ├── OpenGLES11-相机视频渲染.xcscheme
│ │ │ └── xcschememanagement.plist
│ │ └── qinmin.xcuserdatad
│ │ ├── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ ├── OpenGLES11-相机视频渲染.xcscheme
│ │ └── xcschememanagement.plist
├── OpenGLES11-相机视频渲染
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ ├── Info.plist
│ ├── OpenGLESView.h
│ ├── OpenGLESView.m
│ ├── Render
│ │ ├── GLRender.h
│ │ └── GLRender.m
│ ├── Shader
│ │ ├── frag.glsl
│ │ ├── frag_rgb.glsl
│ │ └── vert.glsl
│ ├── Texture
│ │ ├── GLTexture.h
│ │ └── GLTexture.m
│ ├── Utils
│ │ ├── GLUtil.c
│ │ └── GLUtil.h
│ ├── Vendors
│ │ └── libyuv
│ │ │ ├── include
│ │ │ ├── libyuv.h
│ │ │ └── libyuv
│ │ │ │ ├── basic_types.h
│ │ │ │ ├── compare.h
│ │ │ │ ├── convert.h
│ │ │ │ ├── convert_argb.h
│ │ │ │ ├── convert_from.h
│ │ │ │ ├── convert_from_argb.h
│ │ │ │ ├── cpu_id.h
│ │ │ │ ├── format_conversion.h
│ │ │ │ ├── mjpeg_decoder.h
│ │ │ │ ├── planar_functions.h
│ │ │ │ ├── rotate.h
│ │ │ │ ├── rotate_argb.h
│ │ │ │ ├── row.h
│ │ │ │ ├── scale.h
│ │ │ │ ├── scale_argb.h
│ │ │ │ ├── scale_row.h
│ │ │ │ ├── version.h
│ │ │ │ └── video_common.h
│ │ │ └── lib
│ │ │ └── libyuv.a
│ ├── ViewController.h
│ ├── ViewController.m
│ └── main.m
├── OpenGLES11-相机视频渲染Tests
│ ├── Info.plist
│ └── OpenGLES11_______Tests.m
└── OpenGLES11-相机视频渲染UITests
│ ├── Info.plist
│ └── OpenGLES11_______UITests.m
├── OpenGLES12-帧缓存
├── OpenGLES12-帧缓存.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── qinmin.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── qinmin.xcuserdatad
│ │ ├── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ ├── OpenGLES12-帧缓存.xcscheme
│ │ └── xcschememanagement.plist
├── OpenGLES12-帧缓存
│ ├── 1.jpg
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ ├── Info.plist
│ ├── OpenGLESView.h
│ ├── OpenGLESView.m
│ ├── Shader
│ │ ├── frag.glsl
│ │ ├── mosaic.glsl
│ │ └── vert.glsl
│ ├── Utils
│ │ ├── GLUtil.c
│ │ ├── GLUtil.h
│ │ └── jpeg
│ │ │ ├── JpegUtil.c
│ │ │ ├── JpegUtil.h
│ │ │ ├── include
│ │ │ └── ios
│ │ │ │ ├── jconfig.h
│ │ │ │ ├── jerror.h
│ │ │ │ ├── jmorecfg.h
│ │ │ │ └── jpeglib.h
│ │ │ └── prebuilt
│ │ │ └── ios
│ │ │ └── libjpeg.a
│ ├── ViewController.h
│ ├── ViewController.m
│ ├── flower.jpg
│ ├── main.m
│ ├── pic.jpg
│ └── wood.jpg
├── OpenGLES12-帧缓存Tests
│ ├── Info.plist
│ └── OpenGLES12____Tests.m
└── OpenGLES12-帧缓存UITests
│ ├── Info.plist
│ └── OpenGLES12____UITests.m
├── OpenGLES13-混合
├── OpenGLES13-混合.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ ├── mac.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ │ │ └── qinmin.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ ├── mac.xcuserdatad
│ │ ├── xcdebugger
│ │ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ │ ├── OpenGLES13-混合.xcscheme
│ │ │ └── xcschememanagement.plist
│ │ └── qinmin.xcuserdatad
│ │ ├── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ ├── OpenGLES13-混合.xcscheme
│ │ └── xcschememanagement.plist
├── OpenGLES13-混合
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ ├── Info.plist
│ ├── OpenGLESView.h
│ ├── OpenGLESView.m
│ ├── Shader
│ │ ├── frag.glsl
│ │ └── vert.glsl
│ ├── Utils
│ │ ├── GLUtil.c
│ │ ├── GLUtil.h
│ │ ├── PngUtil.c
│ │ ├── PngUtil.h
│ │ ├── jpeg
│ │ │ ├── JpegUtil.c
│ │ │ ├── JpegUtil.h
│ │ │ ├── include
│ │ │ │ └── ios
│ │ │ │ │ ├── jconfig.h
│ │ │ │ │ ├── jerror.h
│ │ │ │ │ ├── jmorecfg.h
│ │ │ │ │ └── jpeglib.h
│ │ │ └── prebuilt
│ │ │ │ └── ios
│ │ │ │ └── libjpeg.a
│ │ └── png
│ │ │ ├── include
│ │ │ └── ios
│ │ │ │ ├── png.h
│ │ │ │ ├── pngconf.h
│ │ │ │ └── pnglibconf.h
│ │ │ └── prebuilt
│ │ │ └── ios
│ │ │ └── libpng.a
│ ├── ViewController.h
│ ├── ViewController.m
│ ├── flower.jpg
│ ├── main.m
│ ├── pic.jpg
│ ├── text.png
│ ├── wood.jpg
│ └── wood.png
├── OpenGLES13-混合Tests
│ ├── Info.plist
│ └── OpenGLES13___Tests.m
└── OpenGLES13-混合UITests
│ ├── Info.plist
│ └── OpenGLES13___UITests.m
├── OpenGLES14-深度测试
├── OpenGLES14-深度测试.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── qinmin.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── qinmin.xcuserdatad
│ │ └── xcschemes
│ │ ├── OpenGLES14-深度测试.xcscheme
│ │ └── xcschememanagement.plist
├── OpenGLES14-深度测试
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ ├── Info.plist
│ ├── Math
│ │ ├── GLMath.c
│ │ ├── GLMath.h
│ │ ├── GLMathBezierCurve.c
│ │ ├── GLMathBezierCurve.h
│ │ ├── GLMathMatrix.c
│ │ ├── GLMathMatrix.h
│ │ ├── GLMathMatrixStack.c
│ │ ├── GLMathMatrixStack.h
│ │ ├── GLMathQuaternion.c
│ │ ├── GLMathQuaternion.h
│ │ ├── GLMathTransforms.c
│ │ ├── GLMathTransforms.h
│ │ ├── GLMathTypes.h
│ │ ├── GLMathUtilities.c
│ │ ├── GLMathUtilities.h
│ │ ├── GLMathUtilitiesInline.c
│ │ ├── GLMathVector.c
│ │ └── GLMathVector.h
│ ├── OpenGLESView.h
│ ├── OpenGLESView.m
│ ├── Shader
│ │ ├── frag.glsl
│ │ └── vert.glsl
│ ├── Utils
│ │ ├── GLUtil.c
│ │ ├── GLUtil.h
│ │ ├── jpeg
│ │ │ ├── JpegUtil.c
│ │ │ ├── JpegUtil.h
│ │ │ ├── include
│ │ │ │ └── ios
│ │ │ │ │ ├── jconfig.h
│ │ │ │ │ ├── jerror.h
│ │ │ │ │ ├── jmorecfg.h
│ │ │ │ │ └── jpeglib.h
│ │ │ └── prebuilt
│ │ │ │ └── ios
│ │ │ │ └── libjpeg.a
│ │ └── png
│ │ │ ├── PngUtil.c
│ │ │ ├── PngUtil.h
│ │ │ ├── include
│ │ │ └── ios
│ │ │ │ ├── png.h
│ │ │ │ ├── pngconf.h
│ │ │ │ └── pnglibconf.h
│ │ │ └── prebuilt
│ │ │ └── ios
│ │ │ └── libpng.a
│ ├── ViewController.h
│ ├── ViewController.m
│ ├── main.m
│ └── wood.jpg
├── OpenGLES14-深度测试Tests
│ ├── Info.plist
│ └── OpenGLES14_____Tests.m
└── OpenGLES14-深度测试UITests
│ ├── Info.plist
│ └── OpenGLES14_____UITests.m
└── README.md
/FFmpeg工具/RawViewer.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/FFmpeg工具/RawViewer.exe
--------------------------------------------------------------------------------
/FFmpeg工具/libfaac/lib/libfaac.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/FFmpeg工具/libfaac/lib/libfaac.a
--------------------------------------------------------------------------------
/FFmpeg工具/librtmp/lib/librtmp.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/FFmpeg工具/librtmp/lib/librtmp.a
--------------------------------------------------------------------------------
/FFmpeg工具/libx264/include/x264_config.h:
--------------------------------------------------------------------------------
1 | #define X264_BIT_DEPTH 8
2 | #define X264_GPL 1
3 | #define X264_INTERLACED 1
4 | #define X264_CHROMA_FORMAT 0
5 | #define X264_REV 2705
6 | #define X264_REV_DIFF 0
7 | #define X264_VERSION " r2705 3f5ed56"
8 | #define X264_POINTVER "0.148.2705 3f5ed56"
9 |
--------------------------------------------------------------------------------
/FFmpeg工具/libx264/lib/libx264.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/FFmpeg工具/libx264/lib/libx264.a
--------------------------------------------------------------------------------
/FFmpeg工具/libyuv/include/libyuv.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2011 The LibYuv Project Authors. All rights reserved.
3 | *
4 | * Use of this source code is governed by a BSD-style license
5 | * that can be found in the LICENSE file in the root of the source
6 | * tree. An additional intellectual property rights grant can be found
7 | * in the file PATENTS. All contributing project authors may
8 | * be found in the AUTHORS file in the root of the source tree.
9 | */
10 |
11 | #ifndef INCLUDE_LIBYUV_H_ // NOLINT
12 | #define INCLUDE_LIBYUV_H_
13 |
14 | #include "libyuv/basic_types.h"
15 | #include "libyuv/compare.h"
16 | #include "libyuv/convert.h"
17 | #include "libyuv/convert_argb.h"
18 | #include "libyuv/convert_from.h"
19 | #include "libyuv/convert_from_argb.h"
20 | #include "libyuv/cpu_id.h"
21 | #include "libyuv/format_conversion.h"
22 | #include "libyuv/mjpeg_decoder.h"
23 | #include "libyuv/planar_functions.h"
24 | #include "libyuv/rotate.h"
25 | #include "libyuv/rotate_argb.h"
26 | #include "libyuv/row.h"
27 | #include "libyuv/scale.h"
28 | #include "libyuv/scale_argb.h"
29 | #include "libyuv/scale_row.h"
30 | #include "libyuv/version.h"
31 | #include "libyuv/video_common.h"
32 |
33 | #endif // INCLUDE_LIBYUV_H_ NOLINT
34 |
--------------------------------------------------------------------------------
/FFmpeg工具/libyuv/include/libyuv/rotate_argb.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012 The LibYuv Project Authors. All rights reserved.
3 | *
4 | * Use of this source code is governed by a BSD-style license
5 | * that can be found in the LICENSE file in the root of the source
6 | * tree. An additional intellectual property rights grant can be found
7 | * in the file PATENTS. All contributing project authors may
8 | * be found in the AUTHORS file in the root of the source tree.
9 | */
10 |
11 | #ifndef INCLUDE_LIBYUV_ROTATE_ARGB_H_ // NOLINT
12 | #define INCLUDE_LIBYUV_ROTATE_ARGB_H_
13 |
14 | #include "libyuv/basic_types.h"
15 | #include "libyuv/rotate.h" // For RotationMode.
16 |
17 | #ifdef __cplusplus
18 | namespace libyuv {
19 | extern "C" {
20 | #endif
21 |
22 | // Rotate ARGB frame
23 | LIBYUV_API
24 | int ARGBRotate(const uint8* src_argb, int src_stride_argb,
25 | uint8* dst_argb, int dst_stride_argb,
26 | int src_width, int src_height, enum RotationMode mode);
27 |
28 | #ifdef __cplusplus
29 | } // extern "C"
30 | } // namespace libyuv
31 | #endif
32 |
33 | #endif // INCLUDE_LIBYUV_ROTATE_ARGB_H_ NOLINT
34 |
--------------------------------------------------------------------------------
/FFmpeg工具/libyuv/include/libyuv/version.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012 The LibYuv Project Authors. All rights reserved.
3 | *
4 | * Use of this source code is governed by a BSD-style license
5 | * that can be found in the LICENSE file in the root of the source
6 | * tree. An additional intellectual property rights grant can be found
7 | * in the file PATENTS. All contributing project authors may
8 | * be found in the AUTHORS file in the root of the source tree.
9 | */
10 |
11 | #ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
12 | #define INCLUDE_LIBYUV_VERSION_H_
13 |
14 | #define LIBYUV_VERSION 1170
15 |
16 | #endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
17 |
--------------------------------------------------------------------------------
/FFmpeg工具/libyuv/lib/libyuv.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/FFmpeg工具/libyuv/lib/libyuv.a
--------------------------------------------------------------------------------
/FFmpeg工具/yuvplayer.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/FFmpeg工具/yuvplayer.exe
--------------------------------------------------------------------------------
/OpenGLES01-环境搭建/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES01-环境搭建/.DS_Store
--------------------------------------------------------------------------------
/OpenGLES01-环境搭建/OpenGLES01-环境搭建.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/OpenGLES01-环境搭建/OpenGLES01-环境搭建.xcodeproj/project.xcworkspace/xcuserdata/qinmin.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES01-环境搭建/OpenGLES01-环境搭建.xcodeproj/project.xcworkspace/xcuserdata/qinmin.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/OpenGLES01-环境搭建/OpenGLES01-环境搭建.xcodeproj/xcuserdata/qinmin.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/OpenGLES01-环境搭建/OpenGLES01-环境搭建.xcodeproj/xcuserdata/qinmin.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | OpenGLES01-环境搭建.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | B9FB2FD91E4C140E002BECC1
16 |
17 | primary
18 |
19 |
20 | B9FB2FF21E4C140E002BECC1
21 |
22 | primary
23 |
24 |
25 | B9FB2FFD1E4C140E002BECC1
26 |
27 | primary
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/OpenGLES01-环境搭建/OpenGLES01-环境搭建/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // OpenGLES01-环境搭建
4 | //
5 | // Created by qinmin on 2017/2/9.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/OpenGLES01-环境搭建/OpenGLES01-环境搭建/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/OpenGLES01-环境搭建/OpenGLES01-环境搭建/Base.lproj/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES01-环境搭建/OpenGLES01-环境搭建/Base.lproj/.DS_Store
--------------------------------------------------------------------------------
/OpenGLES01-环境搭建/OpenGLES01-环境搭建/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/OpenGLES01-环境搭建/OpenGLES01-环境搭建/OpenGLESView.h:
--------------------------------------------------------------------------------
1 | //
2 | // OpenGLESView.h
3 | // OpenGLES01-环境搭建
4 | //
5 | // Created by qinmin on 2017/2/9.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface OpenGLESView : UIView
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/OpenGLES01-环境搭建/OpenGLES01-环境搭建/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // OpenGLES01-环境搭建
4 | //
5 | // Created by qinmin on 2017/2/9.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/OpenGLES01-环境搭建/OpenGLES01-环境搭建/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // OpenGLES01-环境搭建
4 | //
5 | // Created by qinmin on 2017/2/9.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 | #import "OpenGLESView.h"
11 |
12 | @interface ViewController ()
13 |
14 | @end
15 |
16 | @implementation ViewController
17 |
18 | - (void)viewDidLoad {
19 | [super viewDidLoad];
20 | self.view = [[OpenGLESView alloc] initWithFrame:self.view.bounds];
21 | }
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/OpenGLES01-环境搭建/OpenGLES01-环境搭建/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // OpenGLES01-环境搭建
4 | //
5 | // Created by qinmin on 2017/2/9.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/OpenGLES01-环境搭建/OpenGLES01-环境搭建Tests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/OpenGLES01-环境搭建/OpenGLES01-环境搭建Tests/OpenGLES01_____Tests.m:
--------------------------------------------------------------------------------
1 | //
2 | // OpenGLES01_____Tests.m
3 | // OpenGLES01-环境搭建Tests
4 | //
5 | // Created by qinmin on 2017/2/9.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface OpenGLES01_____Tests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation OpenGLES01_____Tests
16 |
17 | - (void)setUp {
18 | [super setUp];
19 | // Put setup code here. This method is called before the invocation of each test method in the class.
20 | }
21 |
22 | - (void)tearDown {
23 | // Put teardown code here. This method is called after the invocation of each test method in the class.
24 | [super tearDown];
25 | }
26 |
27 | - (void)testExample {
28 | // This is an example of a functional test case.
29 | // Use XCTAssert and related functions to verify your tests produce the correct results.
30 | }
31 |
32 | - (void)testPerformanceExample {
33 | // This is an example of a performance test case.
34 | [self measureBlock:^{
35 | // Put the code you want to measure the time of here.
36 | }];
37 | }
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/OpenGLES01-环境搭建/OpenGLES01-环境搭建UITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/OpenGLES02-着色器/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES02-着色器/.DS_Store
--------------------------------------------------------------------------------
/OpenGLES02-着色器/OpenGLES02-着色器.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/OpenGLES02-着色器/OpenGLES02-着色器.xcodeproj/project.xcworkspace/xcuserdata/qinmin.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES02-着色器/OpenGLES02-着色器.xcodeproj/project.xcworkspace/xcuserdata/qinmin.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/OpenGLES02-着色器/OpenGLES02-着色器.xcodeproj/xcuserdata/qinmin.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/OpenGLES02-着色器/OpenGLES02-着色器.xcodeproj/xcuserdata/qinmin.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | OpenGLES02-着色器.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | B91304ED1E4D633B008984D0
16 |
17 | primary
18 |
19 |
20 | B91305061E4D633C008984D0
21 |
22 | primary
23 |
24 |
25 | B91305111E4D633C008984D0
26 |
27 | primary
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/OpenGLES02-着色器/OpenGLES02-着色器/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES02-着色器/OpenGLES02-着色器/.DS_Store
--------------------------------------------------------------------------------
/OpenGLES02-着色器/OpenGLES02-着色器/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // OpenGLES02-着色器
4 | //
5 | // Created by qinmin on 2017/2/10.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/OpenGLES02-着色器/OpenGLES02-着色器/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/OpenGLES02-着色器/OpenGLES02-着色器/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/OpenGLES02-着色器/OpenGLES02-着色器/OpenGLESView.h:
--------------------------------------------------------------------------------
1 | //
2 | // OpenGLESView.h
3 | // OpenGLES02-着色器
4 | //
5 | // Created by qinmin on 2017/2/9.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface OpenGLESView : UIView
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/OpenGLES02-着色器/OpenGLES02-着色器/Shader/frag.glsl:
--------------------------------------------------------------------------------
1 | precision mediump float;
2 |
3 | varying vec3 outColor;
4 |
5 | void main()
6 | {
7 | gl_FragColor = vec4(outColor, 1.0);
8 | }
9 |
--------------------------------------------------------------------------------
/OpenGLES02-着色器/OpenGLES02-着色器/Shader/vert.glsl:
--------------------------------------------------------------------------------
1 | attribute vec3 position;
2 | attribute vec3 color;
3 |
4 | varying vec3 outColor;
5 |
6 | void main()
7 | {
8 | gl_Position = vec4(position, 1.0);
9 | outColor = color;
10 | }
11 |
--------------------------------------------------------------------------------
/OpenGLES02-着色器/OpenGLES02-着色器/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // OpenGLES02-着色器
4 | //
5 | // Created by qinmin on 2017/2/9.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/OpenGLES02-着色器/OpenGLES02-着色器/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // OpenGLES02-着色器
4 | //
5 | // Created by qinmin on 2017/2/9.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 | #import "OpenGLESView.h"
11 |
12 | @interface ViewController ()
13 |
14 | @end
15 |
16 | @implementation ViewController
17 |
18 | - (void)viewDidLoad {
19 | [super viewDidLoad];
20 | self.view = [[OpenGLESView alloc] initWithFrame:self.view.bounds];
21 | }
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/OpenGLES02-着色器/OpenGLES02-着色器/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // OpenGLES02-着色器
4 | //
5 | // Created by qinmin on 2017/2/10.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/OpenGLES02-着色器/OpenGLES02-着色器Tests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/OpenGLES02-着色器/OpenGLES02-着色器Tests/OpenGLES02____Tests.m:
--------------------------------------------------------------------------------
1 | //
2 | // OpenGLES02____Tests.m
3 | // OpenGLES02-着色器Tests
4 | //
5 | // Created by qinmin on 2017/2/10.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface OpenGLES02____Tests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation OpenGLES02____Tests
16 |
17 | - (void)setUp {
18 | [super setUp];
19 | // Put setup code here. This method is called before the invocation of each test method in the class.
20 | }
21 |
22 | - (void)tearDown {
23 | // Put teardown code here. This method is called after the invocation of each test method in the class.
24 | [super tearDown];
25 | }
26 |
27 | - (void)testExample {
28 | // This is an example of a functional test case.
29 | // Use XCTAssert and related functions to verify your tests produce the correct results.
30 | }
31 |
32 | - (void)testPerformanceExample {
33 | // This is an example of a performance test case.
34 | [self measureBlock:^{
35 | // Put the code you want to measure the time of here.
36 | }];
37 | }
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/OpenGLES02-着色器/OpenGLES02-着色器UITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/OpenGLES03-绘制球形/OpenGLES03-绘制球形.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/OpenGLES03-绘制球形/OpenGLES03-绘制球形.xcodeproj/project.xcworkspace/xcuserdata/qinmin.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES03-绘制球形/OpenGLES03-绘制球形.xcodeproj/project.xcworkspace/xcuserdata/qinmin.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/OpenGLES03-绘制球形/OpenGLES03-绘制球形.xcodeproj/xcuserdata/qinmin.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/OpenGLES03-绘制球形/OpenGLES03-绘制球形.xcodeproj/xcuserdata/qinmin.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | OpenGLES03-绘制球形.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | B94253C01E4DF8B600247FB6
16 |
17 | primary
18 |
19 |
20 | B94253D91E4DF8B600247FB6
21 |
22 | primary
23 |
24 |
25 | B94253E41E4DF8B600247FB6
26 |
27 | primary
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/OpenGLES03-绘制球形/OpenGLES03-绘制球形/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // OpenGLES03-绘制球形
4 | //
5 | // Created by qinmin on 2017/2/10.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/OpenGLES03-绘制球形/OpenGLES03-绘制球形/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/OpenGLES03-绘制球形/OpenGLES03-绘制球形/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/OpenGLES03-绘制球形/OpenGLES03-绘制球形/OpenGLESView.h:
--------------------------------------------------------------------------------
1 | //
2 | // OpenGLESView.h
3 | // OpenGLES01-环境搭建
4 | //
5 | // Created by qinmin on 2017/2/9.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface OpenGLESView : UIView
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/OpenGLES03-绘制球形/OpenGLES03-绘制球形/Shader/frag.glsl:
--------------------------------------------------------------------------------
1 | precision mediump float;
2 |
3 | varying vec3 outColor;
4 |
5 | void main()
6 | {
7 | gl_FragColor = vec4(outColor, 1.0);
8 | }
9 |
--------------------------------------------------------------------------------
/OpenGLES03-绘制球形/OpenGLES03-绘制球形/Shader/vert.glsl:
--------------------------------------------------------------------------------
1 | attribute vec3 position;
2 | attribute vec3 color;
3 |
4 | varying vec3 outColor;
5 |
6 | void main()
7 | {
8 | gl_Position = vec4(position, 1.0);
9 | outColor = color;
10 | }
11 |
--------------------------------------------------------------------------------
/OpenGLES03-绘制球形/OpenGLES03-绘制球形/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // OpenGLES01-环境搭建
4 | //
5 | // Created by qinmin on 2017/2/9.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/OpenGLES03-绘制球形/OpenGLES03-绘制球形/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // OpenGLES01-环境搭建
4 | //
5 | // Created by qinmin on 2017/2/9.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 | #import "OpenGLESView.h"
11 |
12 | @interface ViewController ()
13 |
14 | @end
15 |
16 | @implementation ViewController
17 |
18 | - (void)viewDidLoad {
19 | [super viewDidLoad];
20 | self.view = [[OpenGLESView alloc] initWithFrame:self.view.bounds];
21 | }
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/OpenGLES03-绘制球形/OpenGLES03-绘制球形/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // OpenGLES03-绘制球形
4 | //
5 | // Created by qinmin on 2017/2/10.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/OpenGLES03-绘制球形/OpenGLES03-绘制球形Tests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/OpenGLES03-绘制球形/OpenGLES03-绘制球形Tests/OpenGLES03_____Tests.m:
--------------------------------------------------------------------------------
1 | //
2 | // OpenGLES03_____Tests.m
3 | // OpenGLES03-绘制球形Tests
4 | //
5 | // Created by qinmin on 2017/2/10.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface OpenGLES03_____Tests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation OpenGLES03_____Tests
16 |
17 | - (void)setUp {
18 | [super setUp];
19 | // Put setup code here. This method is called before the invocation of each test method in the class.
20 | }
21 |
22 | - (void)tearDown {
23 | // Put teardown code here. This method is called after the invocation of each test method in the class.
24 | [super tearDown];
25 | }
26 |
27 | - (void)testExample {
28 | // This is an example of a functional test case.
29 | // Use XCTAssert and related functions to verify your tests produce the correct results.
30 | }
31 |
32 | - (void)testPerformanceExample {
33 | // This is an example of a performance test case.
34 | [self measureBlock:^{
35 | // Put the code you want to measure the time of here.
36 | }];
37 | }
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/OpenGLES03-绘制球形/OpenGLES03-绘制球形UITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/OpenGLES04-缓存技术/OpenGLES04-缓存技术.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/OpenGLES04-缓存技术/OpenGLES04-缓存技术.xcodeproj/project.xcworkspace/xcuserdata/qinmin.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES04-缓存技术/OpenGLES04-缓存技术.xcodeproj/project.xcworkspace/xcuserdata/qinmin.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/OpenGLES04-缓存技术/OpenGLES04-缓存技术.xcodeproj/xcuserdata/qinmin.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/OpenGLES04-缓存技术/OpenGLES04-缓存技术.xcodeproj/xcuserdata/qinmin.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | OpenGLES04-缓存技术.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | B95C92201E4F47510078F0DE
16 |
17 | primary
18 |
19 |
20 | B95C92391E4F47510078F0DE
21 |
22 | primary
23 |
24 |
25 | B95C92441E4F47510078F0DE
26 |
27 | primary
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/OpenGLES04-缓存技术/OpenGLES04-缓存技术/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // OpenGLES04-缓存技术
4 | //
5 | // Created by qinmin on 2017/2/11.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/OpenGLES04-缓存技术/OpenGLES04-缓存技术/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/OpenGLES04-缓存技术/OpenGLES04-缓存技术/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/OpenGLES04-缓存技术/OpenGLES04-缓存技术/OpenGLESView.h:
--------------------------------------------------------------------------------
1 | //
2 | // OpenGLESView.h
3 | // OpenGLES01-环境搭建
4 | //
5 | // Created by qinmin on 2017/2/9.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface OpenGLESView : UIView
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/OpenGLES04-缓存技术/OpenGLES04-缓存技术/Shader/frag.glsl:
--------------------------------------------------------------------------------
1 | #version 300 es
2 |
3 | precision mediump float;
4 |
5 | in vec3 outColor;
6 |
7 | out vec4 v_color;
8 |
9 | void main()
10 | {
11 | v_color = vec4(outColor, 1.0);
12 | }
13 |
--------------------------------------------------------------------------------
/OpenGLES04-缓存技术/OpenGLES04-缓存技术/Shader/vert.glsl:
--------------------------------------------------------------------------------
1 | #version 300 es
2 |
3 | layout(location = 0) in vec3 position;
4 | layout(location = 1) in vec3 color;
5 |
6 | out vec3 outColor;
7 |
8 | void main()
9 | {
10 | gl_Position = vec4(position, 1.0);
11 | outColor = color;
12 | }
13 |
--------------------------------------------------------------------------------
/OpenGLES04-缓存技术/OpenGLES04-缓存技术/Utils/UIImage+GLES.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSObject+GLES.h
3 | // OpenGLES04-缓存技术
4 | //
5 | // Created by qinmin on 2017/2/11.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface UIImage (GLES)
12 |
13 | + (UIImage *)imageFromRGBA:(unsigned char *)buffer
14 | width:(int) width
15 | height:(int) height;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/OpenGLES04-缓存技术/OpenGLES04-缓存技术/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // OpenGLES01-环境搭建
4 | //
5 | // Created by qinmin on 2017/2/9.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/OpenGLES04-缓存技术/OpenGLES04-缓存技术/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // OpenGLES01-环境搭建
4 | //
5 | // Created by qinmin on 2017/2/9.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 | #import "OpenGLESView.h"
11 |
12 | @interface ViewController ()
13 |
14 | @end
15 |
16 | @implementation ViewController
17 |
18 | - (void)viewDidLoad {
19 | [super viewDidLoad];
20 | self.view = [[OpenGLESView alloc] initWithFrame:self.view.bounds];
21 | }
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/OpenGLES04-缓存技术/OpenGLES04-缓存技术/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // OpenGLES04-缓存技术
4 | //
5 | // Created by qinmin on 2017/2/11.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/OpenGLES04-缓存技术/OpenGLES04-缓存技术Tests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/OpenGLES04-缓存技术/OpenGLES04-缓存技术Tests/OpenGLES04_____Tests.m:
--------------------------------------------------------------------------------
1 | //
2 | // OpenGLES04_____Tests.m
3 | // OpenGLES04-缓存技术Tests
4 | //
5 | // Created by qinmin on 2017/2/11.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface OpenGLES04_____Tests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation OpenGLES04_____Tests
16 |
17 | - (void)setUp {
18 | [super setUp];
19 | // Put setup code here. This method is called before the invocation of each test method in the class.
20 | }
21 |
22 | - (void)tearDown {
23 | // Put teardown code here. This method is called after the invocation of each test method in the class.
24 | [super tearDown];
25 | }
26 |
27 | - (void)testExample {
28 | // This is an example of a functional test case.
29 | // Use XCTAssert and related functions to verify your tests produce the correct results.
30 | }
31 |
32 | - (void)testPerformanceExample {
33 | // This is an example of a performance test case.
34 | [self measureBlock:^{
35 | // Put the code you want to measure the time of here.
36 | }];
37 | }
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/OpenGLES04-缓存技术/OpenGLES04-缓存技术UITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/OpenGLES05-纹理贴图/OpenGLES05-纹理贴图.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/OpenGLES05-纹理贴图/OpenGLES05-纹理贴图.xcodeproj/project.xcworkspace/xcuserdata/qinmin.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES05-纹理贴图/OpenGLES05-纹理贴图.xcodeproj/project.xcworkspace/xcuserdata/qinmin.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/OpenGLES05-纹理贴图/OpenGLES05-纹理贴图.xcodeproj/xcuserdata/qinmin.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/OpenGLES05-纹理贴图/OpenGLES05-纹理贴图.xcodeproj/xcuserdata/qinmin.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | OpenGLES05-纹理贴图.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | B98A10A21E51405A00E6E179
16 |
17 | primary
18 |
19 |
20 | B98A10BB1E51405A00E6E179
21 |
22 | primary
23 |
24 |
25 | B98A10C61E51405A00E6E179
26 |
27 | primary
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/OpenGLES05-纹理贴图/OpenGLES05-纹理贴图/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // OpenGLES05-纹理贴图
4 | //
5 | // Created by qinmin on 2017/2/13.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/OpenGLES05-纹理贴图/OpenGLES05-纹理贴图/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/OpenGLES05-纹理贴图/OpenGLES05-纹理贴图/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/OpenGLES05-纹理贴图/OpenGLES05-纹理贴图/OpenGLESView.h:
--------------------------------------------------------------------------------
1 | //
2 | // OpenGLESView.h
3 | // OpenGLES01-环境搭建
4 | //
5 | // Created by qinmin on 2017/2/9.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface OpenGLESView : UIView
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/OpenGLES05-纹理贴图/OpenGLES05-纹理贴图/Shader/frag.glsl:
--------------------------------------------------------------------------------
1 | precision mediump float;
2 |
3 | uniform sampler2D image;
4 |
5 | varying vec2 vTexcoord;
6 |
7 | void main()
8 | {
9 | gl_FragColor = texture2D(image, vTexcoord);
10 | }
11 |
--------------------------------------------------------------------------------
/OpenGLES05-纹理贴图/OpenGLES05-纹理贴图/Shader/vert.glsl:
--------------------------------------------------------------------------------
1 | attribute vec3 position;
2 | attribute vec2 texcoord;
3 |
4 | varying vec2 vTexcoord;
5 |
6 | void main()
7 | {
8 | gl_Position = vec4(position, 1.0);
9 | vTexcoord = texcoord;
10 | }
11 |
--------------------------------------------------------------------------------
/OpenGLES05-纹理贴图/OpenGLES05-纹理贴图/Utils/jpeg/JpegUtil.h:
--------------------------------------------------------------------------------
1 | //
2 | // JpegUtil.h
3 | // OpenGLES05-纹理贴图
4 | //
5 | // Created by qinmin on 2017/2/13.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #ifndef JpegUtil_h
10 | #define JpegUtil_h
11 |
12 | #ifdef __cplusplus
13 | extern "C" {
14 | #endif
15 |
16 | #include
17 | #include
18 | #include
19 | #include
20 |
21 | /**
22 | read jpeg file
23 |
24 | @param jpegfile jpeg file path
25 | @param data jpeg color data
26 | @param size jpeg color data size
27 | @param width jpeg file width
28 | @param height jpeg file height
29 | @return decode success or not
30 | */
31 | int read_jpeg_file(const char* jpegfile,
32 | unsigned char** data,
33 | int* size,
34 | int* width,
35 | int* height);
36 |
37 |
38 | /**
39 | write jpeg file
40 |
41 | @param jpegfile write file path
42 | @param data rgb data
43 | @param width file width
44 | @param height file height
45 | @param quality image quality
46 | @return write success or not
47 | */
48 | int write_jpeg_file(const char* jpegfile,
49 | unsigned char* data,
50 | int width,
51 | int height,
52 | int quality);
53 |
54 | #ifdef __cplusplus
55 | }
56 | #endif
57 |
58 | #endif /* JpegUtil_h */
59 |
--------------------------------------------------------------------------------
/OpenGLES05-纹理贴图/OpenGLES05-纹理贴图/Utils/jpeg/prebuilt/android/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH := $(call my-dir)
2 |
3 | include $(CLEAR_VARS)
4 | LOCAL_MODULE := cocos_jpeg_static
5 | LOCAL_MODULE_FILENAME := jpeg
6 | LOCAL_SRC_FILES := $(TARGET_ARCH_ABI)/libjpeg.a
7 | LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../include/android
8 | include $(PREBUILT_STATIC_LIBRARY)
9 |
--------------------------------------------------------------------------------
/OpenGLES05-纹理贴图/OpenGLES05-纹理贴图/Utils/jpeg/prebuilt/android/arm64-v8a/libjpeg.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES05-纹理贴图/OpenGLES05-纹理贴图/Utils/jpeg/prebuilt/android/arm64-v8a/libjpeg.a
--------------------------------------------------------------------------------
/OpenGLES05-纹理贴图/OpenGLES05-纹理贴图/Utils/jpeg/prebuilt/android/armeabi-v7a/libjpeg.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES05-纹理贴图/OpenGLES05-纹理贴图/Utils/jpeg/prebuilt/android/armeabi-v7a/libjpeg.a
--------------------------------------------------------------------------------
/OpenGLES05-纹理贴图/OpenGLES05-纹理贴图/Utils/jpeg/prebuilt/android/armeabi/libjpeg.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES05-纹理贴图/OpenGLES05-纹理贴图/Utils/jpeg/prebuilt/android/armeabi/libjpeg.a
--------------------------------------------------------------------------------
/OpenGLES05-纹理贴图/OpenGLES05-纹理贴图/Utils/jpeg/prebuilt/android/x86/libjpeg.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES05-纹理贴图/OpenGLES05-纹理贴图/Utils/jpeg/prebuilt/android/x86/libjpeg.a
--------------------------------------------------------------------------------
/OpenGLES05-纹理贴图/OpenGLES05-纹理贴图/Utils/jpeg/prebuilt/ios/libjpeg.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES05-纹理贴图/OpenGLES05-纹理贴图/Utils/jpeg/prebuilt/ios/libjpeg.a
--------------------------------------------------------------------------------
/OpenGLES05-纹理贴图/OpenGLES05-纹理贴图/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // OpenGLES01-环境搭建
4 | //
5 | // Created by qinmin on 2017/2/9.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/OpenGLES05-纹理贴图/OpenGLES05-纹理贴图/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // OpenGLES01-环境搭建
4 | //
5 | // Created by qinmin on 2017/2/9.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 | #import "OpenGLESView.h"
11 |
12 | @interface ViewController ()
13 |
14 | @end
15 |
16 | @implementation ViewController
17 |
18 | - (void)viewDidLoad {
19 | [super viewDidLoad];
20 | self.view = [[OpenGLESView alloc] initWithFrame:self.view.bounds];
21 | }
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/OpenGLES05-纹理贴图/OpenGLES05-纹理贴图/flower.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES05-纹理贴图/OpenGLES05-纹理贴图/flower.jpg
--------------------------------------------------------------------------------
/OpenGLES05-纹理贴图/OpenGLES05-纹理贴图/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // OpenGLES05-纹理贴图
4 | //
5 | // Created by qinmin on 2017/2/13.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/OpenGLES05-纹理贴图/OpenGLES05-纹理贴图/pic.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES05-纹理贴图/OpenGLES05-纹理贴图/pic.jpg
--------------------------------------------------------------------------------
/OpenGLES05-纹理贴图/OpenGLES05-纹理贴图/wood.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES05-纹理贴图/OpenGLES05-纹理贴图/wood.jpg
--------------------------------------------------------------------------------
/OpenGLES05-纹理贴图/OpenGLES05-纹理贴图Tests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/OpenGLES05-纹理贴图/OpenGLES05-纹理贴图Tests/OpenGLES05_____Tests.m:
--------------------------------------------------------------------------------
1 | //
2 | // OpenGLES05_____Tests.m
3 | // OpenGLES05-纹理贴图Tests
4 | //
5 | // Created by qinmin on 2017/2/13.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface OpenGLES05_____Tests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation OpenGLES05_____Tests
16 |
17 | - (void)setUp {
18 | [super setUp];
19 | // Put setup code here. This method is called before the invocation of each test method in the class.
20 | }
21 |
22 | - (void)tearDown {
23 | // Put teardown code here. This method is called after the invocation of each test method in the class.
24 | [super tearDown];
25 | }
26 |
27 | - (void)testExample {
28 | // This is an example of a functional test case.
29 | // Use XCTAssert and related functions to verify your tests produce the correct results.
30 | }
31 |
32 | - (void)testPerformanceExample {
33 | // This is an example of a performance test case.
34 | [self measureBlock:^{
35 | // Put the code you want to measure the time of here.
36 | }];
37 | }
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/OpenGLES05-纹理贴图/OpenGLES05-纹理贴图UITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/OpenGLES06-图像膨胀腐蚀模糊/OpenGLES06-图像膨胀腐蚀模糊.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/OpenGLES06-图像膨胀腐蚀模糊/OpenGLES06-图像膨胀腐蚀模糊.xcodeproj/project.xcworkspace/xcuserdata/mac.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES06-图像膨胀腐蚀模糊/OpenGLES06-图像膨胀腐蚀模糊.xcodeproj/project.xcworkspace/xcuserdata/mac.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/OpenGLES06-图像膨胀腐蚀模糊/OpenGLES06-图像膨胀腐蚀模糊.xcodeproj/project.xcworkspace/xcuserdata/qinmin.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES06-图像膨胀腐蚀模糊/OpenGLES06-图像膨胀腐蚀模糊.xcodeproj/project.xcworkspace/xcuserdata/qinmin.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/OpenGLES06-图像膨胀腐蚀模糊/OpenGLES06-图像膨胀腐蚀模糊.xcodeproj/xcuserdata/mac.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/OpenGLES06-图像膨胀腐蚀模糊/OpenGLES06-图像膨胀腐蚀模糊.xcodeproj/xcuserdata/mac.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | OpenGLES06-图像膨胀腐蚀模糊.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | B98A11181E51A29700E6E179
16 |
17 | primary
18 |
19 |
20 | B98A11311E51A29700E6E179
21 |
22 | primary
23 |
24 |
25 | B98A113C1E51A29700E6E179
26 |
27 | primary
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/OpenGLES06-图像膨胀腐蚀模糊/OpenGLES06-图像膨胀腐蚀模糊.xcodeproj/xcuserdata/qinmin.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | OpenGLES06-图像膨胀腐蚀模糊.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | B98A11181E51A29700E6E179
16 |
17 | primary
18 |
19 |
20 | B98A11311E51A29700E6E179
21 |
22 | primary
23 |
24 |
25 | B98A113C1E51A29700E6E179
26 |
27 | primary
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/OpenGLES06-图像膨胀腐蚀模糊/OpenGLES06-图像膨胀腐蚀模糊/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // OpenGLES06-图像膨胀腐蚀模糊
4 | //
5 | // Created by qinmin on 2017/2/13.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/OpenGLES06-图像膨胀腐蚀模糊/OpenGLES06-图像膨胀腐蚀模糊/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/OpenGLES06-图像膨胀腐蚀模糊/OpenGLES06-图像膨胀腐蚀模糊/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/OpenGLES06-图像膨胀腐蚀模糊/OpenGLES06-图像膨胀腐蚀模糊/OpenGLESView.h:
--------------------------------------------------------------------------------
1 | //
2 | // OpenGLESView.h
3 | // OpenGLES01-环境搭建
4 | //
5 | // Created by qinmin on 2017/2/9.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface OpenGLESView : UIView
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/OpenGLES06-图像膨胀腐蚀模糊/OpenGLES06-图像膨胀腐蚀模糊/Shader/blur_frag.glsl:
--------------------------------------------------------------------------------
1 | precision mediump float;
2 |
3 | uniform sampler2D image;
4 |
5 | varying vec2 vTexcoord;
6 |
7 | void main()
8 | {
9 | float block = 150.0;
10 | float delta = 1.0/block;
11 | vec4 color = vec4(0.0);
12 |
13 | float factor[9];
14 | factor[0] = 0.0947416; factor[1] = 0.118318; factor[2] = 0.0947416;
15 | factor[3] = 0.118318; factor[4] = 0.147761; factor[5] = 0.118318;
16 | factor[6] = 0.0947416; factor[7] = 0.118318; factor[8] = 0.0947416;
17 |
18 | for (int i = -1; i <= 1; i++) {
19 | for (int j = -1; j <= 1; j++) {
20 | float x = max(0.0, vTexcoord.x + float(i) * delta);
21 | float y = max(0.0, vTexcoord.y + float(i) * delta);
22 | color += texture2D(image, vec2(x, y)) * factor[(i+1)*3+(j+1)];
23 | }
24 | }
25 |
26 | //gl_FragColor = texture2D(image, vTexcoord);
27 | gl_FragColor = vec4(vec3(color), 1.0);
28 | }
29 |
--------------------------------------------------------------------------------
/OpenGLES06-图像膨胀腐蚀模糊/OpenGLES06-图像膨胀腐蚀模糊/Shader/blur_vert.glsl:
--------------------------------------------------------------------------------
1 | attribute vec3 position;
2 | attribute vec2 texcoord;
3 |
4 | varying vec2 vTexcoord;
5 |
6 | void main()
7 | {
8 | gl_Position = vec4(position, 1.0);
9 | vTexcoord = texcoord;
10 | }
11 |
--------------------------------------------------------------------------------
/OpenGLES06-图像膨胀腐蚀模糊/OpenGLES06-图像膨胀腐蚀模糊/Shader/corrode_frag.glsl:
--------------------------------------------------------------------------------
1 | precision mediump float;
2 |
3 | uniform sampler2D image;
4 |
5 | varying vec2 vTexcoord;
6 |
7 | void main()
8 | {
9 | float block = 200.0;
10 | float delta = 1.0/block;
11 | vec4 maxColor = vec4(1.0);
12 |
13 | for (int i = -1; i <= 1 ; i++) {
14 | for (int j = -1; j <= 1; j++) {
15 | float x = vTexcoord.x + float(i) * delta;
16 | float y = vTexcoord.y + float(i) * delta;
17 | maxColor = min(texture2D(image, vec2(x, y)), maxColor);
18 | }
19 | }
20 |
21 | gl_FragColor = maxColor;
22 | }
23 |
--------------------------------------------------------------------------------
/OpenGLES06-图像膨胀腐蚀模糊/OpenGLES06-图像膨胀腐蚀模糊/Shader/corrode_vert.glsl:
--------------------------------------------------------------------------------
1 | attribute vec3 position;
2 | attribute vec2 texcoord;
3 |
4 | varying vec2 vTexcoord;
5 |
6 | void main()
7 | {
8 | gl_Position = vec4(position, 1.0);
9 | vTexcoord = texcoord;
10 | }
11 |
--------------------------------------------------------------------------------
/OpenGLES06-图像膨胀腐蚀模糊/OpenGLES06-图像膨胀腐蚀模糊/Shader/expand_frag.glsl:
--------------------------------------------------------------------------------
1 | precision mediump float;
2 |
3 | uniform sampler2D image;
4 |
5 | varying vec2 vTexcoord;
6 |
7 | void main()
8 | {
9 | float block = 300.0;
10 | float delta = 1.0/block;
11 | vec4 maxColor = vec4(-1.0);
12 |
13 | for (int i = -1; i <= 1 ; i++) {
14 | for (int j = -1; j <= 1; j++) {
15 | float x = vTexcoord.x + float(i) * delta;
16 | float y = vTexcoord.y + float(i) * delta;
17 | maxColor = max(texture2D(image, vec2(x, y)), maxColor);
18 | }
19 | }
20 |
21 | gl_FragColor = maxColor;
22 | }
23 |
--------------------------------------------------------------------------------
/OpenGLES06-图像膨胀腐蚀模糊/OpenGLES06-图像膨胀腐蚀模糊/Shader/expand_vert.glsl:
--------------------------------------------------------------------------------
1 | attribute vec3 position;
2 | attribute vec2 texcoord;
3 |
4 | varying vec2 vTexcoord;
5 |
6 | void main()
7 | {
8 | gl_Position = vec4(position, 1.0);
9 | vTexcoord = texcoord;
10 | }
11 |
--------------------------------------------------------------------------------
/OpenGLES06-图像膨胀腐蚀模糊/OpenGLES06-图像膨胀腐蚀模糊/Shader/frag.glsl:
--------------------------------------------------------------------------------
1 | precision mediump float;
2 |
3 | uniform sampler2D image;
4 |
5 | varying vec2 vTexcoord;
6 |
7 | void main()
8 | {
9 | gl_FragColor = texture2D(image, vTexcoord);
10 | }
11 |
--------------------------------------------------------------------------------
/OpenGLES06-图像膨胀腐蚀模糊/OpenGLES06-图像膨胀腐蚀模糊/Shader/vert.glsl:
--------------------------------------------------------------------------------
1 | attribute vec3 position;
2 | attribute vec2 texcoord;
3 |
4 | varying vec2 vTexcoord;
5 |
6 | void main()
7 | {
8 | gl_Position = vec4(position, 1.0);
9 | vTexcoord = texcoord;
10 | }
11 |
--------------------------------------------------------------------------------
/OpenGLES06-图像膨胀腐蚀模糊/OpenGLES06-图像膨胀腐蚀模糊/Utils/jpeg/prebuilt/android/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH := $(call my-dir)
2 |
3 | include $(CLEAR_VARS)
4 | LOCAL_MODULE := cocos_jpeg_static
5 | LOCAL_MODULE_FILENAME := jpeg
6 | LOCAL_SRC_FILES := $(TARGET_ARCH_ABI)/libjpeg.a
7 | LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../include/android
8 | include $(PREBUILT_STATIC_LIBRARY)
9 |
--------------------------------------------------------------------------------
/OpenGLES06-图像膨胀腐蚀模糊/OpenGLES06-图像膨胀腐蚀模糊/Utils/jpeg/prebuilt/android/arm64-v8a/libjpeg.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES06-图像膨胀腐蚀模糊/OpenGLES06-图像膨胀腐蚀模糊/Utils/jpeg/prebuilt/android/arm64-v8a/libjpeg.a
--------------------------------------------------------------------------------
/OpenGLES06-图像膨胀腐蚀模糊/OpenGLES06-图像膨胀腐蚀模糊/Utils/jpeg/prebuilt/android/armeabi-v7a/libjpeg.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES06-图像膨胀腐蚀模糊/OpenGLES06-图像膨胀腐蚀模糊/Utils/jpeg/prebuilt/android/armeabi-v7a/libjpeg.a
--------------------------------------------------------------------------------
/OpenGLES06-图像膨胀腐蚀模糊/OpenGLES06-图像膨胀腐蚀模糊/Utils/jpeg/prebuilt/android/armeabi/libjpeg.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES06-图像膨胀腐蚀模糊/OpenGLES06-图像膨胀腐蚀模糊/Utils/jpeg/prebuilt/android/armeabi/libjpeg.a
--------------------------------------------------------------------------------
/OpenGLES06-图像膨胀腐蚀模糊/OpenGLES06-图像膨胀腐蚀模糊/Utils/jpeg/prebuilt/android/x86/libjpeg.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES06-图像膨胀腐蚀模糊/OpenGLES06-图像膨胀腐蚀模糊/Utils/jpeg/prebuilt/android/x86/libjpeg.a
--------------------------------------------------------------------------------
/OpenGLES06-图像膨胀腐蚀模糊/OpenGLES06-图像膨胀腐蚀模糊/Utils/jpeg/prebuilt/ios/libjpeg.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES06-图像膨胀腐蚀模糊/OpenGLES06-图像膨胀腐蚀模糊/Utils/jpeg/prebuilt/ios/libjpeg.a
--------------------------------------------------------------------------------
/OpenGLES06-图像膨胀腐蚀模糊/OpenGLES06-图像膨胀腐蚀模糊/Utils/png/PngUtil.h:
--------------------------------------------------------------------------------
1 | //
2 | // PngUtil.h
3 | // OpenGLES06-图像膨胀腐蚀模糊
4 | //
5 | // Created by mac on 17/2/14.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #ifndef PngUtil_h
10 | #define PngUtil_h
11 |
12 | #ifdef __cplusplus
13 | extern "C" {
14 | #endif
15 |
16 | #include
17 | #include
18 | #include
19 |
20 | /**
21 | PNG ALPHA
22 | */
23 | #define PNG_HAVE_ALPHA 1
24 | #define PNG_NO_ALPHA 0
25 |
26 | /**
27 | PNG info
28 | */
29 | typedef struct {
30 | int width, height; /* 尺寸 */
31 | int bit_depth; /* 位深 */
32 | int flag; /* 一个标志,表示是否有alpha通道 */
33 | unsigned char **rgba; /* 图片数组;r=rgba[0];g=rgba[1];b=rgba[2] */
34 | } pic_data;
35 |
36 | /**
37 | read png file
38 |
39 | @param filepath png file path
40 | @param out png info
41 |
42 | @return success or not
43 | */
44 | int read_png_file(const char *filepath, pic_data *out);
45 |
46 |
47 | /**
48 | write png file
49 |
50 | @param file_name png file name
51 | @param graph png data to write
52 |
53 | @return success or not
54 | */
55 | int write_png_file(const char *filename , pic_data *graph);
56 |
57 | #ifdef __cplusplus
58 | }
59 | #endif
60 | #endif /* PngUtil_h */
61 |
--------------------------------------------------------------------------------
/OpenGLES06-图像膨胀腐蚀模糊/OpenGLES06-图像膨胀腐蚀模糊/Utils/png/prebuilt/android/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH := $(call my-dir)
2 |
3 | include $(CLEAR_VARS)
4 | LOCAL_MODULE := cocos_png_static
5 | LOCAL_MODULE_FILENAME := png
6 | LOCAL_SRC_FILES := $(TARGET_ARCH_ABI)/libpng.a
7 | LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../include/android
8 | include $(PREBUILT_STATIC_LIBRARY)
9 |
--------------------------------------------------------------------------------
/OpenGLES06-图像膨胀腐蚀模糊/OpenGLES06-图像膨胀腐蚀模糊/Utils/png/prebuilt/android/arm64-v8a/libpng.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES06-图像膨胀腐蚀模糊/OpenGLES06-图像膨胀腐蚀模糊/Utils/png/prebuilt/android/arm64-v8a/libpng.a
--------------------------------------------------------------------------------
/OpenGLES06-图像膨胀腐蚀模糊/OpenGLES06-图像膨胀腐蚀模糊/Utils/png/prebuilt/android/armeabi-v7a/libpng.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES06-图像膨胀腐蚀模糊/OpenGLES06-图像膨胀腐蚀模糊/Utils/png/prebuilt/android/armeabi-v7a/libpng.a
--------------------------------------------------------------------------------
/OpenGLES06-图像膨胀腐蚀模糊/OpenGLES06-图像膨胀腐蚀模糊/Utils/png/prebuilt/android/armeabi/libpng.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES06-图像膨胀腐蚀模糊/OpenGLES06-图像膨胀腐蚀模糊/Utils/png/prebuilt/android/armeabi/libpng.a
--------------------------------------------------------------------------------
/OpenGLES06-图像膨胀腐蚀模糊/OpenGLES06-图像膨胀腐蚀模糊/Utils/png/prebuilt/android/x86/libpng.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES06-图像膨胀腐蚀模糊/OpenGLES06-图像膨胀腐蚀模糊/Utils/png/prebuilt/android/x86/libpng.a
--------------------------------------------------------------------------------
/OpenGLES06-图像膨胀腐蚀模糊/OpenGLES06-图像膨胀腐蚀模糊/Utils/png/prebuilt/ios/libpng.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES06-图像膨胀腐蚀模糊/OpenGLES06-图像膨胀腐蚀模糊/Utils/png/prebuilt/ios/libpng.a
--------------------------------------------------------------------------------
/OpenGLES06-图像膨胀腐蚀模糊/OpenGLES06-图像膨胀腐蚀模糊/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // OpenGLES01-环境搭建
4 | //
5 | // Created by qinmin on 2017/2/9.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/OpenGLES06-图像膨胀腐蚀模糊/OpenGLES06-图像膨胀腐蚀模糊/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // OpenGLES01-环境搭建
4 | //
5 | // Created by qinmin on 2017/2/9.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 | #import "OpenGLESView.h"
11 |
12 | @interface ViewController ()
13 |
14 | @end
15 |
16 | @implementation ViewController
17 |
18 | - (void)viewDidLoad {
19 | [super viewDidLoad];
20 | self.view = [[OpenGLESView alloc] initWithFrame:self.view.bounds];
21 | }
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/OpenGLES06-图像膨胀腐蚀模糊/OpenGLES06-图像膨胀腐蚀模糊/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // OpenGLES06-图像膨胀腐蚀模糊
4 | //
5 | // Created by qinmin on 2017/2/13.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/OpenGLES06-图像膨胀腐蚀模糊/OpenGLES06-图像膨胀腐蚀模糊/wood.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES06-图像膨胀腐蚀模糊/OpenGLES06-图像膨胀腐蚀模糊/wood.jpg
--------------------------------------------------------------------------------
/OpenGLES06-图像膨胀腐蚀模糊/OpenGLES06-图像膨胀腐蚀模糊Tests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/OpenGLES06-图像膨胀腐蚀模糊/OpenGLES06-图像膨胀腐蚀模糊Tests/OpenGLES06_________Tests.m:
--------------------------------------------------------------------------------
1 | //
2 | // OpenGLES06_________Tests.m
3 | // OpenGLES06-图像膨胀腐蚀模糊Tests
4 | //
5 | // Created by qinmin on 2017/2/13.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface OpenGLES06_________Tests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation OpenGLES06_________Tests
16 |
17 | - (void)setUp {
18 | [super setUp];
19 | // Put setup code here. This method is called before the invocation of each test method in the class.
20 | }
21 |
22 | - (void)tearDown {
23 | // Put teardown code here. This method is called after the invocation of each test method in the class.
24 | [super tearDown];
25 | }
26 |
27 | - (void)testExample {
28 | // This is an example of a functional test case.
29 | // Use XCTAssert and related functions to verify your tests produce the correct results.
30 | }
31 |
32 | - (void)testPerformanceExample {
33 | // This is an example of a performance test case.
34 | [self measureBlock:^{
35 | // Put the code you want to measure the time of here.
36 | }];
37 | }
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/OpenGLES06-图像膨胀腐蚀模糊/OpenGLES06-图像膨胀腐蚀模糊UITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/OpenGLES07-像素的代数运算/OpenGLES07-像素的代数运算.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/OpenGLES07-像素的代数运算/OpenGLES07-像素的代数运算.xcodeproj/project.xcworkspace/xcuserdata/qinmin.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES07-像素的代数运算/OpenGLES07-像素的代数运算.xcodeproj/project.xcworkspace/xcuserdata/qinmin.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/OpenGLES07-像素的代数运算/OpenGLES07-像素的代数运算.xcodeproj/xcuserdata/qinmin.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | OpenGLES07-像素的代数运算.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | B94753A11E5575A1000BB369
16 |
17 | primary
18 |
19 |
20 | B94753BA1E5575A1000BB369
21 |
22 | primary
23 |
24 |
25 | B94753C51E5575A1000BB369
26 |
27 | primary
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/OpenGLES07-像素的代数运算/OpenGLES07-像素的代数运算/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // OpenGLES07-像素的代数运算
4 | //
5 | // Created by qinmin on 2017/2/16.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/OpenGLES07-像素的代数运算/OpenGLES07-像素的代数运算/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/OpenGLES07-像素的代数运算/OpenGLES07-像素的代数运算/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/OpenGLES07-像素的代数运算/OpenGLES07-像素的代数运算/OpenGLESView.h:
--------------------------------------------------------------------------------
1 | //
2 | // OpenGLESView.h
3 | // OpenGLES01-环境搭建
4 | //
5 | // Created by qinmin on 2017/2/9.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface OpenGLESView : UIView
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/OpenGLES07-像素的代数运算/OpenGLES07-像素的代数运算/Shader/frag.glsl:
--------------------------------------------------------------------------------
1 | precision mediump float;
2 |
3 | uniform sampler2D image1;
4 | uniform sampler2D image2;
5 |
6 | varying vec2 vTexcoord;
7 |
8 | void main()
9 | {
10 | // 加法
11 | // vec4 color1 = texture2D(image1, vTexcoord);
12 | // vec4 color2 = texture2D(image2, vTexcoord);
13 | // float alpha = 0.6;
14 | // gl_FragColor = vec4(vec3(color1*(1.0 - alpha) + color2*alpha), 1.0);
15 |
16 | // vec4 color2 = texture2D(image2, vTexcoord);
17 | // gl_FragColor = vec4(vec3(1.0) - vec3(color2), 1.0);
18 |
19 | // 减法
20 | // vec4 color1 = texture2D(image1, vTexcoord);
21 | // vec4 color2 = texture2D(image2, vTexcoord);
22 | // gl_FragColor = vec4(vec3(color2 - color1), 1.0);
23 |
24 | // 乘法
25 | vec4 color1 = texture2D(image1, vTexcoord);
26 | vec4 color2 = texture2D(image2, vTexcoord);
27 | gl_FragColor = vec4(vec3(1.5 * color1 * color2), 1.0);
28 |
29 | // 除法
30 | // vec4 color1 = texture2D(image1, vTexcoord);
31 | // vec4 color2 = texture2D(image2, vTexcoord);
32 | // gl_FragColor = vec4(vec3(color1/color2), 1.0);
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/OpenGLES07-像素的代数运算/OpenGLES07-像素的代数运算/Shader/vert.glsl:
--------------------------------------------------------------------------------
1 | attribute vec3 position;
2 | attribute vec2 texcoord;
3 |
4 | varying vec2 vTexcoord;
5 |
6 | void main()
7 | {
8 | gl_Position = vec4(position, 1.0);
9 | vTexcoord = texcoord;
10 | }
11 |
--------------------------------------------------------------------------------
/OpenGLES07-像素的代数运算/OpenGLES07-像素的代数运算/Utils/jpeg/prebuilt/android/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH := $(call my-dir)
2 |
3 | include $(CLEAR_VARS)
4 | LOCAL_MODULE := cocos_jpeg_static
5 | LOCAL_MODULE_FILENAME := jpeg
6 | LOCAL_SRC_FILES := $(TARGET_ARCH_ABI)/libjpeg.a
7 | LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../include/android
8 | include $(PREBUILT_STATIC_LIBRARY)
9 |
--------------------------------------------------------------------------------
/OpenGLES07-像素的代数运算/OpenGLES07-像素的代数运算/Utils/jpeg/prebuilt/android/arm64-v8a/libjpeg.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES07-像素的代数运算/OpenGLES07-像素的代数运算/Utils/jpeg/prebuilt/android/arm64-v8a/libjpeg.a
--------------------------------------------------------------------------------
/OpenGLES07-像素的代数运算/OpenGLES07-像素的代数运算/Utils/jpeg/prebuilt/android/armeabi-v7a/libjpeg.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES07-像素的代数运算/OpenGLES07-像素的代数运算/Utils/jpeg/prebuilt/android/armeabi-v7a/libjpeg.a
--------------------------------------------------------------------------------
/OpenGLES07-像素的代数运算/OpenGLES07-像素的代数运算/Utils/jpeg/prebuilt/android/armeabi/libjpeg.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES07-像素的代数运算/OpenGLES07-像素的代数运算/Utils/jpeg/prebuilt/android/armeabi/libjpeg.a
--------------------------------------------------------------------------------
/OpenGLES07-像素的代数运算/OpenGLES07-像素的代数运算/Utils/jpeg/prebuilt/android/x86/libjpeg.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES07-像素的代数运算/OpenGLES07-像素的代数运算/Utils/jpeg/prebuilt/android/x86/libjpeg.a
--------------------------------------------------------------------------------
/OpenGLES07-像素的代数运算/OpenGLES07-像素的代数运算/Utils/jpeg/prebuilt/ios/libjpeg.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES07-像素的代数运算/OpenGLES07-像素的代数运算/Utils/jpeg/prebuilt/ios/libjpeg.a
--------------------------------------------------------------------------------
/OpenGLES07-像素的代数运算/OpenGLES07-像素的代数运算/Utils/png/PngUtil.h:
--------------------------------------------------------------------------------
1 | //
2 | // PngUtil.h
3 | // OpenGLES06-图像膨胀腐蚀模糊
4 | //
5 | // Created by mac on 17/2/14.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #ifndef PngUtil_h
10 | #define PngUtil_h
11 |
12 | #ifdef __cplusplus
13 | extern "C" {
14 | #endif
15 |
16 | #include
17 | #include
18 | #include
19 |
20 | /**
21 | PNG ALPHA
22 | */
23 | #define PNG_HAVE_ALPHA 1
24 | #define PNG_NO_ALPHA 0
25 |
26 | /**
27 | PNG info
28 | */
29 | typedef struct {
30 | int width, height; /* 尺寸 */
31 | int bit_depth; /* 位深 */
32 | int flag; /* 一个标志,表示是否有alpha通道 */
33 | unsigned char **rgba; /* 图片数组;r=rgba[0];g=rgba[1];b=rgba[2] */
34 | } pic_data;
35 |
36 | /**
37 | read png file
38 |
39 | @param filepath png file path
40 | @param out png info
41 |
42 | @return success or not
43 | */
44 | int read_png_file(const char *filepath, pic_data *out);
45 |
46 |
47 | /**
48 | write png file
49 |
50 | @param file_name png file name
51 | @param graph png data to write
52 |
53 | @return success or not
54 | */
55 | int write_png_file(const char *filename , pic_data *graph);
56 |
57 | #ifdef __cplusplus
58 | }
59 | #endif
60 | #endif /* PngUtil_h */
61 |
--------------------------------------------------------------------------------
/OpenGLES07-像素的代数运算/OpenGLES07-像素的代数运算/Utils/png/prebuilt/android/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH := $(call my-dir)
2 |
3 | include $(CLEAR_VARS)
4 | LOCAL_MODULE := cocos_png_static
5 | LOCAL_MODULE_FILENAME := png
6 | LOCAL_SRC_FILES := $(TARGET_ARCH_ABI)/libpng.a
7 | LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../include/android
8 | include $(PREBUILT_STATIC_LIBRARY)
9 |
--------------------------------------------------------------------------------
/OpenGLES07-像素的代数运算/OpenGLES07-像素的代数运算/Utils/png/prebuilt/android/arm64-v8a/libpng.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES07-像素的代数运算/OpenGLES07-像素的代数运算/Utils/png/prebuilt/android/arm64-v8a/libpng.a
--------------------------------------------------------------------------------
/OpenGLES07-像素的代数运算/OpenGLES07-像素的代数运算/Utils/png/prebuilt/android/armeabi-v7a/libpng.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES07-像素的代数运算/OpenGLES07-像素的代数运算/Utils/png/prebuilt/android/armeabi-v7a/libpng.a
--------------------------------------------------------------------------------
/OpenGLES07-像素的代数运算/OpenGLES07-像素的代数运算/Utils/png/prebuilt/android/armeabi/libpng.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES07-像素的代数运算/OpenGLES07-像素的代数运算/Utils/png/prebuilt/android/armeabi/libpng.a
--------------------------------------------------------------------------------
/OpenGLES07-像素的代数运算/OpenGLES07-像素的代数运算/Utils/png/prebuilt/android/x86/libpng.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES07-像素的代数运算/OpenGLES07-像素的代数运算/Utils/png/prebuilt/android/x86/libpng.a
--------------------------------------------------------------------------------
/OpenGLES07-像素的代数运算/OpenGLES07-像素的代数运算/Utils/png/prebuilt/ios/libpng.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES07-像素的代数运算/OpenGLES07-像素的代数运算/Utils/png/prebuilt/ios/libpng.a
--------------------------------------------------------------------------------
/OpenGLES07-像素的代数运算/OpenGLES07-像素的代数运算/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // OpenGLES01-环境搭建
4 | //
5 | // Created by qinmin on 2017/2/9.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/OpenGLES07-像素的代数运算/OpenGLES07-像素的代数运算/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // OpenGLES01-环境搭建
4 | //
5 | // Created by qinmin on 2017/2/9.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 | #import "OpenGLESView.h"
11 |
12 | @interface ViewController ()
13 |
14 | @end
15 |
16 | @implementation ViewController
17 |
18 | - (void)viewDidLoad {
19 | [super viewDidLoad];
20 | self.view = [[OpenGLESView alloc] initWithFrame:self.view.bounds];
21 | }
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/OpenGLES07-像素的代数运算/OpenGLES07-像素的代数运算/flower.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES07-像素的代数运算/OpenGLES07-像素的代数运算/flower.jpg
--------------------------------------------------------------------------------
/OpenGLES07-像素的代数运算/OpenGLES07-像素的代数运算/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // OpenGLES07-像素的代数运算
4 | //
5 | // Created by qinmin on 2017/2/16.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/OpenGLES07-像素的代数运算/OpenGLES07-像素的代数运算/wood.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES07-像素的代数运算/OpenGLES07-像素的代数运算/wood.jpg
--------------------------------------------------------------------------------
/OpenGLES07-像素的代数运算/OpenGLES07-像素的代数运算Tests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/OpenGLES07-像素的代数运算/OpenGLES07-像素的代数运算Tests/OpenGLES07________Tests.m:
--------------------------------------------------------------------------------
1 | //
2 | // OpenGLES07________Tests.m
3 | // OpenGLES07-像素的代数运算Tests
4 | //
5 | // Created by qinmin on 2017/2/16.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface OpenGLES07________Tests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation OpenGLES07________Tests
16 |
17 | - (void)setUp {
18 | [super setUp];
19 | // Put setup code here. This method is called before the invocation of each test method in the class.
20 | }
21 |
22 | - (void)tearDown {
23 | // Put teardown code here. This method is called after the invocation of each test method in the class.
24 | [super tearDown];
25 | }
26 |
27 | - (void)testExample {
28 | // This is an example of a functional test case.
29 | // Use XCTAssert and related functions to verify your tests produce the correct results.
30 | }
31 |
32 | - (void)testPerformanceExample {
33 | // This is an example of a performance test case.
34 | [self measureBlock:^{
35 | // Put the code you want to measure the time of here.
36 | }];
37 | }
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/OpenGLES07-像素的代数运算/OpenGLES07-像素的代数运算UITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/OpenGLES08-图像边缘检测/OpenGLES08-图像边缘检测.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/OpenGLES08-图像边缘检测/OpenGLES08-图像边缘检测.xcodeproj/project.xcworkspace/xcuserdata/qinmin.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES08-图像边缘检测/OpenGLES08-图像边缘检测.xcodeproj/project.xcworkspace/xcuserdata/qinmin.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/OpenGLES08-图像边缘检测/OpenGLES08-图像边缘检测.xcodeproj/xcuserdata/qinmin.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | OpenGLES08-图像边缘检测.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | B954633C1E5AC46300D0D59A
16 |
17 | primary
18 |
19 |
20 | B95463551E5AC46300D0D59A
21 |
22 | primary
23 |
24 |
25 | B95463601E5AC46300D0D59A
26 |
27 | primary
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/OpenGLES08-图像边缘检测/OpenGLES08-图像边缘检测/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // OpenGLES08-图像边缘检测
4 | //
5 | // Created by qinmin on 2017/2/20.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/OpenGLES08-图像边缘检测/OpenGLES08-图像边缘检测/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/OpenGLES08-图像边缘检测/OpenGLES08-图像边缘检测/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/OpenGLES08-图像边缘检测/OpenGLES08-图像边缘检测/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // OpenGLES08-图像边缘检测
4 | //
5 | // Created by qinmin on 2017/2/20.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/OpenGLES08-图像边缘检测/OpenGLES08-图像边缘检测/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // OpenGLES08-图像边缘检测
4 | //
5 | // Created by qinmin on 2017/2/20.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 |
11 | @interface ViewController ()
12 |
13 | @end
14 |
15 | @implementation ViewController
16 |
17 | - (void)viewDidLoad {
18 | [super viewDidLoad];
19 | // Do any additional setup after loading the view, typically from a nib.
20 | }
21 |
22 |
23 | - (void)didReceiveMemoryWarning {
24 | [super didReceiveMemoryWarning];
25 | // Dispose of any resources that can be recreated.
26 | }
27 |
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/OpenGLES08-图像边缘检测/OpenGLES08-图像边缘检测/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // OpenGLES08-图像边缘检测
4 | //
5 | // Created by qinmin on 2017/2/20.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/OpenGLES08-图像边缘检测/OpenGLES08-图像边缘检测Tests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/OpenGLES08-图像边缘检测/OpenGLES08-图像边缘检测Tests/OpenGLES08_______Tests.m:
--------------------------------------------------------------------------------
1 | //
2 | // OpenGLES08_______Tests.m
3 | // OpenGLES08-图像边缘检测Tests
4 | //
5 | // Created by qinmin on 2017/2/20.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface OpenGLES08_______Tests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation OpenGLES08_______Tests
16 |
17 | - (void)setUp {
18 | [super setUp];
19 | // Put setup code here. This method is called before the invocation of each test method in the class.
20 | }
21 |
22 | - (void)tearDown {
23 | // Put teardown code here. This method is called after the invocation of each test method in the class.
24 | [super tearDown];
25 | }
26 |
27 | - (void)testExample {
28 | // This is an example of a functional test case.
29 | // Use XCTAssert and related functions to verify your tests produce the correct results.
30 | }
31 |
32 | - (void)testPerformanceExample {
33 | // This is an example of a performance test case.
34 | [self measureBlock:^{
35 | // Put the code you want to measure the time of here.
36 | }];
37 | }
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/OpenGLES08-图像边缘检测/OpenGLES08-图像边缘检测UITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/OpenGLES09-GLSL实现常见特效/OpenGLES09-GLSL实现常见特效.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/OpenGLES09-GLSL实现常见特效/OpenGLES09-GLSL实现常见特效.xcodeproj/project.xcworkspace/xcuserdata/qinmin.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES09-GLSL实现常见特效/OpenGLES09-GLSL实现常见特效.xcodeproj/project.xcworkspace/xcuserdata/qinmin.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/OpenGLES09-GLSL实现常见特效/OpenGLES09-GLSL实现常见特效.xcodeproj/xcuserdata/qinmin.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/OpenGLES09-GLSL实现常见特效/OpenGLES09-GLSL实现常见特效.xcodeproj/xcuserdata/qinmin.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | OpenGLES09-GLSL实现常见特效.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | B954637B1E5AC54400D0D59A
16 |
17 | primary
18 |
19 |
20 | B95463941E5AC54400D0D59A
21 |
22 | primary
23 |
24 |
25 | B954639F1E5AC54400D0D59A
26 |
27 | primary
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/OpenGLES09-GLSL实现常见特效/OpenGLES09-GLSL实现常见特效/1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES09-GLSL实现常见特效/OpenGLES09-GLSL实现常见特效/1.jpg
--------------------------------------------------------------------------------
/OpenGLES09-GLSL实现常见特效/OpenGLES09-GLSL实现常见特效/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // OpenGLES09-GLSL实现常见特效
4 | //
5 | // Created by qinmin on 2017/2/20.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/OpenGLES09-GLSL实现常见特效/OpenGLES09-GLSL实现常见特效/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/OpenGLES09-GLSL实现常见特效/OpenGLES09-GLSL实现常见特效/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/OpenGLES09-GLSL实现常见特效/OpenGLES09-GLSL实现常见特效/OpenGLESView.h:
--------------------------------------------------------------------------------
1 | //
2 | // OpenGLESView.h
3 | // OpenGLES01-环境搭建
4 | //
5 | // Created by qinmin on 2017/2/9.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface OpenGLESView : UIView
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/OpenGLES09-GLSL实现常见特效/OpenGLES09-GLSL实现常见特效/Shader/cameo.glsl:
--------------------------------------------------------------------------------
1 | //浮雕效果
2 | precision mediump float;
3 | varying vec2 vTexcoord;
4 | uniform sampler2D image;
5 | const highp vec3 W = vec3(0.2125, 0.7154, 0.0721);
6 | const vec2 TexSize = vec2(100.0, 100.0);
7 | const vec4 bkColor = vec4(0.5, 0.5, 0.5, 1.0);
8 |
9 | void main()
10 | {
11 | vec2 tex = vTexcoord;
12 | vec2 upLeftUV = vec2(tex.x-1.0/TexSize.x, tex.y-1.0/TexSize.y);
13 | vec4 curColor = texture2D(image, vTexcoord);
14 | vec4 upLeftColor = texture2D(image, upLeftUV);
15 | vec4 delColor = curColor - upLeftColor;
16 | float luminance = dot(delColor.rgb, W);
17 | gl_FragColor = vec4(vec3(luminance), 0.0) + bkColor;
18 | }
19 |
--------------------------------------------------------------------------------
/OpenGLES09-GLSL实现常见特效/OpenGLES09-GLSL实现常见特效/Shader/cirlce.glsl:
--------------------------------------------------------------------------------
1 | precision mediump float;
2 |
3 | const float PI = 3.14159265;
4 | uniform sampler2D image;
5 |
6 | const float uD = 80.0;
7 | const float uR = 0.5;
8 |
9 | varying vec2 vTexcoord;
10 |
11 | void main()
12 | {
13 | ivec2 ires = ivec2(512, 512);
14 | float Res = float(ires.s);
15 |
16 | vec2 st = vTexcoord;
17 | float Radius = Res * uR;
18 |
19 | vec2 xy = Res * st;
20 |
21 | vec2 dxy = xy - vec2(Res/2., Res/2.);
22 | float r = length(dxy);
23 |
24 | float beta = atan(dxy.y, dxy.x) + radians(uD) * 2.0 * (-(r/Radius)*(r/Radius) + 1.0);//(1.0 - r/Radius);
25 |
26 | vec2 xy1 = xy;
27 | if(r<=Radius)
28 | {
29 | xy1 = Res/2. + r*vec2(cos(beta), sin(beta));
30 | }
31 |
32 | st = xy1/Res;
33 |
34 | vec3 irgb = texture2D(image, st).rgb;
35 |
36 | gl_FragColor = vec4( irgb, 1.0 );
37 | }
38 |
--------------------------------------------------------------------------------
/OpenGLES09-GLSL实现常见特效/OpenGLES09-GLSL实现常见特效/Shader/gray.glsl:
--------------------------------------------------------------------------------
1 | //灰度图
2 | precision highp float;
3 | uniform sampler2D image;
4 | varying vec2 vTexcoord;
5 | const highp vec3 W = vec3(0.2125, 0.7154, 0.0721);
6 |
7 | void main()
8 | {
9 | lowp vec4 textureColor = texture2D(image, vTexcoord);
10 | float luminance = dot(textureColor.rgb, W);
11 |
12 | gl_FragColor = vec4(vec3(luminance), textureColor.a);
13 | }
14 |
--------------------------------------------------------------------------------
/OpenGLES09-GLSL实现常见特效/OpenGLES09-GLSL实现常见特效/Shader/mosaic.glsl:
--------------------------------------------------------------------------------
1 | precision mediump float;
2 |
3 | varying vec2 vTexcoord;
4 | uniform sampler2D image;
5 | const vec2 TexSize = vec2(400.0, 400.0);
6 | const vec2 mosaicSize = vec2(8.0, 8.0);
7 |
8 | void main()
9 | {
10 | vec2 intXY = vec2(vTexcoord.x*TexSize.x, vTexcoord.y*TexSize.y);
11 | vec2 XYMosaic = vec2(floor(intXY.x/mosaicSize.x)*mosaicSize.x, floor(intXY.y/mosaicSize.y)*mosaicSize.y);
12 | vec2 UVMosaic = vec2(XYMosaic.x/TexSize.x, XYMosaic.y/TexSize.y);
13 | vec4 color = texture2D(image, UVMosaic);
14 | gl_FragColor = color;
15 | }
16 |
--------------------------------------------------------------------------------
/OpenGLES09-GLSL实现常见特效/OpenGLES09-GLSL实现常见特效/Shader/upsidedown.glsl:
--------------------------------------------------------------------------------
1 | precision mediump float;
2 |
3 | varying vec2 vTexcoord;
4 | uniform sampler2D image;
5 |
6 | void main()
7 | {
8 | vec4 color = texture2D(image, vec2(vTexcoord.x, 1.0 - vTexcoord.y));
9 | gl_FragColor = color;
10 | }
11 |
--------------------------------------------------------------------------------
/OpenGLES09-GLSL实现常见特效/OpenGLES09-GLSL实现常见特效/Shader/vert.glsl:
--------------------------------------------------------------------------------
1 | attribute vec3 position;
2 | attribute vec2 texcoord;
3 |
4 | varying vec2 vTexcoord;
5 |
6 | void main()
7 | {
8 | gl_Position = vec4(position, 1.0);
9 | vTexcoord = texcoord;
10 | }
11 |
--------------------------------------------------------------------------------
/OpenGLES09-GLSL实现常见特效/OpenGLES09-GLSL实现常见特效/Shader/watercolor.glsl:
--------------------------------------------------------------------------------
1 | //http://tech.it168.com/n/2007-03-29/200703291522292_7.shtml
2 |
3 | precision mediump float;
4 |
5 | uniform sampler2D image;
6 | uniform sampler2D image1; //noise
7 |
8 | varying vec2 vTexcoord;
9 |
10 | const float uQuantLevel = 2.0; // 2-6
11 | const float uWaterPower = 8.0; // 8-64
12 |
13 | const vec2 texSize = vec2(256.0, 256.0);
14 |
15 | vec4 quant(vec4 cl, float n)
16 | {
17 | cl.x = floor(cl.x * 255.0/n)*n/255.0;
18 | cl.y = floor(cl.y * 255.0/n)*n/255.0;
19 | cl.z = floor(cl.z * 255.0/n)*n/255.0;
20 |
21 | return cl;
22 | }
23 |
24 | void main()
25 | {
26 | vec4 noiseColor = uWaterPower * texture2D(image1, vTexcoord);
27 | vec2 newUV = vec2(vTexcoord.x + noiseColor.x / texSize.x, vTexcoord.y + noiseColor.y / texSize.y);
28 | vec4 fColor = texture2D(image, newUV);
29 |
30 | vec4 color = quant(fColor, 255.0/pow(2.0, uQuantLevel));
31 | //vec4 color = vec4(1., 1., .5, 1.);
32 | gl_FragColor = color;
33 | }
34 |
--------------------------------------------------------------------------------
/OpenGLES09-GLSL实现常见特效/OpenGLES09-GLSL实现常见特效/Utils/jpeg/prebuilt/android/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH := $(call my-dir)
2 |
3 | include $(CLEAR_VARS)
4 | LOCAL_MODULE := cocos_jpeg_static
5 | LOCAL_MODULE_FILENAME := jpeg
6 | LOCAL_SRC_FILES := $(TARGET_ARCH_ABI)/libjpeg.a
7 | LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../include/android
8 | include $(PREBUILT_STATIC_LIBRARY)
9 |
--------------------------------------------------------------------------------
/OpenGLES09-GLSL实现常见特效/OpenGLES09-GLSL实现常见特效/Utils/jpeg/prebuilt/android/arm64-v8a/libjpeg.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES09-GLSL实现常见特效/OpenGLES09-GLSL实现常见特效/Utils/jpeg/prebuilt/android/arm64-v8a/libjpeg.a
--------------------------------------------------------------------------------
/OpenGLES09-GLSL实现常见特效/OpenGLES09-GLSL实现常见特效/Utils/jpeg/prebuilt/android/armeabi-v7a/libjpeg.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES09-GLSL实现常见特效/OpenGLES09-GLSL实现常见特效/Utils/jpeg/prebuilt/android/armeabi-v7a/libjpeg.a
--------------------------------------------------------------------------------
/OpenGLES09-GLSL实现常见特效/OpenGLES09-GLSL实现常见特效/Utils/jpeg/prebuilt/android/armeabi/libjpeg.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES09-GLSL实现常见特效/OpenGLES09-GLSL实现常见特效/Utils/jpeg/prebuilt/android/armeabi/libjpeg.a
--------------------------------------------------------------------------------
/OpenGLES09-GLSL实现常见特效/OpenGLES09-GLSL实现常见特效/Utils/jpeg/prebuilt/android/x86/libjpeg.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES09-GLSL实现常见特效/OpenGLES09-GLSL实现常见特效/Utils/jpeg/prebuilt/android/x86/libjpeg.a
--------------------------------------------------------------------------------
/OpenGLES09-GLSL实现常见特效/OpenGLES09-GLSL实现常见特效/Utils/jpeg/prebuilt/ios/libjpeg.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES09-GLSL实现常见特效/OpenGLES09-GLSL实现常见特效/Utils/jpeg/prebuilt/ios/libjpeg.a
--------------------------------------------------------------------------------
/OpenGLES09-GLSL实现常见特效/OpenGLES09-GLSL实现常见特效/Utils/png/PngUtil.h:
--------------------------------------------------------------------------------
1 | //
2 | // PngUtil.h
3 | // OpenGLES06-图像膨胀腐蚀模糊
4 | //
5 | // Created by mac on 17/2/14.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #ifndef PngUtil_h
10 | #define PngUtil_h
11 |
12 | #ifdef __cplusplus
13 | extern "C" {
14 | #endif
15 |
16 | #include
17 | #include
18 | #include
19 |
20 | /**
21 | PNG ALPHA
22 | */
23 | #define PNG_HAVE_ALPHA 1
24 | #define PNG_NO_ALPHA 0
25 |
26 | /**
27 | PNG info
28 | */
29 | typedef struct {
30 | int width, height; /* 尺寸 */
31 | int bit_depth; /* 位深 */
32 | int flag; /* 一个标志,表示是否有alpha通道 */
33 | unsigned char **rgba; /* 图片数组;r=rgba[0];g=rgba[1];b=rgba[2] */
34 | } pic_data;
35 |
36 | /**
37 | read png file
38 |
39 | @param filepath png file path
40 | @param out png info
41 |
42 | @return success or not
43 | */
44 | int read_png_file(const char *filepath, pic_data *out);
45 |
46 |
47 | /**
48 | write png file
49 |
50 | @param file_name png file name
51 | @param graph png data to write
52 |
53 | @return success or not
54 | */
55 | int write_png_file(const char *filename , pic_data *graph);
56 |
57 | #ifdef __cplusplus
58 | }
59 | #endif
60 | #endif /* PngUtil_h */
61 |
--------------------------------------------------------------------------------
/OpenGLES09-GLSL实现常见特效/OpenGLES09-GLSL实现常见特效/Utils/png/prebuilt/android/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH := $(call my-dir)
2 |
3 | include $(CLEAR_VARS)
4 | LOCAL_MODULE := cocos_png_static
5 | LOCAL_MODULE_FILENAME := png
6 | LOCAL_SRC_FILES := $(TARGET_ARCH_ABI)/libpng.a
7 | LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../include/android
8 | include $(PREBUILT_STATIC_LIBRARY)
9 |
--------------------------------------------------------------------------------
/OpenGLES09-GLSL实现常见特效/OpenGLES09-GLSL实现常见特效/Utils/png/prebuilt/android/arm64-v8a/libpng.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES09-GLSL实现常见特效/OpenGLES09-GLSL实现常见特效/Utils/png/prebuilt/android/arm64-v8a/libpng.a
--------------------------------------------------------------------------------
/OpenGLES09-GLSL实现常见特效/OpenGLES09-GLSL实现常见特效/Utils/png/prebuilt/android/armeabi-v7a/libpng.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES09-GLSL实现常见特效/OpenGLES09-GLSL实现常见特效/Utils/png/prebuilt/android/armeabi-v7a/libpng.a
--------------------------------------------------------------------------------
/OpenGLES09-GLSL实现常见特效/OpenGLES09-GLSL实现常见特效/Utils/png/prebuilt/android/armeabi/libpng.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES09-GLSL实现常见特效/OpenGLES09-GLSL实现常见特效/Utils/png/prebuilt/android/armeabi/libpng.a
--------------------------------------------------------------------------------
/OpenGLES09-GLSL实现常见特效/OpenGLES09-GLSL实现常见特效/Utils/png/prebuilt/android/x86/libpng.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES09-GLSL实现常见特效/OpenGLES09-GLSL实现常见特效/Utils/png/prebuilt/android/x86/libpng.a
--------------------------------------------------------------------------------
/OpenGLES09-GLSL实现常见特效/OpenGLES09-GLSL实现常见特效/Utils/png/prebuilt/ios/libpng.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES09-GLSL实现常见特效/OpenGLES09-GLSL实现常见特效/Utils/png/prebuilt/ios/libpng.a
--------------------------------------------------------------------------------
/OpenGLES09-GLSL实现常见特效/OpenGLES09-GLSL实现常见特效/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // OpenGLES01-环境搭建
4 | //
5 | // Created by qinmin on 2017/2/9.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/OpenGLES09-GLSL实现常见特效/OpenGLES09-GLSL实现常见特效/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // OpenGLES01-环境搭建
4 | //
5 | // Created by qinmin on 2017/2/9.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 | #import "OpenGLESView.h"
11 |
12 | @interface ViewController ()
13 |
14 | @end
15 |
16 | @implementation ViewController
17 |
18 | - (void)viewDidLoad {
19 | [super viewDidLoad];
20 | self.view = [[OpenGLESView alloc] initWithFrame:self.view.bounds];
21 |
22 | }
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/OpenGLES09-GLSL实现常见特效/OpenGLES09-GLSL实现常见特效/flower.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES09-GLSL实现常见特效/OpenGLES09-GLSL实现常见特效/flower.jpg
--------------------------------------------------------------------------------
/OpenGLES09-GLSL实现常见特效/OpenGLES09-GLSL实现常见特效/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // OpenGLES09-GLSL实现常见特效
4 | //
5 | // Created by qinmin on 2017/2/20.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/OpenGLES09-GLSL实现常见特效/OpenGLES09-GLSL实现常见特效/noise.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES09-GLSL实现常见特效/OpenGLES09-GLSL实现常见特效/noise.jpg
--------------------------------------------------------------------------------
/OpenGLES09-GLSL实现常见特效/OpenGLES09-GLSL实现常见特效/wood.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES09-GLSL实现常见特效/OpenGLES09-GLSL实现常见特效/wood.jpg
--------------------------------------------------------------------------------
/OpenGLES09-GLSL实现常见特效/OpenGLES09-GLSL实现常见特效Tests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/OpenGLES09-GLSL实现常见特效/OpenGLES09-GLSL实现常见特效Tests/OpenGLES09_GLSL______Tests.m:
--------------------------------------------------------------------------------
1 | //
2 | // OpenGLES09_GLSL______Tests.m
3 | // OpenGLES09-GLSL实现常见特效Tests
4 | //
5 | // Created by qinmin on 2017/2/20.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface OpenGLES09_GLSL______Tests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation OpenGLES09_GLSL______Tests
16 |
17 | - (void)setUp {
18 | [super setUp];
19 | // Put setup code here. This method is called before the invocation of each test method in the class.
20 | }
21 |
22 | - (void)tearDown {
23 | // Put teardown code here. This method is called after the invocation of each test method in the class.
24 | [super tearDown];
25 | }
26 |
27 | - (void)testExample {
28 | // This is an example of a functional test case.
29 | // Use XCTAssert and related functions to verify your tests produce the correct results.
30 | }
31 |
32 | - (void)testPerformanceExample {
33 | // This is an example of a performance test case.
34 | [self measureBlock:^{
35 | // Put the code you want to measure the time of here.
36 | }];
37 | }
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/OpenGLES09-GLSL实现常见特效/OpenGLES09-GLSL实现常见特效UITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/OpenGLES10-Instance技术/OpenGLES10-Instance技术.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/OpenGLES10-Instance技术/OpenGLES10-Instance技术.xcodeproj/project.xcworkspace/xcuserdata/qinmin.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES10-Instance技术/OpenGLES10-Instance技术.xcodeproj/project.xcworkspace/xcuserdata/qinmin.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/OpenGLES10-Instance技术/OpenGLES10-Instance技术.xcodeproj/xcuserdata/qinmin.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | OpenGLES10-Instance技术.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | B95462681E5A879400D0D59A
16 |
17 | primary
18 |
19 |
20 | B95462811E5A879400D0D59A
21 |
22 | primary
23 |
24 |
25 | B954628C1E5A879400D0D59A
26 |
27 | primary
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/OpenGLES10-Instance技术/OpenGLES10-Instance技术/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // OpenGLES10-Instance技术
4 | //
5 | // Created by qinmin on 2017/2/20.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/OpenGLES10-Instance技术/OpenGLES10-Instance技术/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/OpenGLES10-Instance技术/OpenGLES10-Instance技术/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/OpenGLES10-Instance技术/OpenGLES10-Instance技术/OpenGLESView.h:
--------------------------------------------------------------------------------
1 | //
2 | // OpenGLESView.h
3 | // OpenGLES01-环境搭建
4 | //
5 | // Created by qinmin on 2017/2/9.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface OpenGLESView : UIView
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/OpenGLES10-Instance技术/OpenGLES10-Instance技术/Shader/frag.glsl:
--------------------------------------------------------------------------------
1 | precision mediump float;
2 |
3 | uniform sampler2D image;
4 |
5 | varying vec2 vTexcoord;
6 |
7 | void main()
8 | {
9 | gl_FragColor = texture2D(image, vTexcoord);
10 | }
11 |
--------------------------------------------------------------------------------
/OpenGLES10-Instance技术/OpenGLES10-Instance技术/Shader/vert.glsl:
--------------------------------------------------------------------------------
1 | attribute vec3 position;
2 | attribute vec3 offset;
3 | attribute vec2 texcoord;
4 |
5 | varying vec2 vTexcoord;
6 |
7 | void main()
8 | {
9 | gl_Position = vec4(position+offset, 1.0);
10 | vTexcoord = texcoord;
11 | }
12 |
--------------------------------------------------------------------------------
/OpenGLES10-Instance技术/OpenGLES10-Instance技术/Utils/jpeg/prebuilt/android/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH := $(call my-dir)
2 |
3 | include $(CLEAR_VARS)
4 | LOCAL_MODULE := cocos_jpeg_static
5 | LOCAL_MODULE_FILENAME := jpeg
6 | LOCAL_SRC_FILES := $(TARGET_ARCH_ABI)/libjpeg.a
7 | LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../include/android
8 | include $(PREBUILT_STATIC_LIBRARY)
9 |
--------------------------------------------------------------------------------
/OpenGLES10-Instance技术/OpenGLES10-Instance技术/Utils/jpeg/prebuilt/android/arm64-v8a/libjpeg.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES10-Instance技术/OpenGLES10-Instance技术/Utils/jpeg/prebuilt/android/arm64-v8a/libjpeg.a
--------------------------------------------------------------------------------
/OpenGLES10-Instance技术/OpenGLES10-Instance技术/Utils/jpeg/prebuilt/android/armeabi-v7a/libjpeg.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES10-Instance技术/OpenGLES10-Instance技术/Utils/jpeg/prebuilt/android/armeabi-v7a/libjpeg.a
--------------------------------------------------------------------------------
/OpenGLES10-Instance技术/OpenGLES10-Instance技术/Utils/jpeg/prebuilt/android/armeabi/libjpeg.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES10-Instance技术/OpenGLES10-Instance技术/Utils/jpeg/prebuilt/android/armeabi/libjpeg.a
--------------------------------------------------------------------------------
/OpenGLES10-Instance技术/OpenGLES10-Instance技术/Utils/jpeg/prebuilt/android/x86/libjpeg.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES10-Instance技术/OpenGLES10-Instance技术/Utils/jpeg/prebuilt/android/x86/libjpeg.a
--------------------------------------------------------------------------------
/OpenGLES10-Instance技术/OpenGLES10-Instance技术/Utils/jpeg/prebuilt/ios/libjpeg.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES10-Instance技术/OpenGLES10-Instance技术/Utils/jpeg/prebuilt/ios/libjpeg.a
--------------------------------------------------------------------------------
/OpenGLES10-Instance技术/OpenGLES10-Instance技术/Utils/png/PngUtil.h:
--------------------------------------------------------------------------------
1 | //
2 | // PngUtil.h
3 | // OpenGLES06-图像膨胀腐蚀模糊
4 | //
5 | // Created by mac on 17/2/14.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #ifndef PngUtil_h
10 | #define PngUtil_h
11 |
12 | #ifdef __cplusplus
13 | extern "C" {
14 | #endif
15 |
16 | #include
17 | #include
18 | #include
19 |
20 | /**
21 | PNG ALPHA
22 | */
23 | #define PNG_HAVE_ALPHA 1
24 | #define PNG_NO_ALPHA 0
25 |
26 | /**
27 | PNG info
28 | */
29 | typedef struct {
30 | int width, height; /* 尺寸 */
31 | int bit_depth; /* 位深 */
32 | int flag; /* 一个标志,表示是否有alpha通道 */
33 | unsigned char **rgba; /* 图片数组;r=rgba[0];g=rgba[1];b=rgba[2] */
34 | } pic_data;
35 |
36 | /**
37 | read png file
38 |
39 | @param filepath png file path
40 | @param out png info
41 |
42 | @return success or not
43 | */
44 | int read_png_file(const char *filepath, pic_data *out);
45 |
46 |
47 | /**
48 | write png file
49 |
50 | @param file_name png file name
51 | @param graph png data to write
52 |
53 | @return success or not
54 | */
55 | int write_png_file(const char *filename , pic_data *graph);
56 |
57 | #ifdef __cplusplus
58 | }
59 | #endif
60 | #endif /* PngUtil_h */
61 |
--------------------------------------------------------------------------------
/OpenGLES10-Instance技术/OpenGLES10-Instance技术/Utils/png/prebuilt/android/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH := $(call my-dir)
2 |
3 | include $(CLEAR_VARS)
4 | LOCAL_MODULE := cocos_png_static
5 | LOCAL_MODULE_FILENAME := png
6 | LOCAL_SRC_FILES := $(TARGET_ARCH_ABI)/libpng.a
7 | LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../include/android
8 | include $(PREBUILT_STATIC_LIBRARY)
9 |
--------------------------------------------------------------------------------
/OpenGLES10-Instance技术/OpenGLES10-Instance技术/Utils/png/prebuilt/android/arm64-v8a/libpng.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES10-Instance技术/OpenGLES10-Instance技术/Utils/png/prebuilt/android/arm64-v8a/libpng.a
--------------------------------------------------------------------------------
/OpenGLES10-Instance技术/OpenGLES10-Instance技术/Utils/png/prebuilt/android/armeabi-v7a/libpng.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES10-Instance技术/OpenGLES10-Instance技术/Utils/png/prebuilt/android/armeabi-v7a/libpng.a
--------------------------------------------------------------------------------
/OpenGLES10-Instance技术/OpenGLES10-Instance技术/Utils/png/prebuilt/android/armeabi/libpng.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES10-Instance技术/OpenGLES10-Instance技术/Utils/png/prebuilt/android/armeabi/libpng.a
--------------------------------------------------------------------------------
/OpenGLES10-Instance技术/OpenGLES10-Instance技术/Utils/png/prebuilt/android/x86/libpng.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES10-Instance技术/OpenGLES10-Instance技术/Utils/png/prebuilt/android/x86/libpng.a
--------------------------------------------------------------------------------
/OpenGLES10-Instance技术/OpenGLES10-Instance技术/Utils/png/prebuilt/ios/libpng.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES10-Instance技术/OpenGLES10-Instance技术/Utils/png/prebuilt/ios/libpng.a
--------------------------------------------------------------------------------
/OpenGLES10-Instance技术/OpenGLES10-Instance技术/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // OpenGLES01-环境搭建
4 | //
5 | // Created by qinmin on 2017/2/9.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/OpenGLES10-Instance技术/OpenGLES10-Instance技术/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // OpenGLES01-环境搭建
4 | //
5 | // Created by qinmin on 2017/2/9.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 | #import "OpenGLESView.h"
11 |
12 | @interface ViewController ()
13 |
14 | @end
15 |
16 | @implementation ViewController
17 |
18 | - (void)viewDidLoad {
19 | [super viewDidLoad];
20 | self.view = [[OpenGLESView alloc] initWithFrame:self.view.bounds];
21 | }
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/OpenGLES10-Instance技术/OpenGLES10-Instance技术/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // OpenGLES10-Instance技术
4 | //
5 | // Created by qinmin on 2017/2/20.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/OpenGLES10-Instance技术/OpenGLES10-Instance技术/wood.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES10-Instance技术/OpenGLES10-Instance技术/wood.jpg
--------------------------------------------------------------------------------
/OpenGLES10-Instance技术/OpenGLES10-Instance技术Tests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/OpenGLES10-Instance技术/OpenGLES10-Instance技术Tests/OpenGLES10_Instance__Tests.m:
--------------------------------------------------------------------------------
1 | //
2 | // OpenGLES10_Instance__Tests.m
3 | // OpenGLES10-Instance技术Tests
4 | //
5 | // Created by qinmin on 2017/2/20.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface OpenGLES10_Instance__Tests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation OpenGLES10_Instance__Tests
16 |
17 | - (void)setUp {
18 | [super setUp];
19 | // Put setup code here. This method is called before the invocation of each test method in the class.
20 | }
21 |
22 | - (void)tearDown {
23 | // Put teardown code here. This method is called after the invocation of each test method in the class.
24 | [super tearDown];
25 | }
26 |
27 | - (void)testExample {
28 | // This is an example of a functional test case.
29 | // Use XCTAssert and related functions to verify your tests produce the correct results.
30 | }
31 |
32 | - (void)testPerformanceExample {
33 | // This is an example of a performance test case.
34 | [self measureBlock:^{
35 | // Put the code you want to measure the time of here.
36 | }];
37 | }
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/OpenGLES10-Instance技术/OpenGLES10-Instance技术UITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/OpenGLES11-相机视频渲染/OpenGLES11-相机视频渲染.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/OpenGLES11-相机视频渲染/OpenGLES11-相机视频渲染.xcodeproj/project.xcworkspace/xcuserdata/mac.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES11-相机视频渲染/OpenGLES11-相机视频渲染.xcodeproj/project.xcworkspace/xcuserdata/mac.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/OpenGLES11-相机视频渲染/OpenGLES11-相机视频渲染.xcodeproj/project.xcworkspace/xcuserdata/qinmin.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES11-相机视频渲染/OpenGLES11-相机视频渲染.xcodeproj/project.xcworkspace/xcuserdata/qinmin.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/OpenGLES11-相机视频渲染/OpenGLES11-相机视频渲染.xcodeproj/xcuserdata/mac.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/OpenGLES11-相机视频渲染/OpenGLES11-相机视频渲染.xcodeproj/xcuserdata/mac.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | OpenGLES11-相机视频渲染.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 041C4EC91E84B82800111213
16 |
17 | primary
18 |
19 |
20 | 041C4EE21E84B82800111213
21 |
22 | primary
23 |
24 |
25 | 041C4EED1E84B82800111213
26 |
27 | primary
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/OpenGLES11-相机视频渲染/OpenGLES11-相机视频渲染.xcodeproj/xcuserdata/qinmin.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/OpenGLES11-相机视频渲染/OpenGLES11-相机视频渲染.xcodeproj/xcuserdata/qinmin.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | OpenGLES11-相机视频渲染.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 041C4EC91E84B82800111213
16 |
17 | primary
18 |
19 |
20 | 041C4EE21E84B82800111213
21 |
22 | primary
23 |
24 |
25 | 041C4EED1E84B82800111213
26 |
27 | primary
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/OpenGLES11-相机视频渲染/OpenGLES11-相机视频渲染/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // OpenGLES11-相机视频渲染
4 | //
5 | // Created by mac on 17/3/24.
6 | // Copyright © 2017年 Qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/OpenGLES11-相机视频渲染/OpenGLES11-相机视频渲染/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/OpenGLES11-相机视频渲染/OpenGLES11-相机视频渲染/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/OpenGLES11-相机视频渲染/OpenGLES11-相机视频渲染/OpenGLESView.h:
--------------------------------------------------------------------------------
1 | //
2 | // OpenGLESView.h
3 | // OpenGLES01-环境搭建
4 | //
5 | // Created by qinmin on 2017/2/9.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "GLTexture.h"
11 | #import "GLRender.h"
12 |
13 | @interface OpenGLESView : UIView
14 | @property (nonatomic, strong) GLRender *render;
15 | - (void)setTexture:(GLTexture *)texture;
16 | - (void)setNeedDraw;
17 | @end
18 |
--------------------------------------------------------------------------------
/OpenGLES11-相机视频渲染/OpenGLES11-相机视频渲染/Render/GLRender.h:
--------------------------------------------------------------------------------
1 | //
2 | // GLRGBRender.h
3 | // OpenGLES11-相机视频渲染
4 | //
5 | // Created by mac on 17/3/24.
6 | // Copyright © 2017年 Qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "GLTexture.h"
11 | #import "GLUtil.h"
12 |
13 | @interface GLRender : NSObject
14 | @property (nonatomic, assign) GLuint program;
15 | @property (nonatomic, assign) GLuint vertexVBO;
16 | @property (nonatomic, assign) int vertCount;
17 | - (void)setTexture:(GLTexture *)texture;
18 | - (void)prepareRender;
19 | @end
20 |
21 | @interface GLRenderRGB : GLRender
22 | @property(nonatomic, assign, readonly) GLuint rgb;
23 | @end
24 |
25 | @interface GLRenderYUV : GLRender
26 | @property(nonatomic, assign, readonly) GLuint y;
27 | @property(nonatomic, assign, readonly) GLuint u;
28 | @property(nonatomic, assign, readonly) GLuint v;
29 | @end
30 |
--------------------------------------------------------------------------------
/OpenGLES11-相机视频渲染/OpenGLES11-相机视频渲染/Shader/frag.glsl:
--------------------------------------------------------------------------------
1 | precision mediump float;
2 |
3 | varying vec2 v_texcoord;
4 |
5 | uniform sampler2D image0;
6 | uniform sampler2D image1;
7 | uniform sampler2D image2;
8 |
9 | void main()
10 | {
11 | highp float y = texture2D(image0, v_texcoord).r;
12 | highp float u = texture2D(image1, v_texcoord).r - 0.5;
13 | highp float v = texture2D(image2, v_texcoord).r - 0.5;
14 |
15 | highp float r = y + 0.000 + 1.402 * v;
16 | highp float g = y - 0.344 * u - 0.714 * v;
17 | highp float b = y + 1.772 * u;
18 |
19 | gl_FragColor = vec4(r, g, b, 1.0);
20 | }
21 |
--------------------------------------------------------------------------------
/OpenGLES11-相机视频渲染/OpenGLES11-相机视频渲染/Shader/frag_rgb.glsl:
--------------------------------------------------------------------------------
1 | precision mediump float;
2 |
3 | varying vec2 v_texcoord;
4 |
5 | uniform sampler2D image0;
6 |
7 | void main()
8 | {
9 | // bgra
10 | // rgba
11 | vec4 color = texture2D(image0, v_texcoord);
12 | gl_FragColor = vec4(color.bgr, 1.0);
13 | }
14 |
--------------------------------------------------------------------------------
/OpenGLES11-相机视频渲染/OpenGLES11-相机视频渲染/Shader/vert.glsl:
--------------------------------------------------------------------------------
1 | attribute vec3 position;
2 | attribute vec3 color;
3 | attribute vec2 texcoord;
4 |
5 | varying vec2 v_texcoord;
6 |
7 | void main()
8 | {
9 | const float degree = radians(-90.0);
10 |
11 | const mat3 rotate = mat3(
12 | cos(degree), sin(degree), 0.0,
13 | -sin(degree), cos(degree), 0.0,
14 | 0.0, 0.0, 1.0
15 | );
16 |
17 | gl_Position = vec4(rotate*position, 1.0);
18 | v_texcoord = texcoord;
19 | }
20 |
--------------------------------------------------------------------------------
/OpenGLES11-相机视频渲染/OpenGLES11-相机视频渲染/Texture/GLTexture.h:
--------------------------------------------------------------------------------
1 | //
2 | // GLTexture.h
3 | // OpenGLES11-相机视频渲染
4 | //
5 | // Created by mac on 17/3/24.
6 | // Copyright © 2017年 Qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface GLTexture : NSObject
12 | @property (assign, nonatomic) int width;
13 | @property (assign, nonatomic) int height;
14 | @end
15 |
16 | @interface GLTextureRGB : GLTexture
17 | @property (nonatomic, assign) uint8_t *RGBA;
18 | @end
19 |
20 | @interface GLTextureYUV : GLTexture
21 | @property (nonatomic, assign) uint8_t *Y;
22 | @property (nonatomic, assign) uint8_t *U;
23 | @property (nonatomic, assign) uint8_t *V;
24 | @end
25 |
--------------------------------------------------------------------------------
/OpenGLES11-相机视频渲染/OpenGLES11-相机视频渲染/Texture/GLTexture.m:
--------------------------------------------------------------------------------
1 | //
2 | // GLTexture.m
3 | // OpenGLES11-相机视频渲染
4 | //
5 | // Created by mac on 17/3/24.
6 | // Copyright © 2017年 Qinmin. All rights reserved.
7 | //
8 |
9 | #import "GLTexture.h"
10 |
11 | @implementation GLTexture
12 | @end
13 |
14 | @implementation GLTextureRGB
15 | - (void)dealloc
16 | {
17 | if (_RGBA) {
18 | free(_RGBA);
19 | _RGBA = NULL;
20 | }
21 | }
22 | @end
23 |
24 | @implementation GLTextureYUV
25 | - (void)dealloc
26 | {
27 | if (_Y) {
28 | free(_Y);
29 | _Y = NULL;
30 | }
31 |
32 | if (_U) {
33 | free(_U);
34 | _U = NULL;
35 | }
36 |
37 | if (_V) {
38 | free(_V);
39 | _V = NULL;
40 | }
41 | }
42 | @end
43 |
--------------------------------------------------------------------------------
/OpenGLES11-相机视频渲染/OpenGLES11-相机视频渲染/Vendors/libyuv/include/libyuv.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2011 The LibYuv Project Authors. All rights reserved.
3 | *
4 | * Use of this source code is governed by a BSD-style license
5 | * that can be found in the LICENSE file in the root of the source
6 | * tree. An additional intellectual property rights grant can be found
7 | * in the file PATENTS. All contributing project authors may
8 | * be found in the AUTHORS file in the root of the source tree.
9 | */
10 |
11 | #ifndef INCLUDE_LIBYUV_H_ // NOLINT
12 | #define INCLUDE_LIBYUV_H_
13 |
14 | #include "libyuv/basic_types.h"
15 | #include "libyuv/compare.h"
16 | #include "libyuv/convert.h"
17 | #include "libyuv/convert_argb.h"
18 | #include "libyuv/convert_from.h"
19 | #include "libyuv/convert_from_argb.h"
20 | #include "libyuv/cpu_id.h"
21 | #include "libyuv/format_conversion.h"
22 | #include "libyuv/mjpeg_decoder.h"
23 | #include "libyuv/planar_functions.h"
24 | #include "libyuv/rotate.h"
25 | #include "libyuv/rotate_argb.h"
26 | #include "libyuv/row.h"
27 | #include "libyuv/scale.h"
28 | #include "libyuv/scale_argb.h"
29 | #include "libyuv/scale_row.h"
30 | #include "libyuv/version.h"
31 | #include "libyuv/video_common.h"
32 |
33 | #endif // INCLUDE_LIBYUV_H_ NOLINT
34 |
--------------------------------------------------------------------------------
/OpenGLES11-相机视频渲染/OpenGLES11-相机视频渲染/Vendors/libyuv/include/libyuv/rotate_argb.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012 The LibYuv Project Authors. All rights reserved.
3 | *
4 | * Use of this source code is governed by a BSD-style license
5 | * that can be found in the LICENSE file in the root of the source
6 | * tree. An additional intellectual property rights grant can be found
7 | * in the file PATENTS. All contributing project authors may
8 | * be found in the AUTHORS file in the root of the source tree.
9 | */
10 |
11 | #ifndef INCLUDE_LIBYUV_ROTATE_ARGB_H_ // NOLINT
12 | #define INCLUDE_LIBYUV_ROTATE_ARGB_H_
13 |
14 | #include "libyuv/basic_types.h"
15 | #include "libyuv/rotate.h" // For RotationMode.
16 |
17 | #ifdef __cplusplus
18 | namespace libyuv {
19 | extern "C" {
20 | #endif
21 |
22 | // Rotate ARGB frame
23 | LIBYUV_API
24 | int ARGBRotate(const uint8* src_argb, int src_stride_argb,
25 | uint8* dst_argb, int dst_stride_argb,
26 | int src_width, int src_height, enum RotationMode mode);
27 |
28 | #ifdef __cplusplus
29 | } // extern "C"
30 | } // namespace libyuv
31 | #endif
32 |
33 | #endif // INCLUDE_LIBYUV_ROTATE_ARGB_H_ NOLINT
34 |
--------------------------------------------------------------------------------
/OpenGLES11-相机视频渲染/OpenGLES11-相机视频渲染/Vendors/libyuv/include/libyuv/version.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012 The LibYuv Project Authors. All rights reserved.
3 | *
4 | * Use of this source code is governed by a BSD-style license
5 | * that can be found in the LICENSE file in the root of the source
6 | * tree. An additional intellectual property rights grant can be found
7 | * in the file PATENTS. All contributing project authors may
8 | * be found in the AUTHORS file in the root of the source tree.
9 | */
10 |
11 | #ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
12 | #define INCLUDE_LIBYUV_VERSION_H_
13 |
14 | #define LIBYUV_VERSION 1170
15 |
16 | #endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
17 |
--------------------------------------------------------------------------------
/OpenGLES11-相机视频渲染/OpenGLES11-相机视频渲染/Vendors/libyuv/lib/libyuv.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES11-相机视频渲染/OpenGLES11-相机视频渲染/Vendors/libyuv/lib/libyuv.a
--------------------------------------------------------------------------------
/OpenGLES11-相机视频渲染/OpenGLES11-相机视频渲染/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // OpenGLES11-相机视频渲染
4 | //
5 | // Created by mac on 17/3/24.
6 | // Copyright © 2017年 Qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/OpenGLES11-相机视频渲染/OpenGLES11-相机视频渲染/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // OpenGLES11-相机视频渲染
4 | //
5 | // Created by mac on 17/3/24.
6 | // Copyright © 2017年 Qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/OpenGLES11-相机视频渲染/OpenGLES11-相机视频渲染Tests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/OpenGLES11-相机视频渲染/OpenGLES11-相机视频渲染Tests/OpenGLES11_______Tests.m:
--------------------------------------------------------------------------------
1 | //
2 | // OpenGLES11_______Tests.m
3 | // OpenGLES11-相机视频渲染Tests
4 | //
5 | // Created by mac on 17/3/24.
6 | // Copyright © 2017年 Qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface OpenGLES11_______Tests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation OpenGLES11_______Tests
16 |
17 | - (void)setUp {
18 | [super setUp];
19 | // Put setup code here. This method is called before the invocation of each test method in the class.
20 | }
21 |
22 | - (void)tearDown {
23 | // Put teardown code here. This method is called after the invocation of each test method in the class.
24 | [super tearDown];
25 | }
26 |
27 | - (void)testExample {
28 | // This is an example of a functional test case.
29 | // Use XCTAssert and related functions to verify your tests produce the correct results.
30 | }
31 |
32 | - (void)testPerformanceExample {
33 | // This is an example of a performance test case.
34 | [self measureBlock:^{
35 | // Put the code you want to measure the time of here.
36 | }];
37 | }
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/OpenGLES11-相机视频渲染/OpenGLES11-相机视频渲染UITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/OpenGLES12-帧缓存/OpenGLES12-帧缓存.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/OpenGLES12-帧缓存/OpenGLES12-帧缓存.xcodeproj/project.xcworkspace/xcuserdata/qinmin.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES12-帧缓存/OpenGLES12-帧缓存.xcodeproj/project.xcworkspace/xcuserdata/qinmin.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/OpenGLES12-帧缓存/OpenGLES12-帧缓存.xcodeproj/xcuserdata/qinmin.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/OpenGLES12-帧缓存/OpenGLES12-帧缓存.xcodeproj/xcuserdata/qinmin.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | OpenGLES12-帧缓存.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | B95D62791E907CCA001B1618
16 |
17 | primary
18 |
19 |
20 | B95D62921E907CCA001B1618
21 |
22 | primary
23 |
24 |
25 | B95D629D1E907CCA001B1618
26 |
27 | primary
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/OpenGLES12-帧缓存/OpenGLES12-帧缓存/1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES12-帧缓存/OpenGLES12-帧缓存/1.jpg
--------------------------------------------------------------------------------
/OpenGLES12-帧缓存/OpenGLES12-帧缓存/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // OpenGLES12-帧缓存
4 | //
5 | // Created by qinmin on 2017/4/2.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/OpenGLES12-帧缓存/OpenGLES12-帧缓存/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "20x20",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "20x20",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "29x29",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "29x29",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "40x40",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "40x40",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "size" : "60x60",
36 | "scale" : "2x"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "size" : "60x60",
41 | "scale" : "3x"
42 | }
43 | ],
44 | "info" : {
45 | "version" : 1,
46 | "author" : "xcode"
47 | }
48 | }
--------------------------------------------------------------------------------
/OpenGLES12-帧缓存/OpenGLES12-帧缓存/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/OpenGLES12-帧缓存/OpenGLES12-帧缓存/OpenGLESView.h:
--------------------------------------------------------------------------------
1 | //
2 | // OpenGLESView.h
3 | // OpenGLES01-环境搭建
4 | //
5 | // Created by qinmin on 2017/2/9.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface OpenGLESView : UIView
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/OpenGLES12-帧缓存/OpenGLES12-帧缓存/Shader/frag.glsl:
--------------------------------------------------------------------------------
1 | precision highp float;
2 |
3 | uniform sampler2D image;
4 |
5 | varying vec2 vTexcoord;
6 |
7 | const highp vec3 W = vec3(0.2125, 0.7154, 0.0721);
8 |
9 | void main()
10 | {
11 | lowp vec4 textureColor = texture2D(image, vTexcoord);
12 | float luminance = dot(textureColor.rgb, W);
13 |
14 | gl_FragColor = vec4(vec3(luminance), textureColor.a);
15 | }
16 |
--------------------------------------------------------------------------------
/OpenGLES12-帧缓存/OpenGLES12-帧缓存/Shader/mosaic.glsl:
--------------------------------------------------------------------------------
1 | precision mediump float;
2 |
3 | varying vec2 vTexcoord;
4 | uniform sampler2D image;
5 | const vec2 TexSize = vec2(400.0, 400.0);
6 | const vec2 mosaicSize = vec2(8.0, 8.0);
7 |
8 | void main()
9 | {
10 | vec2 intXY = vec2(vTexcoord.x*TexSize.x, vTexcoord.y*TexSize.y);
11 | vec2 XYMosaic = vec2(floor(intXY.x/mosaicSize.x)*mosaicSize.x, floor(intXY.y/mosaicSize.y)*mosaicSize.y);
12 | vec2 UVMosaic = vec2(XYMosaic.x/TexSize.x, XYMosaic.y/TexSize.y);
13 | vec4 color = texture2D(image, UVMosaic);
14 | gl_FragColor = color;
15 | }
16 |
--------------------------------------------------------------------------------
/OpenGLES12-帧缓存/OpenGLES12-帧缓存/Shader/vert.glsl:
--------------------------------------------------------------------------------
1 | attribute vec3 position;
2 | attribute vec2 texcoord;
3 |
4 | varying vec2 vTexcoord;
5 |
6 | void main()
7 | {
8 | gl_Position = vec4(position, 1.0);
9 | vTexcoord = texcoord;
10 | }
11 |
--------------------------------------------------------------------------------
/OpenGLES12-帧缓存/OpenGLES12-帧缓存/Utils/jpeg/JpegUtil.h:
--------------------------------------------------------------------------------
1 | //
2 | // JpegUtil.h
3 | // OpenGLES05-纹理贴图
4 | //
5 | // Created by qinmin on 2017/2/13.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #ifndef JpegUtil_h
10 | #define JpegUtil_h
11 |
12 | #ifdef __cplusplus
13 | extern "C" {
14 | #endif
15 |
16 | #include
17 | #include
18 | #include
19 | #include
20 |
21 | /**
22 | read jpeg file
23 |
24 | @param jpegfile jpeg file path
25 | @param data jpeg color data
26 | @param size jpeg color data size
27 | @param width jpeg file width
28 | @param height jpeg file height
29 | @return decode success or not
30 | */
31 | int read_jpeg_file(const char* jpegfile,
32 | unsigned char** data,
33 | int* size,
34 | int* width,
35 | int* height);
36 |
37 |
38 | /**
39 | write jpeg file
40 |
41 | @param jpegfile write file path
42 | @param data rgb data
43 | @param width file width
44 | @param height file height
45 | @param quality image quality
46 | @return write success or not
47 | */
48 | int write_jpeg_file(const char* jpegfile,
49 | unsigned char* data,
50 | int width,
51 | int height,
52 | int quality);
53 |
54 | #ifdef __cplusplus
55 | }
56 | #endif
57 |
58 | #endif /* JpegUtil_h */
59 |
--------------------------------------------------------------------------------
/OpenGLES12-帧缓存/OpenGLES12-帧缓存/Utils/jpeg/prebuilt/ios/libjpeg.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES12-帧缓存/OpenGLES12-帧缓存/Utils/jpeg/prebuilt/ios/libjpeg.a
--------------------------------------------------------------------------------
/OpenGLES12-帧缓存/OpenGLES12-帧缓存/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // OpenGLES01-环境搭建
4 | //
5 | // Created by qinmin on 2017/2/9.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/OpenGLES12-帧缓存/OpenGLES12-帧缓存/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // OpenGLES01-环境搭建
4 | //
5 | // Created by qinmin on 2017/2/9.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 | #import "OpenGLESView.h"
11 |
12 | @interface ViewController ()
13 |
14 | @end
15 |
16 | @implementation ViewController
17 |
18 | - (void)viewDidLoad {
19 | [super viewDidLoad];
20 | self.view = [[OpenGLESView alloc] initWithFrame:self.view.bounds];
21 | }
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/OpenGLES12-帧缓存/OpenGLES12-帧缓存/flower.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES12-帧缓存/OpenGLES12-帧缓存/flower.jpg
--------------------------------------------------------------------------------
/OpenGLES12-帧缓存/OpenGLES12-帧缓存/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // OpenGLES12-帧缓存
4 | //
5 | // Created by qinmin on 2017/4/2.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/OpenGLES12-帧缓存/OpenGLES12-帧缓存/pic.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES12-帧缓存/OpenGLES12-帧缓存/pic.jpg
--------------------------------------------------------------------------------
/OpenGLES12-帧缓存/OpenGLES12-帧缓存/wood.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES12-帧缓存/OpenGLES12-帧缓存/wood.jpg
--------------------------------------------------------------------------------
/OpenGLES12-帧缓存/OpenGLES12-帧缓存Tests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/OpenGLES12-帧缓存/OpenGLES12-帧缓存Tests/OpenGLES12____Tests.m:
--------------------------------------------------------------------------------
1 | //
2 | // OpenGLES12____Tests.m
3 | // OpenGLES12-帧缓存Tests
4 | //
5 | // Created by qinmin on 2017/4/2.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface OpenGLES12____Tests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation OpenGLES12____Tests
16 |
17 | - (void)setUp {
18 | [super setUp];
19 | // Put setup code here. This method is called before the invocation of each test method in the class.
20 | }
21 |
22 | - (void)tearDown {
23 | // Put teardown code here. This method is called after the invocation of each test method in the class.
24 | [super tearDown];
25 | }
26 |
27 | - (void)testExample {
28 | // This is an example of a functional test case.
29 | // Use XCTAssert and related functions to verify your tests produce the correct results.
30 | }
31 |
32 | - (void)testPerformanceExample {
33 | // This is an example of a performance test case.
34 | [self measureBlock:^{
35 | // Put the code you want to measure the time of here.
36 | }];
37 | }
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/OpenGLES12-帧缓存/OpenGLES12-帧缓存UITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/OpenGLES13-混合/OpenGLES13-混合.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/OpenGLES13-混合/OpenGLES13-混合.xcodeproj/project.xcworkspace/xcuserdata/mac.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES13-混合/OpenGLES13-混合.xcodeproj/project.xcworkspace/xcuserdata/mac.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/OpenGLES13-混合/OpenGLES13-混合.xcodeproj/project.xcworkspace/xcuserdata/qinmin.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES13-混合/OpenGLES13-混合.xcodeproj/project.xcworkspace/xcuserdata/qinmin.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/OpenGLES13-混合/OpenGLES13-混合.xcodeproj/xcuserdata/mac.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/OpenGLES13-混合/OpenGLES13-混合.xcodeproj/xcuserdata/mac.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | OpenGLES13-混合.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 041352701EAF3ED600433243
16 |
17 | primary
18 |
19 |
20 | 041352891EAF3ED600433243
21 |
22 | primary
23 |
24 |
25 | 041352941EAF3ED600433243
26 |
27 | primary
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/OpenGLES13-混合/OpenGLES13-混合.xcodeproj/xcuserdata/qinmin.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/OpenGLES13-混合/OpenGLES13-混合.xcodeproj/xcuserdata/qinmin.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | OpenGLES13-混合.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 041352701EAF3ED600433243
16 |
17 | primary
18 |
19 |
20 | 041352891EAF3ED600433243
21 |
22 | primary
23 |
24 |
25 | 041352941EAF3ED600433243
26 |
27 | primary
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/OpenGLES13-混合/OpenGLES13-混合/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // OpenGLES13-混合
4 | //
5 | // Created by mac on 17/4/25.
6 | // Copyright © 2017年 Qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/OpenGLES13-混合/OpenGLES13-混合/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/OpenGLES13-混合/OpenGLES13-混合/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/OpenGLES13-混合/OpenGLES13-混合/OpenGLESView.h:
--------------------------------------------------------------------------------
1 | //
2 | // OpenGLESView.h
3 | // OpenGLES01-环境搭建
4 | //
5 | // Created by qinmin on 2017/2/9.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface OpenGLESView : UIView
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/OpenGLES13-混合/OpenGLES13-混合/Shader/frag.glsl:
--------------------------------------------------------------------------------
1 | precision mediump float;
2 |
3 | uniform sampler2D image;
4 | uniform sampler2D image1;
5 |
6 | varying vec2 vTexcoord;
7 |
8 | void main()
9 | {
10 | gl_FragColor = texture2D(image, vTexcoord);
11 | }
12 |
13 | //void main()
14 | //{
15 | // vec4 des = vec4(1.0, 0.0, 0.0, 1.0);
16 | // vec4 src = texture2D(image1, vTexcoord);
17 | // vec4 bld;
18 | // if (vTexcoord.x <= 0.43) {
19 | // bld = vec4(vec3(des), src.a);
20 | // }else {
21 | // bld = src;
22 | // }
23 | //
24 | // gl_FragColor = bld * bld.a + vec4(1.0) * (1.0 - bld.a);
25 | //}
26 |
--------------------------------------------------------------------------------
/OpenGLES13-混合/OpenGLES13-混合/Shader/vert.glsl:
--------------------------------------------------------------------------------
1 | attribute vec3 position;
2 | attribute vec2 texcoord;
3 |
4 | varying vec2 vTexcoord;
5 |
6 | void main()
7 | {
8 | gl_Position = vec4(position, 1.0);
9 | vTexcoord = texcoord;
10 | }
11 |
--------------------------------------------------------------------------------
/OpenGLES13-混合/OpenGLES13-混合/Utils/PngUtil.h:
--------------------------------------------------------------------------------
1 | //
2 | // PngUtil.h
3 | // OpenGLES06-图像膨胀腐蚀模糊
4 | //
5 | // Created by mac on 17/2/14.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #ifndef PngUtil_h
10 | #define PngUtil_h
11 |
12 | #ifdef __cplusplus
13 | extern "C" {
14 | #endif
15 |
16 | #include
17 | #include
18 | #include
19 |
20 | /**
21 | PNG ALPHA
22 | */
23 | #define PNG_HAVE_ALPHA 1
24 | #define PNG_NO_ALPHA 0
25 |
26 | /**
27 | PNG info
28 | */
29 | typedef struct {
30 | int width, height; /* 尺寸 */
31 | int bit_depth; /* 位深 */
32 | int flag; /* 一个标志,表示是否有alpha通道 */
33 | unsigned char *rgba; /* 图片数组;RGB or RGBA */
34 | } pic_data;
35 |
36 | /**
37 | read png file
38 |
39 | @param filepath png file path
40 | @param out png info
41 |
42 | @return success or not
43 | */
44 | int read_png_file(const char *filepath, pic_data *out);
45 |
46 |
47 | /**
48 | write png file
49 |
50 | @param filename png file name
51 | @param graph png data to write
52 |
53 | @return success or not
54 | */
55 | int write_png_file(const char *filename , pic_data *graph);
56 |
57 | #ifdef __cplusplus
58 | }
59 | #endif
60 | #endif /* PngUtil_h */
61 |
--------------------------------------------------------------------------------
/OpenGLES13-混合/OpenGLES13-混合/Utils/jpeg/JpegUtil.h:
--------------------------------------------------------------------------------
1 | //
2 | // JpegUtil.h
3 | // OpenGLES05-纹理贴图
4 | //
5 | // Created by qinmin on 2017/2/13.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #ifndef JpegUtil_h
10 | #define JpegUtil_h
11 |
12 | #ifdef __cplusplus
13 | extern "C" {
14 | #endif
15 |
16 | #include
17 | #include
18 | #include
19 | #include
20 |
21 | /**
22 | read jpeg file
23 |
24 | @param jpegfile jpeg file path
25 | @param data jpeg color data
26 | @param size jpeg color data size
27 | @param width jpeg file width
28 | @param height jpeg file height
29 | @return decode success or not
30 | */
31 | int read_jpeg_file(const char* jpegfile,
32 | unsigned char** data,
33 | int* size,
34 | int* width,
35 | int* height);
36 |
37 |
38 | /**
39 | write jpeg file
40 |
41 | @param jpegfile write file path
42 | @param data rgb data
43 | @param width file width
44 | @param height file height
45 | @param quality image quality
46 | @return write success or not
47 | */
48 | int write_jpeg_file(const char* jpegfile,
49 | unsigned char* data,
50 | int width,
51 | int height,
52 | int quality);
53 |
54 | #ifdef __cplusplus
55 | }
56 | #endif
57 |
58 | #endif /* JpegUtil_h */
59 |
--------------------------------------------------------------------------------
/OpenGLES13-混合/OpenGLES13-混合/Utils/jpeg/prebuilt/ios/libjpeg.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES13-混合/OpenGLES13-混合/Utils/jpeg/prebuilt/ios/libjpeg.a
--------------------------------------------------------------------------------
/OpenGLES13-混合/OpenGLES13-混合/Utils/png/prebuilt/ios/libpng.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES13-混合/OpenGLES13-混合/Utils/png/prebuilt/ios/libpng.a
--------------------------------------------------------------------------------
/OpenGLES13-混合/OpenGLES13-混合/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // OpenGLES01-环境搭建
4 | //
5 | // Created by qinmin on 2017/2/9.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/OpenGLES13-混合/OpenGLES13-混合/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // OpenGLES01-环境搭建
4 | //
5 | // Created by qinmin on 2017/2/9.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 | #import "OpenGLESView.h"
11 |
12 | @interface ViewController ()
13 |
14 | @end
15 |
16 | @implementation ViewController
17 |
18 | - (void)viewDidLoad {
19 | [super viewDidLoad];
20 | self.view = [[OpenGLESView alloc] initWithFrame:self.view.bounds];
21 | }
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/OpenGLES13-混合/OpenGLES13-混合/flower.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES13-混合/OpenGLES13-混合/flower.jpg
--------------------------------------------------------------------------------
/OpenGLES13-混合/OpenGLES13-混合/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // OpenGLES13-混合
4 | //
5 | // Created by mac on 17/4/25.
6 | // Copyright © 2017年 Qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/OpenGLES13-混合/OpenGLES13-混合/pic.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES13-混合/OpenGLES13-混合/pic.jpg
--------------------------------------------------------------------------------
/OpenGLES13-混合/OpenGLES13-混合/text.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES13-混合/OpenGLES13-混合/text.png
--------------------------------------------------------------------------------
/OpenGLES13-混合/OpenGLES13-混合/wood.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES13-混合/OpenGLES13-混合/wood.jpg
--------------------------------------------------------------------------------
/OpenGLES13-混合/OpenGLES13-混合/wood.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES13-混合/OpenGLES13-混合/wood.png
--------------------------------------------------------------------------------
/OpenGLES13-混合/OpenGLES13-混合Tests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/OpenGLES13-混合/OpenGLES13-混合Tests/OpenGLES13___Tests.m:
--------------------------------------------------------------------------------
1 | //
2 | // OpenGLES13___Tests.m
3 | // OpenGLES13-混合Tests
4 | //
5 | // Created by mac on 17/4/25.
6 | // Copyright © 2017年 Qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface OpenGLES13___Tests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation OpenGLES13___Tests
16 |
17 | - (void)setUp {
18 | [super setUp];
19 | // Put setup code here. This method is called before the invocation of each test method in the class.
20 | }
21 |
22 | - (void)tearDown {
23 | // Put teardown code here. This method is called after the invocation of each test method in the class.
24 | [super tearDown];
25 | }
26 |
27 | - (void)testExample {
28 | // This is an example of a functional test case.
29 | // Use XCTAssert and related functions to verify your tests produce the correct results.
30 | }
31 |
32 | - (void)testPerformanceExample {
33 | // This is an example of a performance test case.
34 | [self measureBlock:^{
35 | // Put the code you want to measure the time of here.
36 | }];
37 | }
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/OpenGLES13-混合/OpenGLES13-混合UITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/OpenGLES14-深度测试/OpenGLES14-深度测试.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/OpenGLES14-深度测试/OpenGLES14-深度测试.xcodeproj/project.xcworkspace/xcuserdata/qinmin.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES14-深度测试/OpenGLES14-深度测试.xcodeproj/project.xcworkspace/xcuserdata/qinmin.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/OpenGLES14-深度测试/OpenGLES14-深度测试.xcodeproj/xcuserdata/qinmin.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | OpenGLES14-深度测试.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | B9A4415B1ED6E5FA00023543
16 |
17 | primary
18 |
19 |
20 | B9A441741ED6E5FA00023543
21 |
22 | primary
23 |
24 |
25 | B9A4417F1ED6E5FA00023543
26 |
27 | primary
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/OpenGLES14-深度测试/OpenGLES14-深度测试/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // OpenGLES14-深度测试
4 | //
5 | // Created by qinmin on 2017/5/25.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/OpenGLES14-深度测试/OpenGLES14-深度测试/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/OpenGLES14-深度测试/OpenGLES14-深度测试/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/OpenGLES14-深度测试/OpenGLES14-深度测试/OpenGLESView.h:
--------------------------------------------------------------------------------
1 | //
2 | // OpenGLESView.h
3 | // OpenGLES01-环境搭建
4 | //
5 | // Created by qinmin on 2017/2/9.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface OpenGLESView : UIView
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/OpenGLES14-深度测试/OpenGLES14-深度测试/Shader/frag.glsl:
--------------------------------------------------------------------------------
1 | precision mediump float;
2 |
3 | uniform sampler2D image;
4 |
5 | varying vec2 vTexcoord;
6 |
7 | void main()
8 | {
9 | //float depth = gl_FragCoord.z;
10 | //gl_FragColor = vec4(vec3(depth), 1.0);
11 | gl_FragColor = texture2D(image, vec2(vTexcoord.x, 1.0 - vTexcoord.y));
12 | }
13 |
--------------------------------------------------------------------------------
/OpenGLES14-深度测试/OpenGLES14-深度测试/Shader/vert.glsl:
--------------------------------------------------------------------------------
1 | attribute vec3 position;
2 | attribute vec2 texcoord;
3 |
4 | uniform mat4 projection;
5 | uniform mat4 modelView;
6 |
7 | varying vec2 vTexcoord;
8 |
9 | void main()
10 | {
11 | gl_Position = projection * modelView * vec4(position, 1.0);
12 | vTexcoord = texcoord;
13 | }
14 |
--------------------------------------------------------------------------------
/OpenGLES14-深度测试/OpenGLES14-深度测试/Utils/jpeg/prebuilt/ios/libjpeg.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES14-深度测试/OpenGLES14-深度测试/Utils/jpeg/prebuilt/ios/libjpeg.a
--------------------------------------------------------------------------------
/OpenGLES14-深度测试/OpenGLES14-深度测试/Utils/png/PngUtil.h:
--------------------------------------------------------------------------------
1 | //
2 | // PngUtil.h
3 | // OpenGLES06-图像膨胀腐蚀模糊
4 | //
5 | // Created by mac on 17/2/14.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #ifndef PngUtil_h
10 | #define PngUtil_h
11 |
12 | #ifdef __cplusplus
13 | extern "C" {
14 | #endif
15 |
16 | #include
17 | #include
18 | #include
19 |
20 | /**
21 | PNG ALPHA
22 | */
23 | #define PNG_HAVE_ALPHA 1
24 | #define PNG_NO_ALPHA 0
25 |
26 | /**
27 | PNG info
28 | */
29 | typedef struct {
30 | int width, height; /* 尺寸 */
31 | int bit_depth; /* 位深 */
32 | int flag; /* 一个标志,表示是否有alpha通道 */
33 | unsigned char *rgba; /* 图片数组;RGB or RGBA */
34 | } pic_data;
35 |
36 | /**
37 | read png file
38 |
39 | @param filepath png file path
40 | @param out png info
41 |
42 | @return success or not
43 | */
44 | int read_png_file(const char *filepath, pic_data *out);
45 |
46 |
47 | /**
48 | write png file
49 |
50 | @param filename png file name
51 | @param graph png data to write
52 |
53 | @return success or not
54 | */
55 | int write_png_file(const char *filename , pic_data *graph);
56 |
57 | #ifdef __cplusplus
58 | }
59 | #endif
60 | #endif /* PngUtil_h */
61 |
--------------------------------------------------------------------------------
/OpenGLES14-深度测试/OpenGLES14-深度测试/Utils/png/prebuilt/ios/libpng.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES14-深度测试/OpenGLES14-深度测试/Utils/png/prebuilt/ios/libpng.a
--------------------------------------------------------------------------------
/OpenGLES14-深度测试/OpenGLES14-深度测试/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // OpenGLES01-环境搭建
4 | //
5 | // Created by qinmin on 2017/2/9.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/OpenGLES14-深度测试/OpenGLES14-深度测试/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // OpenGLES01-环境搭建
4 | //
5 | // Created by qinmin on 2017/2/9.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 | #import "OpenGLESView.h"
11 |
12 | @interface ViewController ()
13 |
14 | @end
15 |
16 | @implementation ViewController
17 |
18 | - (void)viewDidLoad {
19 | [super viewDidLoad];
20 | self.view = [[OpenGLESView alloc] initWithFrame:self.view.bounds];
21 | }
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/OpenGLES14-深度测试/OpenGLES14-深度测试/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // OpenGLES14-深度测试
4 | //
5 | // Created by qinmin on 2017/5/25.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/OpenGLES14-深度测试/OpenGLES14-深度测试/wood.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QinminiOS/OpenGLES/5af2fbb01fd9614f1627481e3f74cb9da93420e6/OpenGLES14-深度测试/OpenGLES14-深度测试/wood.jpg
--------------------------------------------------------------------------------
/OpenGLES14-深度测试/OpenGLES14-深度测试Tests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/OpenGLES14-深度测试/OpenGLES14-深度测试Tests/OpenGLES14_____Tests.m:
--------------------------------------------------------------------------------
1 | //
2 | // OpenGLES14_____Tests.m
3 | // OpenGLES14-深度测试Tests
4 | //
5 | // Created by qinmin on 2017/5/25.
6 | // Copyright © 2017年 qinmin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface OpenGLES14_____Tests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation OpenGLES14_____Tests
16 |
17 | - (void)setUp {
18 | [super setUp];
19 | // Put setup code here. This method is called before the invocation of each test method in the class.
20 | }
21 |
22 | - (void)tearDown {
23 | // Put teardown code here. This method is called after the invocation of each test method in the class.
24 | [super tearDown];
25 | }
26 |
27 | - (void)testExample {
28 | // This is an example of a functional test case.
29 | // Use XCTAssert and related functions to verify your tests produce the correct results.
30 | }
31 |
32 | - (void)testPerformanceExample {
33 | // This is an example of a performance test case.
34 | [self measureBlock:^{
35 | // Put the code you want to measure the time of here.
36 | }];
37 | }
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/OpenGLES14-深度测试/OpenGLES14-深度测试UITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | 该代码库是关于OpenGL ES的系统性学习的源代码。
2 |
3 | OpenGL ES (OpenGL for Embedded Systems) 是 OpenGL 三维图形API的子集。针对手机、PDA和游戏主机等嵌入式设备而设计。该API由Khronos集团定义推广,Khronos是一个图形软硬件行业协会,该协会主要关注图形和多媒体方面的开放标准。
4 |
5 | 环境是 Xcode8.1+OpenGL ES 2.0,也有部分示例是基于OpenGL ES 3.0
6 |
7 | 博客地址:http://www.jianshu.com/u/fff74d0ebed7
8 |
9 | 系列博客地址:http://www.jianshu.com/c/30e2e76bc140
10 |
--------------------------------------------------------------------------------