Skip to content

Commit d0dbd88

Browse files
committed
Merge branch 'danylo_system' into erfan_vulkan_as
# Conflicts: # examples_tests/06.MeshLoaders/main.cpp # examples_tests/07.SubpassBaking/main.cpp # examples_tests/14.ComputeScan/main.cpp # examples_tests/16.OrderIndependentTransparency/main.cpp # examples_tests/17.SimpleBulletIntegration/main.cpp # examples_tests/48.ArithmeticUnitTest/main.cpp # examples_tests/54.Transformations/main.cpp # examples_tests/common/CommonAPI.h # include/nbl/asset/ICommandBuffer.h # include/nbl/ext/OIT/OIT.h # include/nbl/scene/ITransformTree.h # include/nbl/scene/ITransformTreeManager.h # include/nbl/video/utilities/IGPUObjectFromAssetConverter.h # src/nbl/asset/interchange/CGLTFLoader.cpp # src/nbl/video/COpenGLCommandBuffer.cpp # src/nbl/video/COpenGLCommandBuffer.h # src/nbl/video/CVulkanCommandBuffer.h
2 parents 2b10650 + 1382c2b commit d0dbd88

File tree

166 files changed

+7167
-8282
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

166 files changed

+7167
-8282
lines changed

3rdparty/libjpeg-turbo

Submodule libjpeg-turbo updated 443 files

3rdparty/spirv_cross

Lines changed: 0 additions & 1 deletion
This file was deleted.

CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ cmake_minimum_required(VERSION 3.20)
77
cmake_policy(SET CMP0072 OLD) #not yet, would need to get pointers to all OpenGL functions
88
set(OpenGL_GL_PREFERENCE LEGACY)
99
#cmake_policy(SET CMP )
10-
1110
option(NBL_BUILD_ANDROID "Build for Android?" OFF)
1211

1312
if(DEFINED CMAKE_TOOLCHAIN_FILE) # TODO - validate paths due to CMake path-policy (errors when no path passed in)
@@ -83,7 +82,7 @@ if(NBL_BUILD_ANDROID)
8382
set(_NBL_COMPILE_WITH_OPEN_EXR_ OFF CACHE BOOL "Off for Android purposes at the moment" FORCE) # TODO - check it out
8483
set(_NBL_COMPILE_WITH_BAW_LOADER_ OFF CACHE BOOL "Off for Android purposes at the moment" FORCE) # TODO - remove when BAW-v4 is done
8584
set(_NBL_COMPILE_WITH_BAW_WRITER_ OFF CACHE BOOL "Off for Android purposes at the moment" FORCE) # TODO - remove when BAW-v4 is done
86-
set(_NBL_COMPILE_WITH_OBJ_LOADER_ OFF CACHE BOOL "Off for Android purposes at the moment" FORCE) # TODO - references BAW files, linker errors
85+
set(_NBL_COMPILE_WITH_OBJ_LOADER_ ON CACHE BOOL "Off for Android purposes at the moment" FORCE)
8786
set(NBL_BUILD_MITSUBA_LOADER OFF CACHE BOOL "Off for Android purposes at the moment" FORCE) # TODO - compile/linker errors
8887

8988
find_package(Java 1.8)

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,13 +216,17 @@ Having Nabla generated you need to enter build directory, launch the terminal an
216216

217217
**Note:** each example provided by the engine builds as an executable with non-cross builds and with target of a name called *"a_target"*, in following example above it would be *"android_sample"*. When building cross-compile for android **to produce the APK file you need to add *"_apk"* postfix to the "*a_target"***, because "*a_target*" gets built then as a library.
218218

219+
#### Chrome Book SDK version
220+
221+
In order for the chromebook to work with the apk you build you need to install the right SDK version. Go to *Tools -> SDK Manager ->System and Settings -> Android SDK* then Select the *SDK Platforms* tab and tick the "Show Packake Details" checkbox in the bottom-right corner. After that select *Android 9.0 (Pie) -> Android SDK Platform 28* and hit "OK".
222+
219223
#### Chrome Book upload
220224

221225
To upload generated *.apk* into your ChromeBook you need first to make sure your device is in *developer mode* state. If it is, you can open Android Studio and choose Debug or Profile choosing *.apk* file. Then you will need to connect to your device using **adb** connector. To make use of adb, you need to find path to the executable that is placed in `C:/Users/<your_user>/AppData/Local/AndroidSdk/platform-tools` directory. When found, you can type in Android Studio command line `C:/Users/<your_user>/AppData/Local/AndroidSdk/platform-tools/adb connect <IP of ChromeBook network>`. You can find ChromeBook's IP by entering network settings and choosing current network ChromeBook is connected to. This way the ChromeBook should be listed in available devices and you should be able to upload *.apk* to the machine through debugging app shortcut. Take into account that you won't probably be able to debug in that scenario, but you will be able to upload *.apk* to the device.
222226

223227
#### Chrome Book debug
224228

225-
Unfortunately debbuging android apps works 3 times out of a 100 for unknown reasons, contributions would be welcome.
229+
To debug the *.apk* on your chromebook you need to open the source file you want to debug in Android Studio (Either via *File->Open* or Drag&Drop, but be aware that d&d can deadlock your Android Studio 25% of the time so youll need to restart it), then place your breakpoints and hit "Debug" (The bug icon) in the top right corner.
226230

227231
## External Dependencies
228232

android/Loader.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import android.view.WindowManager;
55
import android.os.Environment;
66
import android.content.Intent;
7-
7+
import android.net.Uri;
88
public class Loader extends android.app.NativeActivity
99
{
1010
/* load our native library */
@@ -65,4 +65,15 @@ protected void onCreate(android.os.Bundle savedInstanceState) {
6565
} catch(Exception e) { }
6666
}
6767
}
68+
69+
public void openFolder(String path)
70+
{
71+
Intent intent = new Intent(Intent.ACTION_VIEW);
72+
Uri uri = Uri.parse(path);
73+
intent.setDataAndType(uri, "resource/folder");
74+
if (intent.resolveActivityInfo(getPackageManager(), 0) != null)
75+
{
76+
startActivity(Intent.createChooser(intent, "Open folder"));
77+
}
78+
}
6879
}

cmake/common.cmake

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,8 +416,7 @@ macro(nbl_android_create_apk _TARGET)
416416
COMMAND ${ANDROID_BUILD_TOOLS}/aapt package -f -m -J src -M AndroidManifest.xml -I ${ANDROID_JAR}
417417
COMMAND ${ANDROID_JAVA_BIN}/javac -d ./obj -source 1.7 -target 1.7 -bootclasspath ${ANDROID_JAVA_RT_JAR} -classpath "${ANDROID_JAR}" -sourcepath src ${NBL_ANDROID_LOADER_JAVA}
418418
COMMAND ${DEX_COMMAND}
419-
COMMAND ${ANDROID_BUILD_TOOLS}/dx --dex --output=bin/classes.dex ./obj
420-
COMMAND ${ANDROID_BUILD_TOOLS}/aapt package -f -M AndroidManifest.xml -I ${ANDROID_JAR} -F ${TARGET_NAME}-unaligned.apk libs
419+
COMMAND ${ANDROID_BUILD_TOOLS}/aapt package -f -M AndroidManifest.xml -I ${ANDROID_JAR} -F ${TARGET_NAME}-unaligned.apk bin libs
421420
COMMAND ${ANDROID_BUILD_TOOLS}/zipalign -f 4 ${TARGET_NAME}-unaligned.apk ${APK_FILE_NAME}
422421
COMMAND ${ANDROID_BUILD_TOOLS}/apksigner sign --ks ${KEYSTORE_FILE} --ks-pass pass:android --key-pass pass:android --ks-key-alias ${KEY_ENTRY_ALIAS} ${APK_FILE_NAME}
423422
COMMAND ${CMAKE_COMMAND} -E copy ${APK_FILE_NAME} ${APK_FILE}

examples_tests/06.MeshLoaders/assets/oit.glsl

Lines changed: 0 additions & 202 deletions
This file was deleted.

examples_tests/06.MeshLoaders/assets/oit_fill_nodes.frag

Lines changed: 0 additions & 75 deletions
This file was deleted.

0 commit comments

Comments
 (0)