├── .gitignore
├── .metadata
├── .vscode
└── launch.json
├── README.md
├── android
├── .project
├── .settings
│ └── org.eclipse.buildship.core.prefs
├── app
│ ├── build.gradle
│ └── src
│ │ ├── debug
│ │ └── AndroidManifest.xml
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── kotlin
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── texture_image
│ │ │ │ └── MainActivity.kt
│ │ └── res
│ │ │ ├── drawable
│ │ │ └── launch_background.xml
│ │ │ ├── mipmap-hdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-mdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ └── ic_launcher.png
│ │ │ └── values
│ │ │ └── styles.xml
│ │ └── profile
│ │ └── AndroidManifest.xml
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
└── settings.gradle
├── ios
├── Flutter
│ ├── AppFrameworkInfo.plist
│ ├── Debug.xcconfig
│ └── Release.xcconfig
├── GeneratedPluginRegistrant.h
├── GeneratedPluginRegistrant.m
├── Runner.xcodeproj
│ ├── project.pbxproj
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Runner.xcscheme
└── Runner
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ ├── Contents.json
│ │ ├── Icon-App-1024x1024@1x.png
│ │ ├── Icon-App-20x20@1x.png
│ │ ├── Icon-App-20x20@2x.png
│ │ ├── Icon-App-20x20@3x.png
│ │ ├── Icon-App-29x29@1x.png
│ │ ├── Icon-App-29x29@2x.png
│ │ ├── Icon-App-29x29@3x.png
│ │ ├── Icon-App-40x40@1x.png
│ │ ├── Icon-App-40x40@2x.png
│ │ ├── Icon-App-40x40@3x.png
│ │ ├── Icon-App-60x60@2x.png
│ │ ├── Icon-App-60x60@3x.png
│ │ ├── Icon-App-76x76@1x.png
│ │ ├── Icon-App-76x76@2x.png
│ │ └── Icon-App-83.5x83.5@2x.png
│ └── LaunchImage.imageset
│ │ ├── Contents.json
│ │ ├── LaunchImage.png
│ │ ├── LaunchImage@2x.png
│ │ ├── LaunchImage@3x.png
│ │ └── README.md
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── GLRender.h
│ ├── GLRender.m
│ ├── Info.plist
│ ├── Runner-Bridging-Header.h
│ ├── Shader.fsh
│ ├── Shader.vsh
│ ├── TexturePlugin.h
│ └── TexturePlugin.m
├── lib
└── main.dart
├── pubspec.lock
├── pubspec.yaml
└── test
└── widget_test.dart
/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 |
12 | # IntelliJ related
13 | *.iml
14 | *.ipr
15 | *.iws
16 | .idea/
17 |
18 | # The .vscode folder contains launch configuration and tasks you configure in
19 | # VS Code which you may wish to be included in version control, so this line
20 | # is commented out by default.
21 | #.vscode/
22 |
23 | # Flutter/Dart/Pub related
24 | **/doc/api/
25 | .dart_tool/
26 | .flutter-plugins
27 | .packages
28 | .pub-cache/
29 | .pub/
30 | /build/
31 |
32 | # Android related
33 | **/android/**/gradle-wrapper.jar
34 | **/android/.gradle
35 | **/android/captures/
36 | **/android/gradlew
37 | **/android/gradlew.bat
38 | **/android/local.properties
39 | **/android/**/GeneratedPluginRegistrant.java
40 |
41 | # iOS/XCode related
42 | **/ios/**/*.mode1v3
43 | **/ios/**/*.mode2v3
44 | **/ios/**/*.moved-aside
45 | **/ios/**/*.pbxuser
46 | **/ios/**/*.perspectivev3
47 | **/ios/**/*sync/
48 | **/ios/**/.sconsign.dblite
49 | **/ios/**/.tags*
50 | **/ios/**/.vagrant/
51 | **/ios/**/DerivedData/
52 | **/ios/**/Icon?
53 | **/ios/**/Pods/
54 | **/ios/**/.symlinks/
55 | **/ios/**/profile
56 | **/ios/**/xcuserdata
57 | **/ios/.generated/
58 | **/ios/Flutter/App.framework
59 | **/ios/Flutter/Flutter.framework
60 | **/ios/Flutter/Generated.xcconfig
61 | **/ios/Flutter/app.flx
62 | **/ios/Flutter/app.zip
63 | **/ios/Flutter/flutter_assets/
64 | **/ios/Flutter/flutter_export_environment.sh
65 | **/ios/ServiceDefinitions.json
66 | **/ios/Runner/GeneratedPluginRegistrant.*
67 |
68 | # Exceptions to above rules.
69 | !**/ios/**/default.mode1v3
70 | !**/ios/**/default.mode2v3
71 | !**/ios/**/default.pbxuser
72 | !**/ios/**/default.perspectivev3
73 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
74 |
--------------------------------------------------------------------------------
/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: 68587a0916366e9512a78df22c44163d041dd5f3
8 | channel: stable
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | // Use IntelliSense to learn about possible attributes.
3 | // Hover to view descriptions of existing attributes.
4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5 | "version": "0.2.0",
6 | "configurations": [
7 | {
8 | "name": "Flutter",
9 | "request": "launch",
10 | "type": "dart"
11 | }
12 | ]
13 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # texture_image
2 |
3 | A new Flutter project.
4 |
5 | ## Getting Started
6 |
7 | This project is a starting point for a Flutter application.
8 |
9 | A few resources to get you started if this is your first Flutter project:
10 |
11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
13 |
14 | For help getting started with Flutter, view our
15 | [online documentation](https://flutter.dev/docs), which offers tutorials,
16 | samples, guidance on mobile development, and a full API reference.
17 |
18 | ## important
19 |
20 | only support iOS device,android and iOS simulator not support yet.
21 |
--------------------------------------------------------------------------------
/android/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | android
4 | Project android created by Buildship.
5 |
6 |
7 |
8 |
9 | org.eclipse.buildship.core.gradleprojectbuilder
10 |
11 |
12 |
13 |
14 |
15 | org.eclipse.buildship.core.gradleprojectnature
16 |
17 |
18 |
--------------------------------------------------------------------------------
/android/.settings/org.eclipse.buildship.core.prefs:
--------------------------------------------------------------------------------
1 | connection.project.dir=
2 | eclipse.preferences.version=1
3 |
--------------------------------------------------------------------------------
/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | def localProperties = new Properties()
2 | def localPropertiesFile = rootProject.file('local.properties')
3 | if (localPropertiesFile.exists()) {
4 | localPropertiesFile.withReader('UTF-8') { reader ->
5 | localProperties.load(reader)
6 | }
7 | }
8 |
9 | def flutterRoot = localProperties.getProperty('flutter.sdk')
10 | if (flutterRoot == null) {
11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12 | }
13 |
14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15 | if (flutterVersionCode == null) {
16 | flutterVersionCode = '1'
17 | }
18 |
19 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
20 | if (flutterVersionName == null) {
21 | flutterVersionName = '1.0'
22 | }
23 |
24 | apply plugin: 'com.android.application'
25 | apply plugin: 'kotlin-android'
26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27 |
28 | android {
29 | compileSdkVersion 28
30 |
31 | sourceSets {
32 | main.java.srcDirs += 'src/main/kotlin'
33 | }
34 |
35 | lintOptions {
36 | disable 'InvalidPackage'
37 | }
38 |
39 | defaultConfig {
40 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
41 | applicationId "com.example.texture_image"
42 | minSdkVersion 16
43 | targetSdkVersion 28
44 | versionCode flutterVersionCode.toInteger()
45 | versionName flutterVersionName
46 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
47 | }
48 |
49 | buildTypes {
50 | release {
51 | // TODO: Add your own signing config for the release build.
52 | // Signing with the debug keys for now, so `flutter run --release` works.
53 | signingConfig signingConfigs.debug
54 | }
55 | }
56 | }
57 |
58 | flutter {
59 | source '../..'
60 | }
61 |
62 | dependencies {
63 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
64 | testImplementation 'junit:junit:4.12'
65 | androidTestImplementation 'com.android.support.test:runner:1.0.2'
66 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
67 | }
68 |
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
9 |
13 |
20 |
24 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/example/texture_image/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.texture_image
2 |
3 | import android.os.Bundle
4 |
5 | import io.flutter.app.FlutterActivity
6 | import io.flutter.plugins.GeneratedPluginRegistrant
7 |
8 | class MainActivity: FlutterActivity() {
9 | override fun onCreate(savedInstanceState: Bundle?) {
10 | super.onCreate(savedInstanceState)
11 | GeneratedPluginRegistrant.registerWith(this)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luoyibu/flutter_texture/dd814e96c6576d2579caaede052d0e948a5352d4/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luoyibu/flutter_texture/dd814e96c6576d2579caaede052d0e948a5352d4/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luoyibu/flutter_texture/dd814e96c6576d2579caaede052d0e948a5352d4/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luoyibu/flutter_texture/dd814e96c6576d2579caaede052d0e948a5352d4/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luoyibu/flutter_texture/dd814e96c6576d2579caaede052d0e948a5352d4/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
--------------------------------------------------------------------------------
/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.2.71'
3 | repositories {
4 | google()
5 | jcenter()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:3.2.1'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 | }
12 | }
13 |
14 | allprojects {
15 | repositories {
16 | google()
17 | jcenter()
18 | }
19 | }
20 |
21 | rootProject.buildDir = '../build'
22 | subprojects {
23 | project.buildDir = "${rootProject.buildDir}/${project.name}"
24 | }
25 | subprojects {
26 | project.evaluationDependsOn(':app')
27 | }
28 |
29 | task clean(type: Delete) {
30 | delete rootProject.buildDir
31 | }
32 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 |
3 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Jun 23 08:50:38 CEST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
7 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
4 |
5 | def plugins = new Properties()
6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
7 | if (pluginsFile.exists()) {
8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
9 | }
10 |
11 | plugins.each { name, path ->
12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
13 | include ":$name"
14 | project(":$name").projectDir = pluginDirectory
15 | }
16 |
--------------------------------------------------------------------------------
/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 8.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/GeneratedPluginRegistrant.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | #ifndef GeneratedPluginRegistrant_h
6 | #define GeneratedPluginRegistrant_h
7 |
8 | #import
9 |
10 | @interface GeneratedPluginRegistrant : NSObject
11 | + (void)registerWithRegistry:(NSObject*)registry;
12 | @end
13 |
14 | #endif /* GeneratedPluginRegistrant_h */
15 |
--------------------------------------------------------------------------------
/ios/GeneratedPluginRegistrant.m:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | #import "GeneratedPluginRegistrant.h"
6 | #import "TexturePlugin.h"
7 |
8 | @implementation GeneratedPluginRegistrant
9 |
10 | + (void)registerWithRegistry:(NSObject*)registry {
11 | [TexturePlugin registerWithRegistrar:[registry registrarForPlugin:@"TexturePlugin"]];
12 | }
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
11 | 384A9B3A23A72B14000EA00D /* Shader.fsh in Resources */ = {isa = PBXBuildFile; fileRef = 384A9B3923A72B14000EA00D /* Shader.fsh */; };
12 | 384A9B3C23A72B26000EA00D /* Shader.vsh in Resources */ = {isa = PBXBuildFile; fileRef = 384A9B3B23A72B26000EA00D /* Shader.vsh */; };
13 | 3851952C23A11B120041CC23 /* TexturePlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 3851952B23A11B110041CC23 /* TexturePlugin.m */; };
14 | 38B038A323A2426F00BB86E3 /* GLRender.m in Sources */ = {isa = PBXBuildFile; fileRef = 38B038A223A2426F00BB86E3 /* GLRender.m */; };
15 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
16 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
17 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
18 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
19 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
20 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
21 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; };
22 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
23 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
24 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
25 | /* End PBXBuildFile section */
26 |
27 | /* Begin PBXCopyFilesBuildPhase section */
28 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
29 | isa = PBXCopyFilesBuildPhase;
30 | buildActionMask = 2147483647;
31 | dstPath = "";
32 | dstSubfolderSpec = 10;
33 | files = (
34 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */,
35 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */,
36 | );
37 | name = "Embed Frameworks";
38 | runOnlyForDeploymentPostprocessing = 0;
39 | };
40 | /* End PBXCopyFilesBuildPhase section */
41 |
42 | /* Begin PBXFileReference section */
43 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
44 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
45 | 384A9B3923A72B14000EA00D /* Shader.fsh */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.glsl; path = Shader.fsh; sourceTree = ""; };
46 | 384A9B3B23A72B26000EA00D /* Shader.vsh */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.glsl; path = Shader.vsh; sourceTree = ""; };
47 | 3851952A23A11B110041CC23 /* TexturePlugin.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TexturePlugin.h; sourceTree = ""; };
48 | 3851952B23A11B110041CC23 /* TexturePlugin.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TexturePlugin.m; sourceTree = ""; };
49 | 38B038A123A2426F00BB86E3 /* GLRender.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GLRender.h; sourceTree = ""; };
50 | 38B038A223A2426F00BB86E3 /* GLRender.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GLRender.m; sourceTree = ""; };
51 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
52 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; };
53 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
54 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
55 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
56 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
57 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
58 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; };
59 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
60 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
61 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
62 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
63 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
64 | /* End PBXFileReference section */
65 |
66 | /* Begin PBXFrameworksBuildPhase section */
67 | 97C146EB1CF9000F007C117D /* Frameworks */ = {
68 | isa = PBXFrameworksBuildPhase;
69 | buildActionMask = 2147483647;
70 | files = (
71 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */,
72 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */,
73 | );
74 | runOnlyForDeploymentPostprocessing = 0;
75 | };
76 | /* End PBXFrameworksBuildPhase section */
77 |
78 | /* Begin PBXGroup section */
79 | 384A9B3823A72AF3000EA00D /* Shaders */ = {
80 | isa = PBXGroup;
81 | children = (
82 | 384A9B3923A72B14000EA00D /* Shader.fsh */,
83 | 384A9B3B23A72B26000EA00D /* Shader.vsh */,
84 | );
85 | name = Shaders;
86 | sourceTree = "";
87 | };
88 | 9740EEB11CF90186004384FC /* Flutter */ = {
89 | isa = PBXGroup;
90 | children = (
91 | 3B80C3931E831B6300D905FE /* App.framework */,
92 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
93 | 9740EEBA1CF902C7004384FC /* Flutter.framework */,
94 | 9740EEB21CF90195004384FC /* Debug.xcconfig */,
95 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
96 | 9740EEB31CF90195004384FC /* Generated.xcconfig */,
97 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
98 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
99 | );
100 | name = Flutter;
101 | sourceTree = "";
102 | };
103 | 97C146E51CF9000F007C117D = {
104 | isa = PBXGroup;
105 | children = (
106 | 9740EEB11CF90186004384FC /* Flutter */,
107 | 97C146F01CF9000F007C117D /* Runner */,
108 | 97C146EF1CF9000F007C117D /* Products */,
109 | );
110 | sourceTree = "";
111 | };
112 | 97C146EF1CF9000F007C117D /* Products */ = {
113 | isa = PBXGroup;
114 | children = (
115 | 97C146EE1CF9000F007C117D /* Runner.app */,
116 | );
117 | name = Products;
118 | sourceTree = "";
119 | };
120 | 97C146F01CF9000F007C117D /* Runner */ = {
121 | isa = PBXGroup;
122 | children = (
123 | 97C146FA1CF9000F007C117D /* Main.storyboard */,
124 | 97C146FD1CF9000F007C117D /* Assets.xcassets */,
125 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
126 | 97C147021CF9000F007C117D /* Info.plist */,
127 | 97C146F11CF9000F007C117D /* Supporting Files */,
128 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
129 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
130 | 3851952A23A11B110041CC23 /* TexturePlugin.h */,
131 | 3851952B23A11B110041CC23 /* TexturePlugin.m */,
132 | 38B038A123A2426F00BB86E3 /* GLRender.h */,
133 | 38B038A223A2426F00BB86E3 /* GLRender.m */,
134 | 384A9B3823A72AF3000EA00D /* Shaders */,
135 | );
136 | path = Runner;
137 | sourceTree = "";
138 | };
139 | 97C146F11CF9000F007C117D /* Supporting Files */ = {
140 | isa = PBXGroup;
141 | children = (
142 | );
143 | name = "Supporting Files";
144 | sourceTree = "";
145 | };
146 | /* End PBXGroup section */
147 |
148 | /* Begin PBXNativeTarget section */
149 | 97C146ED1CF9000F007C117D /* Runner */ = {
150 | isa = PBXNativeTarget;
151 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
152 | buildPhases = (
153 | 9740EEB61CF901F6004384FC /* Run Script */,
154 | 97C146EA1CF9000F007C117D /* Sources */,
155 | 97C146EB1CF9000F007C117D /* Frameworks */,
156 | 97C146EC1CF9000F007C117D /* Resources */,
157 | 9705A1C41CF9048500538489 /* Embed Frameworks */,
158 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
159 | );
160 | buildRules = (
161 | );
162 | dependencies = (
163 | );
164 | name = Runner;
165 | productName = Runner;
166 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
167 | productType = "com.apple.product-type.application";
168 | };
169 | /* End PBXNativeTarget section */
170 |
171 | /* Begin PBXProject section */
172 | 97C146E61CF9000F007C117D /* Project object */ = {
173 | isa = PBXProject;
174 | attributes = {
175 | LastUpgradeCheck = 1020;
176 | ORGANIZATIONNAME = "The Chromium Authors";
177 | TargetAttributes = {
178 | 97C146ED1CF9000F007C117D = {
179 | CreatedOnToolsVersion = 7.3.1;
180 | DevelopmentTeam = W87D9D2E4L;
181 | LastSwiftMigration = 0910;
182 | };
183 | };
184 | };
185 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
186 | compatibilityVersion = "Xcode 3.2";
187 | developmentRegion = en;
188 | hasScannedForEncodings = 0;
189 | knownRegions = (
190 | en,
191 | Base,
192 | );
193 | mainGroup = 97C146E51CF9000F007C117D;
194 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
195 | projectDirPath = "";
196 | projectRoot = "";
197 | targets = (
198 | 97C146ED1CF9000F007C117D /* Runner */,
199 | );
200 | };
201 | /* End PBXProject section */
202 |
203 | /* Begin PBXResourcesBuildPhase section */
204 | 97C146EC1CF9000F007C117D /* Resources */ = {
205 | isa = PBXResourcesBuildPhase;
206 | buildActionMask = 2147483647;
207 | files = (
208 | 384A9B3A23A72B14000EA00D /* Shader.fsh in Resources */,
209 | 384A9B3C23A72B26000EA00D /* Shader.vsh in Resources */,
210 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
211 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
212 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */,
213 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
214 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
215 | );
216 | runOnlyForDeploymentPostprocessing = 0;
217 | };
218 | /* End PBXResourcesBuildPhase section */
219 |
220 | /* Begin PBXShellScriptBuildPhase section */
221 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
222 | isa = PBXShellScriptBuildPhase;
223 | buildActionMask = 2147483647;
224 | files = (
225 | );
226 | inputPaths = (
227 | );
228 | name = "Thin Binary";
229 | outputPaths = (
230 | );
231 | runOnlyForDeploymentPostprocessing = 0;
232 | shellPath = /bin/sh;
233 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin";
234 | };
235 | 9740EEB61CF901F6004384FC /* Run Script */ = {
236 | isa = PBXShellScriptBuildPhase;
237 | buildActionMask = 2147483647;
238 | files = (
239 | );
240 | inputPaths = (
241 | );
242 | name = "Run Script";
243 | outputPaths = (
244 | );
245 | runOnlyForDeploymentPostprocessing = 0;
246 | shellPath = /bin/sh;
247 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
248 | };
249 | /* End PBXShellScriptBuildPhase section */
250 |
251 | /* Begin PBXSourcesBuildPhase section */
252 | 97C146EA1CF9000F007C117D /* Sources */ = {
253 | isa = PBXSourcesBuildPhase;
254 | buildActionMask = 2147483647;
255 | files = (
256 | 3851952C23A11B120041CC23 /* TexturePlugin.m in Sources */,
257 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
258 | 38B038A323A2426F00BB86E3 /* GLRender.m in Sources */,
259 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
260 | );
261 | runOnlyForDeploymentPostprocessing = 0;
262 | };
263 | /* End PBXSourcesBuildPhase section */
264 |
265 | /* Begin PBXVariantGroup section */
266 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
267 | isa = PBXVariantGroup;
268 | children = (
269 | 97C146FB1CF9000F007C117D /* Base */,
270 | );
271 | name = Main.storyboard;
272 | sourceTree = "";
273 | };
274 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
275 | isa = PBXVariantGroup;
276 | children = (
277 | 97C147001CF9000F007C117D /* Base */,
278 | );
279 | name = LaunchScreen.storyboard;
280 | sourceTree = "";
281 | };
282 | /* End PBXVariantGroup section */
283 |
284 | /* Begin XCBuildConfiguration section */
285 | 249021D3217E4FDB00AE95B9 /* Profile */ = {
286 | isa = XCBuildConfiguration;
287 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
288 | buildSettings = {
289 | ALWAYS_SEARCH_USER_PATHS = NO;
290 | CLANG_ANALYZER_NONNULL = YES;
291 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
292 | CLANG_CXX_LIBRARY = "libc++";
293 | CLANG_ENABLE_MODULES = YES;
294 | CLANG_ENABLE_OBJC_ARC = YES;
295 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
296 | CLANG_WARN_BOOL_CONVERSION = YES;
297 | CLANG_WARN_COMMA = YES;
298 | CLANG_WARN_CONSTANT_CONVERSION = YES;
299 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
300 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
301 | CLANG_WARN_EMPTY_BODY = YES;
302 | CLANG_WARN_ENUM_CONVERSION = YES;
303 | CLANG_WARN_INFINITE_RECURSION = YES;
304 | CLANG_WARN_INT_CONVERSION = YES;
305 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
306 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
307 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
308 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
309 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
310 | CLANG_WARN_STRICT_PROTOTYPES = YES;
311 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
312 | CLANG_WARN_UNREACHABLE_CODE = YES;
313 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
314 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
315 | COPY_PHASE_STRIP = NO;
316 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
317 | ENABLE_NS_ASSERTIONS = NO;
318 | ENABLE_STRICT_OBJC_MSGSEND = YES;
319 | GCC_C_LANGUAGE_STANDARD = gnu99;
320 | GCC_NO_COMMON_BLOCKS = YES;
321 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
322 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
323 | GCC_WARN_UNDECLARED_SELECTOR = YES;
324 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
325 | GCC_WARN_UNUSED_FUNCTION = YES;
326 | GCC_WARN_UNUSED_VARIABLE = YES;
327 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
328 | MTL_ENABLE_DEBUG_INFO = NO;
329 | SDKROOT = iphoneos;
330 | TARGETED_DEVICE_FAMILY = "1,2";
331 | VALIDATE_PRODUCT = YES;
332 | };
333 | name = Profile;
334 | };
335 | 249021D4217E4FDB00AE95B9 /* Profile */ = {
336 | isa = XCBuildConfiguration;
337 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
338 | buildSettings = {
339 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
340 | CLANG_ENABLE_MODULES = YES;
341 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
342 | DEVELOPMENT_TEAM = W87D9D2E4L;
343 | ENABLE_BITCODE = NO;
344 | FRAMEWORK_SEARCH_PATHS = (
345 | "$(inherited)",
346 | "$(PROJECT_DIR)/Flutter",
347 | );
348 | INFOPLIST_FILE = Runner/Info.plist;
349 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
350 | LIBRARY_SEARCH_PATHS = (
351 | "$(inherited)",
352 | "$(PROJECT_DIR)/Flutter",
353 | );
354 | PRODUCT_BUNDLE_IDENTIFIER = com.example.textureImage;
355 | PRODUCT_NAME = "$(TARGET_NAME)";
356 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
357 | SWIFT_VERSION = 4.0;
358 | VERSIONING_SYSTEM = "apple-generic";
359 | };
360 | name = Profile;
361 | };
362 | 97C147031CF9000F007C117D /* Debug */ = {
363 | isa = XCBuildConfiguration;
364 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
365 | buildSettings = {
366 | ALWAYS_SEARCH_USER_PATHS = NO;
367 | CLANG_ANALYZER_NONNULL = YES;
368 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
369 | CLANG_CXX_LIBRARY = "libc++";
370 | CLANG_ENABLE_MODULES = YES;
371 | CLANG_ENABLE_OBJC_ARC = YES;
372 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
373 | CLANG_WARN_BOOL_CONVERSION = YES;
374 | CLANG_WARN_COMMA = YES;
375 | CLANG_WARN_CONSTANT_CONVERSION = YES;
376 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
377 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
378 | CLANG_WARN_EMPTY_BODY = YES;
379 | CLANG_WARN_ENUM_CONVERSION = YES;
380 | CLANG_WARN_INFINITE_RECURSION = YES;
381 | CLANG_WARN_INT_CONVERSION = YES;
382 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
383 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
384 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
385 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
386 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
387 | CLANG_WARN_STRICT_PROTOTYPES = YES;
388 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
389 | CLANG_WARN_UNREACHABLE_CODE = YES;
390 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
391 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
392 | COPY_PHASE_STRIP = NO;
393 | DEBUG_INFORMATION_FORMAT = dwarf;
394 | ENABLE_STRICT_OBJC_MSGSEND = YES;
395 | ENABLE_TESTABILITY = YES;
396 | GCC_C_LANGUAGE_STANDARD = gnu99;
397 | GCC_DYNAMIC_NO_PIC = NO;
398 | GCC_NO_COMMON_BLOCKS = YES;
399 | GCC_OPTIMIZATION_LEVEL = 0;
400 | GCC_PREPROCESSOR_DEFINITIONS = (
401 | "DEBUG=1",
402 | "$(inherited)",
403 | );
404 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
405 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
406 | GCC_WARN_UNDECLARED_SELECTOR = YES;
407 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
408 | GCC_WARN_UNUSED_FUNCTION = YES;
409 | GCC_WARN_UNUSED_VARIABLE = YES;
410 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
411 | MTL_ENABLE_DEBUG_INFO = YES;
412 | ONLY_ACTIVE_ARCH = YES;
413 | SDKROOT = iphoneos;
414 | TARGETED_DEVICE_FAMILY = "1,2";
415 | };
416 | name = Debug;
417 | };
418 | 97C147041CF9000F007C117D /* Release */ = {
419 | isa = XCBuildConfiguration;
420 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
421 | buildSettings = {
422 | ALWAYS_SEARCH_USER_PATHS = NO;
423 | CLANG_ANALYZER_NONNULL = YES;
424 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
425 | CLANG_CXX_LIBRARY = "libc++";
426 | CLANG_ENABLE_MODULES = YES;
427 | CLANG_ENABLE_OBJC_ARC = YES;
428 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
429 | CLANG_WARN_BOOL_CONVERSION = YES;
430 | CLANG_WARN_COMMA = YES;
431 | CLANG_WARN_CONSTANT_CONVERSION = YES;
432 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
433 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
434 | CLANG_WARN_EMPTY_BODY = YES;
435 | CLANG_WARN_ENUM_CONVERSION = YES;
436 | CLANG_WARN_INFINITE_RECURSION = YES;
437 | CLANG_WARN_INT_CONVERSION = YES;
438 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
439 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
440 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
441 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
442 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
443 | CLANG_WARN_STRICT_PROTOTYPES = YES;
444 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
445 | CLANG_WARN_UNREACHABLE_CODE = YES;
446 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
447 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
448 | COPY_PHASE_STRIP = NO;
449 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
450 | ENABLE_NS_ASSERTIONS = NO;
451 | ENABLE_STRICT_OBJC_MSGSEND = YES;
452 | GCC_C_LANGUAGE_STANDARD = gnu99;
453 | GCC_NO_COMMON_BLOCKS = YES;
454 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
455 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
456 | GCC_WARN_UNDECLARED_SELECTOR = YES;
457 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
458 | GCC_WARN_UNUSED_FUNCTION = YES;
459 | GCC_WARN_UNUSED_VARIABLE = YES;
460 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
461 | MTL_ENABLE_DEBUG_INFO = NO;
462 | SDKROOT = iphoneos;
463 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
464 | TARGETED_DEVICE_FAMILY = "1,2";
465 | VALIDATE_PRODUCT = YES;
466 | };
467 | name = Release;
468 | };
469 | 97C147061CF9000F007C117D /* Debug */ = {
470 | isa = XCBuildConfiguration;
471 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
472 | buildSettings = {
473 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
474 | CLANG_ENABLE_MODULES = YES;
475 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
476 | DEVELOPMENT_TEAM = W87D9D2E4L;
477 | ENABLE_BITCODE = NO;
478 | FRAMEWORK_SEARCH_PATHS = (
479 | "$(inherited)",
480 | "$(PROJECT_DIR)/Flutter",
481 | );
482 | INFOPLIST_FILE = Runner/Info.plist;
483 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
484 | LIBRARY_SEARCH_PATHS = (
485 | "$(inherited)",
486 | "$(PROJECT_DIR)/Flutter",
487 | );
488 | PRODUCT_BUNDLE_IDENTIFIER = com.example.textureImage;
489 | PRODUCT_NAME = "$(TARGET_NAME)";
490 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
491 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
492 | SWIFT_VERSION = 4.0;
493 | VERSIONING_SYSTEM = "apple-generic";
494 | };
495 | name = Debug;
496 | };
497 | 97C147071CF9000F007C117D /* Release */ = {
498 | isa = XCBuildConfiguration;
499 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
500 | buildSettings = {
501 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
502 | CLANG_ENABLE_MODULES = YES;
503 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
504 | DEVELOPMENT_TEAM = W87D9D2E4L;
505 | ENABLE_BITCODE = NO;
506 | FRAMEWORK_SEARCH_PATHS = (
507 | "$(inherited)",
508 | "$(PROJECT_DIR)/Flutter",
509 | );
510 | INFOPLIST_FILE = Runner/Info.plist;
511 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
512 | LIBRARY_SEARCH_PATHS = (
513 | "$(inherited)",
514 | "$(PROJECT_DIR)/Flutter",
515 | );
516 | PRODUCT_BUNDLE_IDENTIFIER = com.example.textureImage;
517 | PRODUCT_NAME = "$(TARGET_NAME)";
518 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
519 | SWIFT_VERSION = 4.0;
520 | VERSIONING_SYSTEM = "apple-generic";
521 | };
522 | name = Release;
523 | };
524 | /* End XCBuildConfiguration section */
525 |
526 | /* Begin XCConfigurationList section */
527 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
528 | isa = XCConfigurationList;
529 | buildConfigurations = (
530 | 97C147031CF9000F007C117D /* Debug */,
531 | 97C147041CF9000F007C117D /* Release */,
532 | 249021D3217E4FDB00AE95B9 /* Profile */,
533 | );
534 | defaultConfigurationIsVisible = 0;
535 | defaultConfigurationName = Release;
536 | };
537 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
538 | isa = XCConfigurationList;
539 | buildConfigurations = (
540 | 97C147061CF9000F007C117D /* Debug */,
541 | 97C147071CF9000F007C117D /* Release */,
542 | 249021D4217E4FDB00AE95B9 /* Profile */,
543 | );
544 | defaultConfigurationIsVisible = 0;
545 | defaultConfigurationName = Release;
546 | };
547 | /* End XCConfigurationList section */
548 | };
549 | rootObject = 97C146E61CF9000F007C117D /* Project object */;
550 | }
551 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
54 |
56 |
62 |
63 |
64 |
65 |
66 |
67 |
73 |
75 |
81 |
82 |
83 |
84 |
86 |
87 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/ios/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import Flutter
3 |
4 | @UIApplicationMain
5 | @objc class AppDelegate: FlutterAppDelegate {
6 | override func application(
7 | _ application: UIApplication,
8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "Icon-App-20x20@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "Icon-App-20x20@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "Icon-App-29x29@1x.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "Icon-App-29x29@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "29x29",
29 | "idiom" : "iphone",
30 | "filename" : "Icon-App-29x29@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "Icon-App-40x40@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "40x40",
41 | "idiom" : "iphone",
42 | "filename" : "Icon-App-40x40@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "Icon-App-60x60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "Icon-App-60x60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "20x20",
59 | "idiom" : "ipad",
60 | "filename" : "Icon-App-20x20@1x.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "20x20",
65 | "idiom" : "ipad",
66 | "filename" : "Icon-App-20x20@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "29x29",
71 | "idiom" : "ipad",
72 | "filename" : "Icon-App-29x29@1x.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "29x29",
77 | "idiom" : "ipad",
78 | "filename" : "Icon-App-29x29@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "40x40",
83 | "idiom" : "ipad",
84 | "filename" : "Icon-App-40x40@1x.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "40x40",
89 | "idiom" : "ipad",
90 | "filename" : "Icon-App-40x40@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "76x76",
95 | "idiom" : "ipad",
96 | "filename" : "Icon-App-76x76@1x.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "76x76",
101 | "idiom" : "ipad",
102 | "filename" : "Icon-App-76x76@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "83.5x83.5",
107 | "idiom" : "ipad",
108 | "filename" : "Icon-App-83.5x83.5@2x.png",
109 | "scale" : "2x"
110 | },
111 | {
112 | "size" : "1024x1024",
113 | "idiom" : "ios-marketing",
114 | "filename" : "Icon-App-1024x1024@1x.png",
115 | "scale" : "1x"
116 | }
117 | ],
118 | "info" : {
119 | "version" : 1,
120 | "author" : "xcode"
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luoyibu/flutter_texture/dd814e96c6576d2579caaede052d0e948a5352d4/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luoyibu/flutter_texture/dd814e96c6576d2579caaede052d0e948a5352d4/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luoyibu/flutter_texture/dd814e96c6576d2579caaede052d0e948a5352d4/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luoyibu/flutter_texture/dd814e96c6576d2579caaede052d0e948a5352d4/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luoyibu/flutter_texture/dd814e96c6576d2579caaede052d0e948a5352d4/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luoyibu/flutter_texture/dd814e96c6576d2579caaede052d0e948a5352d4/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luoyibu/flutter_texture/dd814e96c6576d2579caaede052d0e948a5352d4/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luoyibu/flutter_texture/dd814e96c6576d2579caaede052d0e948a5352d4/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luoyibu/flutter_texture/dd814e96c6576d2579caaede052d0e948a5352d4/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luoyibu/flutter_texture/dd814e96c6576d2579caaede052d0e948a5352d4/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luoyibu/flutter_texture/dd814e96c6576d2579caaede052d0e948a5352d4/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luoyibu/flutter_texture/dd814e96c6576d2579caaede052d0e948a5352d4/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luoyibu/flutter_texture/dd814e96c6576d2579caaede052d0e948a5352d4/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luoyibu/flutter_texture/dd814e96c6576d2579caaede052d0e948a5352d4/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luoyibu/flutter_texture/dd814e96c6576d2579caaede052d0e948a5352d4/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchImage.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchImage@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchImage@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luoyibu/flutter_texture/dd814e96c6576d2579caaede052d0e948a5352d4/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luoyibu/flutter_texture/dd814e96c6576d2579caaede052d0e948a5352d4/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luoyibu/flutter_texture/dd814e96c6576d2579caaede052d0e948a5352d4/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md:
--------------------------------------------------------------------------------
1 | # Launch Screen Assets
2 |
3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory.
4 |
5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
--------------------------------------------------------------------------------
/ios/Runner/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/ios/Runner/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ios/Runner/GLRender.h:
--------------------------------------------------------------------------------
1 | //
2 | // GLRender.h
3 | // Runner
4 | //
5 | // Created by jonasluo on 2019/12/12.
6 | // Copyright © 2019 The Chromium Authors. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | typedef void(^FrameUpdateCallback)(void);
15 |
16 | @interface GLRender : NSObject
17 |
18 | - (instancetype)initWithFrameUpdateCallback:(FrameUpdateCallback)callback;
19 |
20 | - (void)startRender;
21 |
22 | @end
23 |
24 | NS_ASSUME_NONNULL_END
25 |
--------------------------------------------------------------------------------
/ios/Runner/GLRender.m:
--------------------------------------------------------------------------------
1 | //
2 | // GLRender.m
3 | // Runner
4 | //
5 | // Created by jonasluo on 2019/12/12.
6 | // Copyright © 2019 The Chromium Authors. All rights reserved.
7 | //
8 |
9 | #import "GLRender.h"
10 | #import
11 | #import
12 | #import
13 | #import
14 | #import
15 |
16 | @implementation GLRender
17 | {
18 | FrameUpdateCallback _callback;
19 | EAGLContext *_context;
20 | CGSize _size;
21 | CVOpenGLESTextureCacheRef _textureCache;
22 | CVOpenGLESTextureRef _texture;
23 | CVPixelBufferRef _target;
24 |
25 | GLuint _program;
26 |
27 | GLuint _frameBuffer;
28 |
29 | CADisplayLink *_displayLink;
30 |
31 | int _lastUpdateTs;
32 | GLfloat _angle;
33 |
34 | }
35 |
36 | - (CVPixelBufferRef)copyPixelBuffer {
37 | CVBufferRetain(_target);
38 | return _target;
39 | }
40 |
41 | - (instancetype)initWithFrameUpdateCallback:(FrameUpdateCallback)callback
42 | {
43 | if (self = [super init]) {
44 | _callback = callback;
45 | _size = CGSizeMake(1000, 1000);
46 |
47 | [self initGL];
48 | [self loadShaders];
49 | }
50 | return self;
51 | }
52 |
53 | - (void)initGL {
54 | _context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2];
55 | [EAGLContext setCurrentContext:_context];
56 | [self createCVBufferWith:&_target withOutTexture:&_texture];
57 |
58 | // 创建帧缓冲区
59 | glGenFramebuffers(1, &_frameBuffer);
60 | glBindFramebuffer(GL_FRAMEBUFFER, _frameBuffer);
61 |
62 | // 将纹理附加到帧缓冲区上
63 | glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, CVOpenGLESTextureGetName(_texture), 0);
64 |
65 | glViewport(0, 0, _size.width, _size.height);
66 |
67 | if (glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) {
68 | NSLog(@"failed to make complete framebuffer object %x", glCheckFramebufferStatus(GL_FRAMEBUFFER));
69 | }
70 | }
71 |
72 | - (void)createCVBufferWith:(CVPixelBufferRef *)target withOutTexture:(CVOpenGLESTextureRef *)texture {
73 | CVReturn err = CVOpenGLESTextureCacheCreate(kCFAllocatorDefault, NULL, _context, NULL, &_textureCache);
74 | if (err) {
75 | return;
76 | }
77 |
78 | CFDictionaryRef empty;
79 | CFMutableDictionaryRef attrs;
80 | empty = CFDictionaryCreate(kCFAllocatorDefault, NULL, NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
81 | attrs = CFDictionaryCreateMutable(kCFAllocatorDefault, 1, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
82 |
83 | CFDictionarySetValue(attrs, kCVPixelBufferIOSurfacePropertiesKey, empty);
84 | CVPixelBufferCreate(kCFAllocatorDefault, _size.width, _size.height, kCVPixelFormatType_32BGRA, attrs, target);
85 |
86 | CVOpenGLESTextureCacheCreateTextureFromImage(kCFAllocatorDefault, _textureCache, *target, NULL, GL_TEXTURE_2D, GL_RGBA, _size.width, _size.height, GL_BGRA, GL_UNSIGNED_BYTE, 0, texture);
87 |
88 | CFRelease(empty);
89 | CFRelease(attrs);
90 | }
91 |
92 | - (void)deinitGL {
93 | glDeleteFramebuffers(1, &_frameBuffer);
94 | CFRelease(_target);
95 | CFRelease(_textureCache);
96 | CFRelease(_texture);
97 | }
98 |
99 | - (void)startRender
100 | {
101 | if (!_displayLink) {
102 | _displayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(update)];
103 | _displayLink.preferredFramesPerSecond = 60;
104 | [_displayLink addToRunLoop:[NSRunLoop mainRunLoop] forMode:NSDefaultRunLoopMode];
105 | }
106 | }
107 |
108 | - (void)update
109 | {
110 | [EAGLContext setCurrentContext:_context];
111 |
112 | NSTimeInterval now = CFAbsoluteTimeGetCurrent();
113 | if (now - _lastUpdateTs <= 3) { // 3秒转一个圈
114 | _angle = ((now - _lastUpdateTs) / 1.5 - 1) * M_PI;
115 | } else {
116 | _angle = -M_PI;
117 | _lastUpdateTs = now;
118 | }
119 |
120 | glClearColor(0.2, 0.2, 0.2, 1);
121 | glClear(GL_COLOR_BUFFER_BIT);
122 |
123 | glUseProgram(_program);
124 |
125 | GLuint angleUniformLocation = glGetUniformLocation(_program, "angle");
126 | glUniform1f(angleUniformLocation, _angle);
127 |
128 | [self drawTriangle];
129 |
130 | glFlush();
131 |
132 | _callback();
133 | }
134 |
135 | - (void)drawTriangle {
136 | static GLfloat trangleData[] = {
137 | 0.0f, 0.5f, 0.0f,
138 | -0.5f, -0.5f, 0.0f,
139 | 0.5f, -0.5f, 0.0f,
140 | };
141 |
142 | GLuint positionAttribLocation = glGetAttribLocation(_program, "position");
143 | glEnableVertexAttribArray(positionAttribLocation);
144 |
145 | glVertexAttribPointer(positionAttribLocation, 3, GL_FLOAT, GL_FALSE, 3*sizeof(GLfloat), trangleData);
146 |
147 | glDrawArrays(GL_TRIANGLES, 0, 3);
148 | }
149 |
150 | #pragma mark - shader compilation
151 | - (BOOL)loadShaders
152 | {
153 | GLuint vertShader, fragShader;
154 | NSString *vertShaderPathname, *fragShaderPathname;
155 |
156 | _program = glCreateProgram();
157 |
158 | vertShaderPathname = [[NSBundle mainBundle] pathForResource:@"Shader" ofType:@"vsh"];
159 | if (![self compileShader:&vertShader type:GL_VERTEX_SHADER file:vertShaderPathname]) {
160 | NSLog(@"failed to compile vertex shader");
161 | return NO;
162 | }
163 |
164 | fragShaderPathname = [[NSBundle mainBundle] pathForResource:@"Shader" ofType:@"fsh"];
165 | if (![self compileShader:&fragShader type:GL_FRAGMENT_SHADER file:fragShaderPathname]) {
166 | NSLog(@"failed to compile fragment shader");
167 | return NO;
168 | }
169 |
170 | glAttachShader(_program, vertShader);
171 | glAttachShader(_program, fragShader);
172 |
173 | if (![self linkProgram:_program]) {
174 | NSLog(@"failed to link program: %d", _program);
175 |
176 | if (vertShader) {
177 | glDeleteShader(vertShader);
178 | vertShader = 0;
179 | }
180 | if (fragShader) {
181 | glDeleteShader(fragShader);
182 | fragShader = 0;
183 | }
184 | if (_program) {
185 | glDeleteProgram(_program);
186 | _program = 0;
187 | }
188 | return NO;
189 | }
190 |
191 | if (vertShader) {
192 | glDetachShader(_program, vertShader);
193 | glDeleteShader(vertShader);
194 | }
195 | if (fragShader) {
196 | glDetachShader(_program, fragShader);
197 | glDeleteShader(fragShader);
198 | }
199 |
200 | NSLog(@"load shaders succ");
201 | return YES;
202 | }
203 |
204 | - (BOOL)compileShader:(GLuint *)shader type:(GLenum)type file:(NSString *)file
205 | {
206 | GLint status;
207 | const GLchar *source;
208 |
209 | source = (GLchar*)[[NSString stringWithContentsOfFile:file encoding:NSUTF8StringEncoding error:nil] UTF8String];
210 | if (!source) {
211 | NSLog(@"failed to load shader. type: %i", type);
212 | return NO;
213 | }
214 |
215 | *shader = glCreateShader(type);
216 | glShaderSource(*shader, 1, &source, NULL);
217 | glCompileShader(*shader);
218 |
219 | #if defined(DEBUG)
220 | GLint logLength;
221 | glGetShaderiv(*shader, GL_INFO_LOG_LENGTH, &logLength);
222 | if (logLength > 0) {
223 | GLchar *log = (GLchar *)malloc(logLength);
224 | glGetShaderInfoLog(*shader, logLength, &logLength, log);
225 | NSLog(@"Shader compile log:\n%s", log);
226 | free(log);
227 | }
228 | #endif
229 |
230 | glGetShaderiv(*shader, GL_COMPILE_STATUS, &status);
231 | if (status == 0) {
232 | glDeleteShader(*shader);
233 | return NO;
234 | }
235 |
236 | return YES;
237 | }
238 |
239 | - (BOOL)linkProgram:(GLuint)prog
240 | {
241 | GLint status;
242 | glLinkProgram(prog);
243 |
244 | glGetProgramiv(prog, GL_LINK_STATUS, &status);
245 | if (status == 0) {
246 | return NO;
247 | }
248 |
249 | return YES;
250 | }
251 |
252 | - (BOOL)validateProgram:(GLuint)prog
253 | {
254 | GLint logLength, status;
255 | glValidateProgram(prog);
256 | glGetProgramiv(prog, GL_INFO_LOG_LENGTH, &logLength);
257 | if (logLength > 0) {
258 | GLchar *log = (GLchar *)malloc(logLength);
259 | glGetProgramInfoLog(prog, logLength, &logLength, log);
260 | NSLog(@"program validate log : \n%s", log);
261 | free(log);
262 | }
263 |
264 | glGetProgramiv(prog, GL_VALIDATE_STATUS, &status);
265 | if (status == 0) {
266 | return NO;
267 | }
268 |
269 | return YES;
270 | }
271 |
272 | @end
273 |
--------------------------------------------------------------------------------
/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | texture_image
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | $(FLUTTER_BUILD_NAME)
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UISupportedInterfaceOrientations
30 |
31 | UIInterfaceOrientationPortrait
32 | UIInterfaceOrientationLandscapeLeft
33 | UIInterfaceOrientationLandscapeRight
34 |
35 | UISupportedInterfaceOrientations~ipad
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationPortraitUpsideDown
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 | UIViewControllerBasedStatusBarAppearance
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
--------------------------------------------------------------------------------
/ios/Runner/Shader.fsh:
--------------------------------------------------------------------------------
1 |
2 |
3 | void main()
4 | {
5 | gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
6 | }
7 |
--------------------------------------------------------------------------------
/ios/Runner/Shader.vsh:
--------------------------------------------------------------------------------
1 | attribute vec3 position;
2 | uniform float angle;
3 |
4 | void main()
5 | {
6 | float xPos = position.x * cos(angle) - position.y * sin(angle);
7 | float yPos = position.x * sin(angle) + position.y * cos(angle);
8 |
9 | gl_Position = vec4(xPos, yPos, position.z, 1.0);
10 | }
11 |
--------------------------------------------------------------------------------
/ios/Runner/TexturePlugin.h:
--------------------------------------------------------------------------------
1 | //
2 | // TexturePlugin.h
3 | // Runner
4 | //
5 | // Created by jonasluo on 2019/12/11.
6 | // Copyright © 2019 The Chromium Authors. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface TexturePlugin : NSObject
14 |
15 | @end
16 |
17 | NS_ASSUME_NONNULL_END
18 |
--------------------------------------------------------------------------------
/ios/Runner/TexturePlugin.m:
--------------------------------------------------------------------------------
1 | //
2 | // TexturePlugin.m
3 | // Runner
4 | //
5 | // Created by jonasluo on 2019/12/11.
6 | // Copyright © 2019 The Chromium Authors. All rights reserved.
7 | //
8 |
9 | #import "TexturePlugin.h"
10 | #import "GLRender.h"
11 |
12 | @interface TexturePlugin ()
13 |
14 | @property (nonatomic, strong) NSObject *textures;
15 | @property (nonatomic, strong) GLRender *glRender;
16 |
17 | @end
18 |
19 | @implementation TexturePlugin
20 |
21 | - (instancetype) initWithTextures:(NSObject *)textures {
22 | if (self = [super init]) {
23 | _textures = textures;
24 | }
25 | return self;
26 | }
27 |
28 | + (void)registerWithRegistrar:(NSObject*)registrar {
29 |
30 | FlutterMethodChannel *channel = [FlutterMethodChannel methodChannelWithName:@"opengl_texture" binaryMessenger:[registrar messenger]];
31 |
32 | TexturePlugin *instance = [[TexturePlugin alloc] initWithTextures:registrar.textures];
33 |
34 | [registrar addMethodCallDelegate:instance channel:channel];
35 | }
36 |
37 | - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result
38 | {
39 | if ([call.method isEqualToString:@"newTexture"]) {
40 |
41 | __block int64_t textureId = 0;
42 |
43 | __weak typeof(self) wself = self;
44 | _glRender = [[GLRender alloc] initWithFrameUpdateCallback:^{
45 | [wself.textures textureFrameAvailable:textureId];
46 | }];
47 | textureId = [_textures registerTexture:_glRender];
48 |
49 | [_glRender startRender];
50 |
51 | result(@(textureId));
52 | }
53 | }
54 |
55 | @end
56 |
--------------------------------------------------------------------------------
/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter/services.dart';
3 |
4 | void main() => runApp(MyApp());
5 |
6 | class MyApp extends StatelessWidget {
7 | // This widget is the root of your application.
8 | @override
9 | Widget build(BuildContext context) {
10 | return MaterialApp(
11 | title: 'Flutter Demo',
12 | theme: ThemeData(
13 | primarySwatch: Colors.blue,
14 | ),
15 | home: MyHomePage(title: 'Flutter Demo Home Page'),
16 | );
17 | }
18 | }
19 |
20 | class MyHomePage extends StatefulWidget {
21 | MyHomePage({Key key, this.title}) : super(key: key);
22 |
23 | // This widget is the home page of your application. It is stateful, meaning
24 | // that it has a State object (defined below) that contains fields that affect
25 | // how it looks.
26 |
27 | // This class is the configuration for the state. It holds the values (in this
28 | // case the title) provided by the parent (in this case the App widget) and
29 | // used by the build method of the State. Fields in a Widget subclass are
30 | // always marked "final".
31 |
32 | final String title;
33 |
34 | @override
35 | _MyHomePageState createState() => _MyHomePageState();
36 | }
37 |
38 | class _MyHomePageState extends State {
39 |
40 | MethodChannel _channel = MethodChannel('opengl_texture');
41 |
42 | bool hasLoadTexture = false;
43 | int mainTexture = -1;
44 |
45 | @override
46 | void initState() {
47 | super.initState();
48 |
49 | newTexture();
50 | }
51 |
52 | void newTexture() async {
53 | mainTexture = await _channel.invokeMethod('newTexture');
54 | setState(() {
55 | hasLoadTexture = true;
56 | });
57 | }
58 |
59 | Widget getTextureBody(BuildContext context) {
60 | return Container(
61 | // color: Colors.red,
62 | width: 300,
63 | height: 300,
64 | child: Texture(textureId: mainTexture,),
65 | );
66 | }
67 |
68 | @override
69 | Widget build(BuildContext context) {
70 |
71 | Widget body = hasLoadTexture ? getTextureBody(context) : Text('loading...');
72 |
73 | return Scaffold(
74 | appBar: AppBar(
75 | title: Text(widget.title),
76 | ),
77 | body: Center(child: body,),
78 | );
79 | }
80 | }
81 |
--------------------------------------------------------------------------------
/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://dart.dev/tools/pub/glossary#lockfile
3 | packages:
4 | async:
5 | dependency: transitive
6 | description:
7 | name: async
8 | url: "https://pub.flutter-io.cn"
9 | source: hosted
10 | version: "2.3.0"
11 | boolean_selector:
12 | dependency: transitive
13 | description:
14 | name: boolean_selector
15 | url: "https://pub.flutter-io.cn"
16 | source: hosted
17 | version: "1.0.5"
18 | charcode:
19 | dependency: transitive
20 | description:
21 | name: charcode
22 | url: "https://pub.flutter-io.cn"
23 | source: hosted
24 | version: "1.1.2"
25 | collection:
26 | dependency: transitive
27 | description:
28 | name: collection
29 | url: "https://pub.flutter-io.cn"
30 | source: hosted
31 | version: "1.14.11"
32 | cupertino_icons:
33 | dependency: "direct main"
34 | description:
35 | name: cupertino_icons
36 | url: "https://pub.flutter-io.cn"
37 | source: hosted
38 | version: "0.1.3"
39 | flutter:
40 | dependency: "direct main"
41 | description: flutter
42 | source: sdk
43 | version: "0.0.0"
44 | flutter_test:
45 | dependency: "direct dev"
46 | description: flutter
47 | source: sdk
48 | version: "0.0.0"
49 | matcher:
50 | dependency: transitive
51 | description:
52 | name: matcher
53 | url: "https://pub.flutter-io.cn"
54 | source: hosted
55 | version: "0.12.5"
56 | meta:
57 | dependency: transitive
58 | description:
59 | name: meta
60 | url: "https://pub.flutter-io.cn"
61 | source: hosted
62 | version: "1.1.7"
63 | path:
64 | dependency: transitive
65 | description:
66 | name: path
67 | url: "https://pub.flutter-io.cn"
68 | source: hosted
69 | version: "1.6.4"
70 | pedantic:
71 | dependency: transitive
72 | description:
73 | name: pedantic
74 | url: "https://pub.flutter-io.cn"
75 | source: hosted
76 | version: "1.8.0+1"
77 | quiver:
78 | dependency: transitive
79 | description:
80 | name: quiver
81 | url: "https://pub.flutter-io.cn"
82 | source: hosted
83 | version: "2.0.5"
84 | sky_engine:
85 | dependency: transitive
86 | description: flutter
87 | source: sdk
88 | version: "0.0.99"
89 | source_span:
90 | dependency: transitive
91 | description:
92 | name: source_span
93 | url: "https://pub.flutter-io.cn"
94 | source: hosted
95 | version: "1.5.5"
96 | stack_trace:
97 | dependency: transitive
98 | description:
99 | name: stack_trace
100 | url: "https://pub.flutter-io.cn"
101 | source: hosted
102 | version: "1.9.3"
103 | stream_channel:
104 | dependency: transitive
105 | description:
106 | name: stream_channel
107 | url: "https://pub.flutter-io.cn"
108 | source: hosted
109 | version: "2.0.0"
110 | string_scanner:
111 | dependency: transitive
112 | description:
113 | name: string_scanner
114 | url: "https://pub.flutter-io.cn"
115 | source: hosted
116 | version: "1.0.5"
117 | term_glyph:
118 | dependency: transitive
119 | description:
120 | name: term_glyph
121 | url: "https://pub.flutter-io.cn"
122 | source: hosted
123 | version: "1.1.0"
124 | test_api:
125 | dependency: transitive
126 | description:
127 | name: test_api
128 | url: "https://pub.flutter-io.cn"
129 | source: hosted
130 | version: "0.2.5"
131 | typed_data:
132 | dependency: transitive
133 | description:
134 | name: typed_data
135 | url: "https://pub.flutter-io.cn"
136 | source: hosted
137 | version: "1.1.6"
138 | vector_math:
139 | dependency: transitive
140 | description:
141 | name: vector_math
142 | url: "https://pub.flutter-io.cn"
143 | source: hosted
144 | version: "2.0.8"
145 | sdks:
146 | dart: ">=2.2.2 <3.0.0"
147 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: texture_image
2 | description: A new Flutter project.
3 |
4 | # The following defines the version and build number for your application.
5 | # A version number is three numbers separated by dots, like 1.2.43
6 | # followed by an optional build number separated by a +.
7 | # Both the version and the builder number may be overridden in flutter
8 | # build by specifying --build-name and --build-number, respectively.
9 | # In Android, build-name is used as versionName while build-number used as versionCode.
10 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning
11 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
12 | # Read more about iOS versioning at
13 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
14 | version: 1.0.0+1
15 |
16 | environment:
17 | sdk: ">=2.1.0 <3.0.0"
18 |
19 | dependencies:
20 | flutter:
21 | sdk: flutter
22 |
23 | # The following adds the Cupertino Icons font to your application.
24 | # Use with the CupertinoIcons class for iOS style icons.
25 | cupertino_icons: ^0.1.2
26 |
27 | dev_dependencies:
28 | flutter_test:
29 | sdk: flutter
30 |
31 |
32 | # For information on the generic Dart part of this file, see the
33 | # following page: https://dart.dev/tools/pub/pubspec
34 |
35 | # The following section is specific to Flutter.
36 | flutter:
37 |
38 | # The following line ensures that the Material Icons font is
39 | # included with your application, so that you can use the icons in
40 | # the material Icons class.
41 | uses-material-design: true
42 |
43 | # To add assets to your application, add an assets section, like this:
44 | # assets:
45 | # - images/a_dot_burr.jpeg
46 | # - images/a_dot_ham.jpeg
47 |
48 | # An image asset can refer to one or more resolution-specific "variants", see
49 | # https://flutter.dev/assets-and-images/#resolution-aware.
50 |
51 | # For details regarding adding assets from package dependencies, see
52 | # https://flutter.dev/assets-and-images/#from-packages
53 |
54 | # To add custom fonts to your application, add a fonts section here,
55 | # in this "flutter" section. Each entry in this list should have a
56 | # "family" key with the font family name, and a "fonts" key with a
57 | # list giving the asset and other descriptors for the font. For
58 | # example:
59 | # fonts:
60 | # - family: Schyler
61 | # fonts:
62 | # - asset: fonts/Schyler-Regular.ttf
63 | # - asset: fonts/Schyler-Italic.ttf
64 | # style: italic
65 | # - family: Trajan Pro
66 | # fonts:
67 | # - asset: fonts/TrajanPro.ttf
68 | # - asset: fonts/TrajanPro_Bold.ttf
69 | # weight: 700
70 | #
71 | # For details regarding fonts from package dependencies,
72 | # see https://flutter.dev/custom-fonts/#from-packages
73 |
--------------------------------------------------------------------------------
/test/widget_test.dart:
--------------------------------------------------------------------------------
1 | // This is a basic Flutter widget test.
2 | //
3 | // To perform an interaction with a widget in your test, use the WidgetTester
4 | // utility that Flutter provides. For example, you can send tap and scroll
5 | // gestures. You can also use WidgetTester to find child widgets in the widget
6 | // tree, read text, and verify that the values of widget properties are correct.
7 |
8 | import 'package:flutter/material.dart';
9 | import 'package:flutter_test/flutter_test.dart';
10 |
11 | import 'package:texture_image/main.dart';
12 |
13 | void main() {
14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async {
15 | // Build our app and trigger a frame.
16 | await tester.pumpWidget(MyApp());
17 |
18 | // Verify that our counter starts at 0.
19 | expect(find.text('0'), findsOneWidget);
20 | expect(find.text('1'), findsNothing);
21 |
22 | // Tap the '+' icon and trigger a frame.
23 | await tester.tap(find.byIcon(Icons.add));
24 | await tester.pump();
25 |
26 | // Verify that our counter has incremented.
27 | expect(find.text('0'), findsNothing);
28 | expect(find.text('1'), findsOneWidget);
29 | });
30 | }
31 |
--------------------------------------------------------------------------------