spasi / lwjgl-fx Goto Github PK
View Code? Open in Web Editor NEWLWJGL-JavaFX integration demo
LWJGL-JavaFX integration demo
Hi Spasi,
maybe out of interest for you, but i found that here:
you miss a
glDeleteTextures(texID);
also in:
TextureStreamPBODefault
TextureStreamPBORange
you must delete the public void destroy() override
This was causing a leak in my app ;)
Cheers!
I'm wondering if you have any idea what is causing this massive performance drop when there is a JavaFX transition running and we resize the window. Once resized, if the animation is stopped and started again everything is fine.
I forked and added a button that you can click to start and stop an animation on it so you can see for yourself. https://github.com/Drakkoon/LWJGL-FX
I'm pretty sure there's some caching done on JavaFX's side, but I can't find what, where and how it is affecting this.
I know it might seem crazy to you that we're continuing to use this for production, but it's been working well, so far. Well, up until today.
I've been banging my head for a couple of days wondering why the lights from Box2dlights won't show, checked everything, then thought of running stuff as a LWJGLApplication, and lo, "let there be light...and there was light."
Care to share your thoughts?
I tried to run this code, I got the latest LWJGL library ( 2.9.1 ) and I even tested with the library that is included with this project, same issue on both. Project just will not start. It has 15 errors total.
This is the error I get....
http://pastebin.com/raw.php?i=NV3TjqeS
The top error is pointing to line 68. I then went to line 68 where it shows to load the image icon ( lwjgl_32x32.png ) and when I comment that out, since its only an image icon, I get down to only 1 error left....
http://pastebin.com/raw.php?i=qfJCRtP2
I'm on Windows 7 x64 with 8 Gigs Ram
Quad Core i5 2500k CPU
Nvidia GTX 660Ti Video card with 3 gigs Ram
I'm using Eclipse Version: Kepler Service Release 2
Latest SDK of Java8 is installed.
The code when setup, shows no red errors. But when i run it, the two links show you the errors that show up in the console. I am starting to think that paths are an issue here.
Oh and by the way, I LOVE the whole idea behind this program.
LWJGL with JavaFX = Perfect !!! Thanks. :)
Hi Spasi,
This is a wonderful project and I am using it to learn to integrate jwjgl to javaFX. I had set up and run the application but I receive the following error every once in a while. I Googled the error but I didn't seem to find some answer that I can understand. Would you help me advise how to solve this issue? Thank you!
I am using JDK 8 (update 5) and JavaFX 8, Windows 7 SP1 64bit, OpenGL3.3 with jwjgl 2.9.1. The compilation level is set to 1.8.
Here is the stacktrace:
java.lang.IllegalArgumentException: Upload requires 2563280 elements, but only 2538220 elements remain in the buffer
at com.sun.prism.impl.BaseTexture.checkUpdateParams(Unknown Source)
at com.sun.prism.d3d.D3DTexture.update(Unknown Source)
at com.sun.prism.impl.BaseTexture.update(Unknown Source)
at com.sun.prism.impl.BaseResourceFactory.getCachedTexture(Unknown Source)
at com.sun.javafx.sg.prism.NGImageView.renderContent(Unknown Source)
at com.sun.javafx.sg.prism.NGNode.doRender(Unknown Source)
at com.sun.javafx.sg.prism.NGImageView.doRender(Unknown Source)
at com.sun.javafx.sg.prism.NGNode.render(Unknown Source)
at com.sun.javafx.sg.prism.NGGroup.renderContent(Unknown Source)
at com.sun.javafx.sg.prism.NGRegion.renderContent(Unknown Source)
at com.sun.javafx.sg.prism.NGNode.doRender(Unknown Source)
at com.sun.javafx.sg.prism.NGNode.render(Unknown Source)
at com.sun.javafx.sg.prism.NGGroup.renderContent(Unknown Source)
at com.sun.javafx.sg.prism.NGRegion.renderContent(Unknown Source)
at com.sun.javafx.sg.prism.NGNode.renderForClip(Unknown Source)
at com.sun.javafx.sg.prism.NGNode.renderRectClip(Unknown Source)
at com.sun.javafx.sg.prism.NGNode.renderClip(Unknown Source)
at com.sun.javafx.sg.prism.NGNode.doRender(Unknown Source)
at com.sun.javafx.sg.prism.NGNode.render(Unknown Source)
at com.sun.javafx.sg.prism.NGGroup.renderContent(Unknown Source)
at com.sun.javafx.sg.prism.NGRegion.renderContent(Unknown Source)
at com.sun.javafx.sg.prism.NGNode.doRender(Unknown Source)
at com.sun.javafx.sg.prism.NGNode.render(Unknown Source)
at com.sun.javafx.sg.prism.NGGroup.renderContent(Unknown Source)
at com.sun.javafx.sg.prism.NGRegion.renderContent(Unknown Source)
at com.sun.javafx.sg.prism.NGNode.doRender(Unknown Source)
at com.sun.javafx.sg.prism.NGNode.render(Unknown Source)
at com.sun.javafx.tk.quantum.ViewPainter.doPaint(Unknown Source)
at com.sun.javafx.tk.quantum.ViewPainter.paintImpl(Unknown Source)
at com.sun.javafx.tk.quantum.PresentingPainter.run(Unknown Source)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
at com.sun.javafx.tk.RenderJob.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Hi,
Thank you for your work on this.
I'm using an nVidia card, in Windows 7, with Java 8u40 64-bit.
I wanted to learn using this for my application but I ended up using a derivative of your work found at
https://bitbucket.org/xpenatan/libgdx-javafx/overview, since it had a ready node to use, and I couldn't find something of the sort in your code. I figured it is likely that the derived work incorporated your latest changes anyway, so....
I encountered the issue mentioned in #6 and went researching for it, which was how I found this ticket I just referenced. It says that the issue has been resolved, so what I did was copy over the contents of the org.lwjgl.util.stream package to the derived work, since all libgdx to jfx projects use the very same code. I was thinking that, maybe the case was the derivative works didn't incorporate your fix for issue 6.
But the issue didn't go away, in fact, it's even worse, throwing the exception on every refresh. Any thoughts about this? Can you point me to what part in your code I can use to embed into my JFX application?
Thanks.
Inspired by this project, I built a simple class that does the same thing, just for AWT (Canvas) and Swing (JPanel). It is just a simple component that paints a cached image. That image is taken from an OpenGL texture attached to an FBO for off screen rendering.
Does this belong into this project or should I upload it on a separate GitHub repo?
I am still trying to learn and understand the code. As I change the "MSAA Samples" by drag the slider the "Gears" window becomes completely black and one error keeps being thrown, basically the application only works when "MSAA Samples" is set to 1.
My system runs jdk 8 (update 5), javafx and OpenGL 3.3 with jwjgl 2.9.1
[LWJGL] ARB_debug_output message
ID: 1286
Source: API
Type: ERROR
Severity: HIGH
Message: GL_INVALID_FRAMEBUFFER_OPERATION error generated. Framebuffer bindings are not framebuffer complete.
RenderStream.java, TextureStream.java, StreamHandler.java and StreamUtil.java don't have license headers. Are they under the same license as the rest of classes?
Could you please add the license headers to them?
I think you should also consider adding a LICENSE file in the main project directory (and/or some license information in readme). It would make it easier for people to quickly see under what license your project is published.
Just wanted to leave a note here that this works on OSX since somebody on the java-gaming closed the thread for no reason. (http://www.java-gaming.org/topics/lwjgl-javafx-integration/27801/view.html)
All you have to do is add this to your main:
System.setProperty("javafx.macosx.embedded", "true");
java.awt.Toolkit.getDefaultToolkit();
(properly you want to detect OSX).
With your demo I got 250 frames/sec
I got pretty far in my work and got my world to screen conversions down to where I want them. I was working under the impression that things were y-up, but I just found out that your project seems to function on y-down, because my conversions cause objects to move in reverse e.g. gravity pulls up, not down, when I take my app out of the FXNode and run it as an LWJGLApplication.
I'd be happy to do the modification, just point me to where it's appropriate to make a change and I'll get around to making a pull request when I have the time.
Ooo goodies,
I have been researching this quite a bit but this seems to be an issue.
As far as my research goes is that puffers are not supported by Virtual Box, or even vmware or parallels...
Is there a way to by-pass puffers usage using a different rendering technique?
JavaFX 13 has released now and it allows for images backed by native buffers. javafxports/openjdk-jfx#472
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.