Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lwjgl Demo does not run on Java-8 #1

Open
tomsontom opened this issue Aug 7, 2020 · 1 comment
Open

lwjgl Demo does not run on Java-8 #1

tomsontom opened this issue Aug 7, 2020 · 1 comment

Comments

@tomsontom
Copy link
Member

tomschindl@Toms-MacBook-Pro efxclipse-drift-samples % ./gradlew -Ddriftfx.showfps=true run8

> Task :run8
Found Sample Providers: [org.eclipse.fx.drift.samples.cpp.SimpleTriangleSampleProvider@2984440c, org.eclipse.fx.drift.samples.cpp.SimpleColorSampleProvider@20a78194, org.eclipse.fx.drift.samples.lwjgl.WavefrontObjDemoProvider@3d3be374]
[J] [DEBUG] Initialize DriftFX
[J] [DEBUG] Resource Lookup: name: /native/libdriftfx.dylib, context: class org.eclipse.fx.drift.internal.DriftFX => jar:file:/Users/tomschindl/.gradle/caches/modules-2/files-2.1/org.eclipse.fx/org.eclipse.fx.drift/999.0.0-SNAPSHOT/d2f2fc80205a3de6887733e7210c56c49df65cf7/org.eclipse.fx.drift-999.0.0-SNAPSHOT.jar!/native/libdriftfx.dylib
[J] [INFO ] loading driftfx from extracted location (/var/folders/b3/31ytq_gs17v5lkw502rfx0mh0000gn/T/driftfx129900393876331354/libdriftfx.dylib)
[J] [INFO ] DriftFX 999.0.0(git sha: cf26047336b3802ac1a7587f0b92b1484eda91b7) initializing
[J] [DEBUG] [J] NativeSurface updateSurface(SurfaceData[520,000 x 260,000] (renderScale: 2,000 x 2,000, userScale: 1,000 x 1,000))
Context is 140417183760096
CAPS: false
ARB_shader_objects = true, ARB_vertex_shader = true, ARB_fragment_shader = true
java.lang.NoSuchMethodError: java.nio.ByteBuffer.flip()Ljava/nio/ByteBuffer;
        at org.eclipse.fx.drift.samples.lwjgl.IOUtil.resizeBuffer(IOUtil.java:23)
        at org.eclipse.fx.drift.samples.lwjgl.IOUtil.ioResourceToByteBuffer(IOUtil.java:62)
        at org.eclipse.fx.drift.samples.lwjgl.ObjDemo$1.invoke(ObjDemo.java:287)
        at org.lwjgl.assimp.AIFileOpenProcI.callback(AIFileOpenProcI.java:33)
        at org.lwjgl.system.JNI.invokePPP(Native Method)
        at org.lwjgl.assimp.Assimp.naiImportFileEx(Assimp.java:2505)
        at org.lwjgl.assimp.Assimp.aiImportFileEx(Assimp.java:2552)
        at org.eclipse.fx.drift.samples.lwjgl.ObjDemo.loadModel(ObjDemo.java:327)
        at org.eclipse.fx.drift.samples.lwjgl.ObjDemo.doInit(ObjDemo.java:274)
        at org.eclipse.fx.drift.samples.lwjgl.ObjDemo.run(ObjDemo.java:494)
        at java.lang.Thread.run(Thread.java:748)

BUILD SUCCESSFUL in 36s
10 actionable tasks: 1 executed, 9 up-to-date
tomschindl@Toms-MacBook-Pro efxclipse-drift-samples % 
@redrezo redrezo changed the title Demo does not run on Java-8 lwjgl Demo does not run on Java-8 Aug 25, 2020
@redrezo
Copy link
Member

redrezo commented Sep 1, 2020

seems that we somehow build the code against the java 11 runtime library - the compiled class file thinks that ByteBuffer has its own flip method - but java 8 runtime has no flip within ByteBuffer, it is inherited..

redrezo added a commit that referenced this issue Feb 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants