-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a simple OpenGL demo for the HarmonyOS platform. (#210)
- Loading branch information
Showing
43 changed files
with
1,320 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/node_modules | ||
/oh_modules | ||
/local.properties | ||
/.idea | ||
**/build | ||
/.hvigor | ||
.cxx | ||
/.clangd | ||
/.clang-format | ||
/.clang-tidy | ||
**/.test | ||
/.appanalyzer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"app": { | ||
"bundleName": "org.tgfx.hello2d", | ||
"vendor": "example", | ||
"versionCode": 1000000, | ||
"versionName": "1.0.0", | ||
"icon": "$media:app_icon", | ||
"label": "$string:app_name" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"string": [ | ||
{ | ||
"name": "app_name", | ||
"value": "Hello2D" | ||
} | ||
] | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"app": { | ||
"signingConfigs": [ | ||
{ | ||
"name": "default", | ||
"type": "HarmonyOS", | ||
"material": { | ||
"certpath": "/Users/dom/.ohos/config/default_harmonyos_yQ8nAit9-rVCEops_bcdyLiKQ2mIT0leIE0pNeGMKks=.cer", | ||
"storePassword": "0000001A7A4E3A895C11695E6B1DF6D4C0F5930B437380B3D79D2A5149BDCBC8303D29983241522D5423", | ||
"keyAlias": "debugKey", | ||
"keyPassword": "0000001A4AB6C3172F717A47A1145D26792A5C6CC28A550F0A4CF34173B56ADA0A7A9EB436170EEE6F52", | ||
"profile": "/Users/dom/.ohos/config/default_harmonyos_yQ8nAit9-rVCEops_bcdyLiKQ2mIT0leIE0pNeGMKks=.p7b", | ||
"signAlg": "SHA256withECDSA", | ||
"storeFile": "/Users/dom/.ohos/config/default_harmonyos_yQ8nAit9-rVCEops_bcdyLiKQ2mIT0leIE0pNeGMKks=.p12" | ||
} | ||
} | ||
], | ||
"products": [ | ||
{ | ||
"name": "default", | ||
"signingConfig": "default", | ||
"compatibleSdkVersion": "5.0.0(12)", | ||
"runtimeOS": "HarmonyOS", | ||
} | ||
], | ||
"buildModeSet": [ | ||
{ | ||
"name": "debug", | ||
}, | ||
{ | ||
"name": "release" | ||
} | ||
] | ||
}, | ||
"modules": [ | ||
{ | ||
"name": "hello2d", | ||
"srcPath": "./hello2d", | ||
"targets": [ | ||
{ | ||
"name": "default", | ||
"applyToProducts": [ | ||
"default" | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/node_modules | ||
/oh_modules | ||
/.preview | ||
/build | ||
/.cxx | ||
/.test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"apiType": "stageMode", | ||
"buildOption": { | ||
"externalNativeOptions": { | ||
"path": "./src/main/cpp/CMakeLists.txt", | ||
"arguments": "", | ||
"cppFlags": "", | ||
} | ||
}, | ||
"buildOptionSet": [ | ||
{ | ||
"name": "release", | ||
"arkOptions": { | ||
"obfuscation": { | ||
"ruleOptions": { | ||
"enable": true, | ||
"files": [ | ||
"./obfuscation-rules.txt" | ||
] | ||
} | ||
} | ||
}, | ||
"nativeLib": { | ||
"debugSymbol": { | ||
"strip": true, | ||
"exclude": [] | ||
} | ||
} | ||
}, | ||
], | ||
"targets": [ | ||
{ | ||
"name": "default" | ||
}, | ||
{ | ||
"name": "ohosTest", | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { hapTasks } from '@ohos/hvigor-ohos-plugin'; | ||
|
||
export default { | ||
system: hapTasks, /* Built-in plugin of Hvigor. It cannot be modified. */ | ||
plugins:[] /* Custom plugin to extend the functionality of Hvigor. */ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Define project specific obfuscation rules here. | ||
# You can include the obfuscation configuration files in the current module's build-profile.json5. | ||
# | ||
# For more details, see | ||
# https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/source-obfuscation-V5 | ||
|
||
# Obfuscation options: | ||
# -disable-obfuscation: disable all obfuscations | ||
# -enable-property-obfuscation: obfuscate the property names | ||
# -enable-toplevel-obfuscation: obfuscate the names in the global scope | ||
# -compact: remove unnecessary blank spaces and all line feeds | ||
# -remove-log: remove all console.* statements | ||
# -print-namecache: print the name cache that contains the mapping from the old names to new names | ||
# -apply-namecache: reuse the given cache file | ||
|
||
# Keep options: | ||
# -keep-property-name: specifies property names that you want to keep | ||
# -keep-global-name: specifies names that you want to keep in the global scope |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"name": "hello2d", | ||
"version": "1.0.0", | ||
"description": "Please describe the basic information.", | ||
"main": "", | ||
"author": "", | ||
"license": "", | ||
"dependencies": { | ||
"libhello2d.so": "file:./src/main/cpp/types/libhello2d" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# the minimum version of CMake. | ||
cmake_minimum_required(VERSION 3.4.1) | ||
project(harmonyos) | ||
|
||
set(NATIVERENDER_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR}) | ||
|
||
if(DEFINED PACKAGE_FIND_FILE) | ||
include(${PACKAGE_FIND_FILE}) | ||
endif() | ||
|
||
include_directories(${NATIVERENDER_ROOT_PATH} | ||
${NATIVERENDER_ROOT_PATH}/include) | ||
|
||
find_library(EGL-lib EGL) | ||
find_library(GLES-lib GLESv3) | ||
find_library(libace-lib ace_ndk.z) | ||
find_library(hilog-lib hilog_ndk.z) | ||
add_library(hello2d SHARED napi_init.cpp egl_core.cpp) | ||
target_link_libraries(hello2d PUBLIC ${EGL-lib} ${GLES-lib} ${libace-lib} ${hilog-lib} libace_napi.z.so) |
Oops, something went wrong.