Giter VIP home page Giter VIP logo

android-test's Introduction

[LEGACY] LWJGL - Lightweight Java Game Library

WARNING

This is the repository of the original LWJGL, which is no longer actively maintained. Unless you have released a product that uses LWJGL 2.x, you should probably be looking at LWJGL 3.

The Lightweight Java Game Library (LWJGL) is a solution aimed directly at professional and amateur Java programmers alike to enable commercial quality games to be written in Java. LWJGL provides developers access to high performance crossplatform libraries such as OpenGL (Open Graphics Library), OpenCL (Open Computing Language) and OpenAL (Open Audio Library) allowing for state of the art 3D games and 3D sound. Additionally LWJGL provides access to controllers such as Gamepads, Steering wheel and Joysticks. All in a simple and straight forward API.

Website: http://legacy.lwjgl.org Forum: http://forum.lwjgl.org Bugs/Suggestions: https://github.com/LWJGL/lwjgl/issues

Compilation

LWJGL requires a JDK and Ant installed to compile, as well as your platforms native compiler to compile the JNI.

  • ant generate-all
  • ant compile
  • ant compile_native

android-test's People

Contributors

spasi avatar typhonrt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

android-test's Issues

unresolved reference: ANativeWindow

The ant compile-templates step fails:

  [kotlinc] /home/malachi/work/vulkan/lwjgl3/modules/templates/src/main/kotlin/org/lwjgl/vulkan/ExtensionTypes.kt:582:5: error: unresolved reference: ANativeWindow
  [kotlinc]     ANativeWindow.p.member("window", "a pointer to the {@code ANativeWindow} to associate the surface with.")
  [kotlinc]     ^

It seems that should be coming from the ndk...
ANDROID_SDK_HOME is set. ndk-bundle is there under it. Maybe something else needs set as well?

Generate arr BUILD FAILED retrolambda

ant aar

Buildfile: /home/jibarra/lwjgl3/build.xml

init:

check-dependencies:

bindings:

generate:

-init-compile:

compile:
[javac: Core] Compiling 7 source files to /home/jibarra/lwjgl3/bin/Core

retrolambda:
   [delete] Deleting directory /home/jibarra/lwjgl3/bin/android/classes
    [mkdir] Created dir: /home/jibarra/lwjgl3/bin/android/classes
[javac: Core - Android] Compiling 2 source files to /home/jibarra/lwjgl3/bin/Core
     [java] Error: Unable to access jarfile /home/jibarra/lwjgl3/libs/retrolambda.jar

BUILD FAILED
/home/jibarra/lwjgl3/build.xml:416: Java returned: 1

Total time: 3 seconds

ant compile-tests, is failing

On Linux Mint 17.3 I get the following every time I run "ant compile-tests". I've deleted the whole directory and started over once already.
[kotlinc] info: Kotlin Compiler version 1.1.0-rc-91
[kotlinc] /home/xxxxx/lwjgl3/modules/templates/src/main/kotlin/org/lwjgl/system/android/AndroidTypes.kt:20:15: error: unresolved reference: android
[kotlinc] val Surface = android.view.Surface::class.jobject
[kotlinc]

LWJGL built fine itself, but that was an additional step not outlined here.
Also I didn't have android branch locally and had to fetch using
"git checkout -t origin/android"

Must use Android NDK r15c

This will not work with the latest Android NDK. If you manually download r15c from here and place this in your %ANDROID_SDK_HOME%/ndk-bundle directory it will work.

android gradle with natives libs

Is there any way to setup gradle without manually build ndk? I tried with this gradle dependencies:

implementation platform("org.lwjgl:lwjgl-bom:3.2.3")

implementation "org.lwjgl:lwjgl"
implementation "org.lwjgl:lwjgl-opus"
// linux
runtimeOnly "org.lwjgl:lwjgl::natives-linux"
runtimeOnly "org.lwjgl:lwjgl-opus::natives-linux"
// arm64
runtimeOnly "org.lwjgl:lwjgl::natives-linux-arm64"
runtimeOnly "org.lwjgl:lwjgl-opus::natives-linux-arm64"
// arm32
runtimeOnly "org.lwjgl:lwjgl::natives-linux-arm32"
runtimeOnly "org.lwjgl:lwjgl-opus::natives-linux-arm32"

But after I called Library.initialize() I get:

java.lang.UnsatisfiedLinkError: Failed to locate library: liblwjgl.so
        at org.lwjgl.system.Library.loadSystem(Library.java:162)

Trouble creating the lwjgl.aar file

I'm getting errors when trying to create the lwjgl.aar file for the Android test example.

Errors:
[javac: Core] Compiling 1677 source files to C:\Users\jfe.CAMPUS\Documents\GitHub\lwjgl3\bin\Core
[javac: Core] C:\Users\jfe.CAMPUS\Documents\GitHub\lwjgl3\modules\core\src\generated\java\org\lwjgl\system\android\ANativeWindow.java:14: error: package android.view does not exist
[javac: Core] import android.view.Surface;
[javac: Core] ^
[javac: Core] C:\Users\jfe.CAMPUS\Documents\GitHub\lwjgl3\modules\core\src\generated\java\org\lwjgl\system\android\ANativeWindow.java:65: error: cannot find symbol
[javac: Core] public static native long nANativeWindow_fromSurface(long __functionAddress, Surface surface);
[javac: Core] ^
[javac: Core] symbol: class Surface
[javac: Core] location: class ANativeWindow
[javac: Core] C:\Users\jfe.CAMPUS\Documents\GitHub\lwjgl3\modules\core\src\generated\java\org\lwjgl\system\android\ANativeWindow.java:67: error: cannot find symbol
[javac: Core] public static long ANativeWindow_fromSurface(Surface surface) {
[javac: Core] ^
[javac: Core] symbol: class Surface
[javac: Core] location: class ANativeWindow
[javac: Core] 3 errors

Thanks for your time ... Let me know if I did something wrong. :)

vkCreateDebugReportCallbackEXT causes segmentation fault

Hello,

I've gotten the "hellovulkan" example running with little fuss. Just to make sure that we are on the same page, I compiled an armeabi-v7a (I'll just call it armv7 from now) version of the lwjgl library by defining the LWJGL_BUILD_ARCH environment variable prior to following the instructions here. I have NDK 14.1 installed and my test device is a Samsung S7.

Anyway, I copied over the relevant .so files from my SDK's armv7 NDK jniLibs directory to the "android-test" project and set the VALIDATE variable to true. This includes stuff like libVKlayer_core_validation.so, libVkLayer_image.so, libVkLayer_object_tracker.so, and so on. Every piece of validation code seems to run without a hitch except for vkCreateDebugReportCallbackEXT -- the item causes the following seg fault as seen in the ADB log:

--------- beginning of crash
05-03 10:47:12.451 16514 16605 F libc : Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 16605 (VKThread)
05-03 10:47:12.452 607 607 W : debuggerd: handling request: pid=16514 uid=10106 gid=10106 tid=16605
05-03 10:47:12.531 1662 1662 D CustomFrequencyManagerService: releaseDVFSLockLocked : Getting Lock type frm List : DVFS_MIN_LIMIT frequency : 1555200 uid : 1000 pid : 1662 tag : AMS_RESUME_TAIL@CPU_MIN@24
05-03 10:47:12.534 16640 16640 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
05-03 10:47:12.534 16640 16640 F DEBUG : Build fingerprint: 'Verizon/heroqltevzw/heroqltevzw:7.0/NRD90M/G930VVRU4BQC5:user/release-keys'
05-03 10:47:12.534 16640 16640 F DEBUG : Revision: '14'
05-03 10:47:12.534 16640 16640 F DEBUG : ABI: 'arm'
05-03 10:47:12.535 16640 16640 F DEBUG : pid: 16514, tid: 16605, name: VKThread >>> org.lwjgl.demo.android.hellovulkan <<<
05-03 10:47:12.535 9246 9355 I PlayCommon: [809] PlayEventLogger.uploadEventsImpl: Preparing logs for uploading
05-03 10:47:12.535 16640 16640 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
05-03 10:47:12.535 16640 16640 F DEBUG : r0 dc5fed04 r1 c82a777c r2 00000004 r3 00000000
05-03 10:47:12.535 9246 9355 I PlayCommon: [809] PlayEventLogger.uploadEventsImpl: No file ready to send
05-03 10:47:12.535 16640 16640 F DEBUG : r4 c843ee44 r5 c82a7ad8 r6 c82a7870 r7 c82a7830
05-03 10:47:12.535 16640 16640 F DEBUG : r8 c82a7870 r9 daa1e000 sl c82a7780 fp daa1e000
05-03 10:47:12.535 16640 16640 F DEBUG : ip c8133c65 sp c82a7760 lr e6d04a1b pc c8133c5e cpsr 200d0030
05-03 10:47:12.566 16640 16640 F DEBUG :
05-03 10:47:12.566 16640 16640 F DEBUG : backtrace:
05-03 10:47:12.566 16640 16640 F DEBUG : #00 pc 00030c5e /data/app/org.lwjgl.demo.android.hellovulkan-2/lib/arm/liblwjgl.so
05-03 10:47:12.566 16640 16640 F DEBUG : #1 pc 000ada19 /system/lib/libart.so (art_quick_generic_jni_trampoline+40)
05-03 10:47:12.566 16640 16640 F DEBUG : #2 pc 000a9041 /system/lib/libart.so (art_quick_invoke_stub_internal+64)
05-03 10:47:12.566 16640 16640 F DEBUG : #3 pc 004021e9 /system/lib/libart.so (art_quick_invoke_static_stub+228)
05-03 10:47:12.566 16640 16640 F DEBUG : #4 pc 000b02ff /system/lib/libart.so (_ZN3art9ArtMethod6InvokeEPNS_6ThreadEPjjPNS_6JValueEPKc+178)

I don't know if you need more of the log here, but I can post there rest. For now I will post the tail of it here:

05-03 10:47:12.568 16640 16640 F DEBUG : #35 pc 000cbc73 /system/lib/libart.so (_ZN3art8CheckJNI11CallMethodVEPKcP7_JNIEnvP8_jobjectP7_jclassP10_jmethodIDSt9__va_listNS_9Primitive4TypeENS_10InvokeTypeE+1054)
05-03 10:47:12.568 16640 16640 F DEBUG : #36 pc 000c1789 /system/lib/libart.so (_ZN3art8CheckJNI13CallIntMethodEP7_JNIEnvP8_jobjectP10_jmethodIDz+52)
05-03 10:47:12.568 16640 16640 F DEBUG : #37 pc 0001610c /data/app/org.lwjgl.demo.android.hellovulkan-2/lib/arm/liblwjgl.so

In case this helps you, the layer checking code related to validation did not find VK_LAYER_LUNARG_standard_validation but found VK_LAYER_GOOGLE_threading, VK_LAYER_LUNARG_parameter_validation, VK_LAYER_LUNARG_object_tracker and VK_LAYER_LUNARG_object_tracker.

Here are some log messages that are printed during a successful run (vkCreateDebugReportCallbackEXT):
5-03 11:02:58.025 19508 19527 D vulkan : vulkan instance layer version (1/7) : 0.0.0/0
05-03 11:02:58.025 19508 19527 D vulkan : vulkan instance layer version (2/7) : 0.0.0/0
05-03 11:02:58.025 19508 19527 D vulkan : vulkan instance layer version (3/7) : 0.0.0/0
05-03 11:02:58.025 19508 19527 D vulkan : vulkan instance layer version (4/7) : 0.0.0/0
05-03 11:02:58.025 19508 19527 D vulkan : vulkan instance layer version (5/7) : 0.0.0/0
05-03 11:02:58.025 19508 19527 D vulkan : vulkan instance layer version (6/7) : 0.0.0/0
05-03 11:02:58.025 19508 19527 D vulkan : vulkan instance layer version (7/7) : 0.0.0/0
05-03 11:02:58.026 19508 19527 I Test : Could not find layer: VK_LAYER_LUNARG_standard_validation
05-03 11:02:58.027 19508 19527 I Test : Found layer: VK_LAYER_GOOGLE_threading
05-03 11:02:58.028 19508 19527 I Test : Found layer: VK_LAYER_LUNARG_parameter_validation
05-03 11:02:58.029 19508 19527 I Test : Found layer: VK_LAYER_LUNARG_object_tracker
05-03 11:02:58.029 19508 19527 I Test : Found layer: VK_LAYER_LUNARG_image
05-03 11:02:58.036 19508 19527 D vulkan : vulkan api version_1_0 1.0.0
05-03 11:02:58.036 19508 19527 D vulkan : vulkan header version 13
05-03 11:02:58.043 19508 19527 I vulkan : Loaded layer VK_LAYER_LUNARG_core_validation
05-03 11:02:58.045 19508 19527 I vulkan : Loaded layer VK_LAYER_LUNARG_swapchain
05-03 11:02:58.046 19508 19527 I vulkan : Loaded layer VK_LAYER_GOOGLE_unique_objects

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.