[RFE] LWJGL 3.0

Started by spasi, November 08, 2012, 13:23:54

Previous topic - Next topic

Jeroenimoo0

I have a problem while compiling.
Here is my log:
Buildfile: C:\Users\jeroe_000\git\lwjgl3\lwjgl3\build.xml
-initialize:
-dependencies-uptodate:
check-dependencies:
compile-templates:
[Templates] Compiling Kotlin templates. This will take several seconds...
-generated-uptodate:
generate:
compile:
compile-tests:
compile-native:
compile-native-windows:

BUILD FAILED
C:\Users\jeroe_000\git\lwjgl3\lwjgl3\build.xml:187: The following error occurred while executing this line:
C:\Users\jeroe_000\git\lwjgl3\lwjgl3\config\windows\build.xml:33: Execute failed: java.io.IOException: Cannot run program "cl" (in directory "C:\Users\jeroe_000\git\lwjgl3\lwjgl3\bin\lwjglx86"): CreateProcess error=2, The system cannot find the file specified

Total time: 36 seconds


The folder "C:\Users\jeroe_000\git\lwjgl3\lwjgl3\bin\lwjglx86" indeed has nothing in it.

I couldn't find much about it online. If anyone could help me that would be great.

spasi

You need to properly configure a C compiler to build LWJGL. The only tested (and officially supported) compiler at the moment is MSVC. The easiest way to set it up is:

- Download Visual Studio Express (for Windows Desktop) and install it.
- Run VC's vcvarsall.bat script from the command line, passing the appropriate architecture argument. The JVM used to run ant is the one that determines the architecture for the current build. If a x86 JVM is used, use "vcvarsall x86". If a x64 JVM is used, use either "vcvarsall x64" or "vcvarsall x86_amd64" (cross-compiler). The native x64 compiler is available on VS Professional or better, while the Express edition contains only the cross-compiler.

You should be good to go after that.

Jeroenimoo0

Thanks!

I will try to get it to work. I'm new to building with ant and native languages so hopefully i'll get it to work.
So far i got the native compiling to work but now i have problems on -link.

Im on a NVIDIA Gpu btw, so if you are still in need of some test results on those i would love to give my feedback.

Also do you have any idea on when lwjgl 3.0 will have downloadable jars available?

spasi

Right now we have a big hole to fill; support for the OpenGL extensions we have in LWJGL 2. We'll drop a lot of them (there are many obsolete that no one uses), but it's still a lot of work to port everything. When that's done, we'll have a beta release that everyone will be able to try. Can't promise anything time-wise, without external help at least, because there are more important issues I'll have to work on first.

Jeroenimoo0

Ah okay yeah i understand.

I would love to help but i unfortunately have no C experience just some c++, and no JNI experience at all.

Looking forward to the release though, my last project was with GLFW and multiple windows is one awesome future i was missing in lwjgl.

Good luck with creating 3.0.

spasi

LWJGL 3 has been designed to not require any C coding at all and only minimal understanding of how C works (the same experience you'd need to use OpenGL). The only functionality that needs manual coding is callbacks, which in terms of OpenGL means a handful of extensions (the debug_output ones). Everything else can be implemented using the Generator and tested using plain Java code. More details can be found in the wiki, under the Contribute section.

erlend_sh

Have you tried testing LWJGL 3 with tools like Avian or RoboVM yet? There's one discussion about it on the RoboVM forum. Seems it's not quite there yet:

https://groups.google.com/forum/#!topic/robovm/p3HJisndt-4

Also, I haven't been able to find much about your reasoning for using Kotlin. Would be nice if there was a write-up about it on the wiki. Was it chosen mainly for the sake of convenience, or do you have some bigger plans for Kotlin's special features like the JavaScript interoperability?

spasi

That discussion is about Kotlin. LWJGL 3 only uses Kotlin for the code generator, which is a purely "offline" process that produces plain Java and C code. The rest of the project is pure Java and compiled using javac. I don't know if Kotlin interacts badly with Avian/RoboVM, but in any case, we don't have a runtime dependency to it.

erlend_sh

Quote from: spasi on March 05, 2014, 10:38:19
That discussion is about Kotlin. LWJGL 3 only uses Kotlin for the code generator, which is a purely "offline" process that produces plain Java and C code. The rest of the project is pure Java and compiled using javac. I don't know if Kotlin interacts badly with Avian/RoboVM, but in any case, we don't have a runtime dependency to it.
Okay great, that's exactly what I wanted to know, thanks!

cebarks

I got this error when trying to compile LWJGL3 from source on OS X 10.9.1, any idea what's wrong? Let me know if you need more information!

compile-native-macosx:
 [SDK Root] /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk
 [Compiler] /Users/anten/git/lwjgl3/generated/native/opencl/org_lwjgl_opencl_CL20.c:10:96: fatal error: unknown type name 'cl_pipe_properties'; did you mean 'cl_context_properties'?
 [Compiler] typedef cl_mem (APIENTRY *clCreatePipePROC) (cl_context, cl_mem_flags, cl_uint, cl_uint, const cl_pipe_properties *, cl_int *);
 [Compiler]                                                                                                ^~~~~~~~~~~~~~~~~~
 [Compiler]                                                                                                cl_context_properties
 [Compiler] /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/OpenCL.framework/Headers/cl.h:62:29: note: 'cl_context_properties' declared here
 [Compiler] typedef intptr_t            cl_context_properties;
 [Compiler]                             ^
 [Compiler] 1 error generated.

BUILD FAILED
/Users/anten/git/lwjgl3/build.xml:187: The following error occurred while executing this line:
/Users/anten/git/lwjgl3/config/macosx/build.xml:111: apply returned: 1

matanui159

I just have 2 questions:

  • theres a lot of talk about using JavaFX with LWJGL, will I still be able to use normal java? I cannot get JavaFX working on eclipse
  • how much of the API will change? Will I have to recode everything?
Sorry if someone has already asked these questions on this topic, I didn't read all the pages (So many!)
ALGORITHM
A word used by programmers when they do not want to explain what they did.

WEE :)

spasi

Quote from: cebarks on March 22, 2014, 00:09:08I got this error when trying to compile LWJGL3 from source on OS X 10.9.1, any idea what's wrong? Let me know if you need more information!

I've seen the issue on Github, will try to fix soon.

Quote from: matanui159 on March 22, 2014, 00:45:09I just have 2 questions:

  • theres a lot of talk about using JavaFX with LWJGL, will I still be able to use normal java? I cannot get JavaFX working on eclipse
  • how much of the API will change? Will I have to recode everything?

1) JavaFX integration, if possible, will be optional.
2) Most of the OpenGL/CL/AL APIs will remain the same. The windowing and input APIs will be completely different, so you'll have to re-implement those.

matanui159

Quote from: spasi on March 22, 2014, 09:58:43
Quote from: cebarks on March 22, 2014, 00:09:08I got this error when trying to compile LWJGL3 from source on OS X 10.9.1, any idea what's wrong? Let me know if you need more information!

I've seen the issue on Github, will try to fix soon.

Quote from: matanui159 on March 22, 2014, 00:45:09I just have 2 questions:

  • theres a lot of talk about using JavaFX with LWJGL, will I still be able to use normal java? I cannot get JavaFX working on eclipse
  • how much of the API will change? Will I have to recode everything?

1) JavaFX integration, if possible, will be optional.
2) Most of the OpenGL/CL/AL APIs will remain the same. The windowing and input APIs will be completely different, so you'll have to re-implement those.

Ok, thanks :)
If i do get JavaFX working on eclipse how would it work? (Again I haven't looked through the whole topic)
Would it be the same with AWT where you bind it to a canvas or something?
Or will it be different?
ALGORITHM
A word used by programmers when they do not want to explain what they did.

WEE :)

spasi

Quote from: matanui159 on March 22, 2014, 12:28:01If i do get JavaFX working on eclipse how would it work? (Again I haven't looked through the whole topic)
Would it be the same with AWT where you bind it to a canvas or something?
Or will it be different?

Hard to say at this point. Java 8 has shipped without any changes to JavaFX that would make integration easier (or with decent performance). Depending on what happens in the future, the integration could be simple from the user perspective (with LWJGL handling all the details) and also fast (I think the best-case we can hope for is a single framebuffer copy + synchronization overhead).

cebarks

Quote from: spasi on March 22, 2014, 09:58:43
Quote from: cebarks on March 22, 2014, 00:09:08I got this error when trying to compile LWJGL3 from source on OS X 10.9.1, any idea what's wrong? Let me know if you need more information!

I've seen the issue on Github, will try to fix

Awesome thank you!