Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (498)
Games in Android Showcase (117)
games submitted by our members
Games in WIP (564)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1] 2
  ignore  |  Print  
  JOGL in JavaFX  (Read 15291 times)
0 Members and 1 Guest are viewing this topic.
Offline arnaud_couturier
« Posted 2012-07-18 13:05:48 »

Since the JavaFX forum seems a bit dead, I hope someone will at least read this post.
Especially I have a question for gouessej:

- is it possible to use JOGL with JavaFX ?
- if not, is it planned ?


I've searched without success whether it is possible to integrate a JOGL container into JavaFX.
It seems impossible.
There is the JFXPanel, but I would prefer going full Swing or full JavaFX, but not mixing the two.

GUIs made with JavaFX look just gorgeous, and styling with CSS is a lot of fun.
Guess I'll have to fiddle with Nimbus in the meantime.
Offline gouessej
« Reply #1 - Posted 2012-07-18 17:21:25 »

Since the JavaFX forum seems a bit dead, I hope someone will at least read this post.
Especially I have a question for gouessej:

- is it possible to use JOGL with JavaFX ?
Yes, it is already working with JOGL 1.1.1a and JavaFX 1.3 but it doesn't work anymore with JavaFX 2 (even though JavaFX uses a "private" version of JOGL).

- if not, is it planned ?
JOGL is a community project independent of Oracle. There is no plan yet.

I've searched without success whether it is possible to integrate a JOGL container into JavaFX.
It seems impossible.
There is the JFXPanel, but I would prefer going full Swing or full JavaFX, but not mixing the two.

GUIs made with JavaFX look just gorgeous, and styling with CSS is a lot of fun.
Guess I'll have to fiddle with Nimbus in the meantime.
JFXPanel allows to embed JavaFX components into a Swing GUI, I'm not sure it is really suitable.

We need a lower level access to support JavaFX with JOGL, we could find a solution by looking at OpenJFX but if JavaFX uses Direct3D under Windows, we won't be able to use JOGL. We had the same problem with Java3D 1.5, I solved it in Java3D 1.6 pre by dropping the Direct3D backend.

Offline arnaud_couturier
« Reply #2 - Posted 2012-07-18 22:18:52 »

Thanks or your quick reply!
Do you read every post on these forums? LOL  Shocked

Quote
Yes, it is already working with JOGL 1.1.1a and JavaFX 1.3 but it doesn't work anymore with JavaFX 2 (even though JavaFX uses a "private" version of JOGL).
That's what I feared.
I'm with JOGL 2, and was planning to use JavaFX 2, since 1.3 is dead.

Quote
JFXPanel allows to embed JavaFX components into a Swing GUI, I'm not sure it is really suitable.
I was thinking about putting JOGL in Swing, then do the rest of the app's GUI in JFXPanels. But from my little trivial tests, performances are noticeably degraded when embedding JavaFX in Swing, and I find that solution ugly design-wise; I might be masturbating though...

Quote
We need a lower level access to support JavaFX with JOGL, we could fund a solution by looking at OpenJFX but if JavaFX uses Direct3D under Windows, we won't be able to use JOGL. We had the same problem with Java3D 1.5, I solved it in Java3D 1.6 pre by dropping the Direct3D backend.
Since JavaFX is the new GUI in the Java world, there will be a point where JOGL will have to be ported. Swing will be available for the next 10 years or so I guess (an eternity), but still...
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline gouessej
« Reply #3 - Posted 2012-07-19 08:27:36 »

If JavaFX doesn't enable to deactivate its Direct3D backend, using it with JOGL will be totally impossible because there would be a conflict at driver level. I hope you really understand that. I'm not against JavaFX but I refuse promising the implementation of a feature when I know we won't be able to achieve it. Feel free to contribute, maybe write a request for enhancement, put it into our bug tracker.

You know I keep watch over the world wide web, especially the surface web and a part of the deep web.

Offline arnaud_couturier
« Reply #4 - Posted 2012-07-19 09:02:37 »

Quote
I hope you really understand that.
Yes I do. I'm not blaming anyone  Smiley
I understand the technical difficulties. I just think it would be a waste if, in time, Oracle did not do the necessary to allow JOGL (and similar) to be ported to JavaFX, especially as it is one of the rare ways to integrate OpenGL in a GUI in Java. I even think Sun/Oracle should have already provided their own way to do it natively in Java, but this is another debate.

Quote
Feel free to contribute, maybe write a request for enhancement, put it into our bug tracker
Good idea, I'll do it.

Quote
especially the surface web and a part of the deep web
So is javagaming.org part of the surface or underworld ?
I'd like to know where I stand Wink
Offline gouessej
« Reply #5 - Posted 2012-07-19 09:58:08 »

NEWT (the native windowing toolkit of JOGL) can probably be used with JavaFX.

Java-Gaming.org is indexed by search engines, it is obviously in the surface web.

Offline arnaud_couturier
« Reply #6 - Posted 2012-07-19 10:07:28 »

Quote
NEWT (the native windowing toolkit of JOGL) can probably be used with JavaFX.
I had a look at it before starting this thread.
It doesn't provide a JavaFX container.

I don't see why it would work where AWT and Swing fail... ?
Did I miss something ?
Offline gouessej
« Reply #7 - Posted 2012-07-19 11:08:13 »

I have just posted a question about JavaFX and interoperability with Java bindings for the OpenGL API on the main mailing list of OpenJFX developers.

We have the full control on NEWT as it doesn't depend on AWT. If there is a way of using the OpenGL backend of Prism under Windows, we will be able to implement some interoperability between JavaFX and JOGL, that is a way of using JavaFX components inside a NEWT container (GLWindow), a way of using NEWT components inside a JavaFX container and some ways of interacting with Prism rendering to inject JOGL calls directly in the painting of JavaFX components (and vice versa).

Offline arnaud_couturier
« Reply #8 - Posted 2012-07-19 22:11:25 »

Quote
Feel free to contribute, maybe write a request for enhancement, put it into our bug tracker
I submitted the feature request
https://jogamp.org/bugzilla/show_bug.cgi?id=607

Quote
I have just posted a question about JavaFX and interoperability with Java bindings for the OpenGL API on the main mailing list of OpenJFX developers.

We have the full control on NEWT as it doesn't depend on AWT. If there is a way of using the OpenGL backend of Prism under Windows, we will be able to implement some interoperability between JavaFX and JOGL, that is a way of using JavaFX components inside a NEWT container (GLWindow), a way of using NEWT components inside a JavaFX container and some ways of interacting with Prism rendering to inject JOGL calls directly in the painting of JavaFX components (and vice versa).
This would be very nice.
I hope there is some possibilities, and also some interest.
Offline gouessej
« Reply #9 - Posted 2012-07-29 09:52:20 »

Hi

I have studied that RFE for several hours, it won't be possible or it will require a lot of time, I will explain it in details in your bug report.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline arnaud_couturier
« Reply #10 - Posted 2012-08-03 01:24:09 »

Replied on the bug report
https://jogamp.org/bugzilla/show_bug.cgi?id=607#c2
Offline gimbal

JGO Knight


Medals: 25



« Reply #11 - Posted 2012-08-03 07:56:17 »

Note that the JavaFX devs have mentioned themselves that even though it is possible to reach some low level stuff in JavaFX now when you bypass the API, as soon as Java goes "modular" through Jigsaw (whenever that is going to be), it will become impossible to still do that as it will all be completely hidden away. I've seen some discussions on the OTN forums about the subject of hooking Java3D or JOGL into JavaFX, it looks like Oracle wants to keep it nice and contained.
Offline gouessej
« Reply #12 - Posted 2012-08-03 11:46:44 »

I've seen some discussions on the OTN forums about the subject of hooking Java3D or JOGL into JavaFX, it looks like Oracle wants to keep it nice and contained.
Do you have some links about that??

Offline arnaud_couturier
« Reply #13 - Posted 2012-08-16 22:14:12 »

There are 2 new additions to JavaFX in 2.2 (http://fxexperience.com/2012/08/javafx-2-2-is-here-and-javafx-8-0-is-on-its-way/) that caught my eye, regarding OpenGL support:
- a canvas node
- writable images

Can't these help in porting JOGL to JavaFX ?
Offline gouessej
« Reply #14 - Posted 2012-08-16 23:12:36 »

No, it can't, the canvas node is helpful for guys who want to port HTML5 applications to JavaFX. I will write a request for enhancement about our problem in about ten hours still on Kenai but I'm not sure it is the right place to do so.

Offline gimbal

JGO Knight


Medals: 25



« Reply #15 - Posted 2012-08-17 12:54:39 »

I've seen some discussions on the OTN forums about the subject of hooking Java3D or JOGL into JavaFX, it looks like Oracle wants to keep it nice and contained.
Do you have some links about that??

Sorry, I missed your question Sad Let me see if I can dig it up.

EDIT:

hmm well this is one: https://forums.oracle.com/forums/thread.jspa?messageID=10470743

That is not the one I'm mainly referring too though, but of course the OTN forum's search is horrible and I'm not finding the relevant thread. If I come across it again I'll certainly post it Sad
Offline Dejay

Senior Newbie


Medals: 3



« Reply #16 - Posted 2012-08-26 07:50:59 »

Hi, I just wanted to share my experiences on this topic:

Short version: on Mac OS X it can be done, although hacky.

At work we use JavaFX 2 on MacOSX for an editor / content management system with some fancy 3D graphic
eyecandy.
We needed to integrate an existing 3D engine (standalone app) and used IOSurface to show the result in JavaFX.
On Mac OS X it's rather simple to write a custom node an overwrite the _impl_createNGNode (or something).
Until 2.2 you even got a graphics object in the render call that can be cast into a jogl GL interface to access OpenGL directly.
You needed to take care about setting / saving some render states but it works pretty nice. After one beta update in 2.2 the
GLESPipeline changed and did not allow full access to OpenGL
functionality anymore. But you can still simple call opengl commands since the NGNode.render() function is called in the OpenGL render
context thread.
We had to use a outdated openGL java binding because unfortunatly neither JOGL nor LWJGL could be used (JOGL needs some
kind of window handle even though you just want to call some openGL commands, and LWJGL crashes because some static
initializer starts up AWT with makes JavaFX2 crash). But it still works very nice.

I suppose we will have to patch our hacky solution when the internal structure changes. Ideally they would implement a
factory pattern that creates the NGRender nodes corresponding to the ui data models.

There are also hints in the class files that an JavaFX 2 OpenGL implementation for Windows already exists, some strings starting
with WGLXXX, compared to the mac implementation starting with CGLXXX. But those files aren't released. I've fiddled
a bit with an own "class GLPipeline extends GraphicsPipeline" for windows, and think it can be done with about 10 classes,
but I'm not sure about legal implications till it's open sourced.

IMO it's very important that JavaFX 2 will allow low level access to 3D hardware. Many cool effects like complex
3D objects, raytracing, screen space ambient occlusion, shadow mapping, particles etc are only possible with
direct access to hardware.
I *really* hope that JavaFX 2 will indeed become open source. If they release the prism part it wouldn't be
much trouble to add an optional OpenGL pipeline for Windows. This would allow writing platform independent OpenGL
nodes.

Instead of the Canvas node, they should add a "OpenGL" node where you pass an "RenderNode" interface where
you can call openGL commands, with a predefined render state. A kind of "use at your own risk" node would be fine
with me =)

Another good feature for JavaFX 2 would be a "SharedSurface" node via DirectX shared surface / mac os x IOSurface,
so you can integrate framebuffers from other processes. This would help integrate any existing rendering solution.
Offline gouessej
« Reply #17 - Posted 2012-08-26 10:22:20 »

Hi

We had to use a outdated openGL java binding because unfortunatly neither JOGL nor LWJGL could be used (JOGL needs some
kind of window handle even though you just want to call some openGL commands, and LWJGL crashes because some static
initializer starts up AWT with makes JavaFX2 crash).
I'm not sure you're right about JOGL 2.0 (I already used an external context without any window handle) and anyway, there should be a way of getting this window handle. You're wrong about Windows, we have no way to force JavaFX to use OpenGL instead of Direct3D. Your suggestions work under Mac, they could be ported to GNU Linux but the main problem is still under Microsoft Windows. I'm glad to learn some things about your findings and I hope you will share them. I'm a bit skeptical because I was in a similar situation some years ago, a guy said he had ported Ardor3D to JOGL 2.0 and that he would share his source code. Do you know what happened at the end? He never shared it and I had to port this engine to JOGL 2.0 by myself.

Edit.: I have no access to Prism source code and you talk about this class: com.sun.javafx.sg.prism.NGNode
Edit.2: The source code of Quantum is not yet open source.
Edit.3: Maybe you can use GLContext.getCurrentGL(), GLDrawableFactory.createExternalGLContext() or GLDrawableFactory.createExternalGLDrawable().
Edit.4: You can get the window handle with a GLDrawable instance but it is useless as you can already use my suggestion to create an external GLDrawable, call getGL() on it and use your OpenGL commands.
Edit.5: I'm investigating, you can do some reverse engineering on JavaFX by downloading the latest version of Oracle JDK 1.7 update 6 and looking at jre/lib/jfxrt.jar
Edit.6: I use JD-GUI to decompile JavaFX. NGNode is abstract, I don't find its child classes.
Edit.7: NGNode has lots of child classes: NGCanvas, NGGroup (NGRegion, NGWebView), NGImageView, NGMediaView, NGShape (NGArc, NGCircle, NGCubicCurve, ...). The hack should be more useful in NGCanvas.
Edit.8: Quantum enables AWT headless mode, keep it in mind, avoid calling AWT methods that do not work in this mode.
Edit.9: Dejay's suggestion is not trivial to implement with the latest version of JavaFX 2.2 because it is impossible to instantiate NGNode.
Edit.10: You can use com.sun.prism.es2.ES2Pipeline to get the (public static) GLFactory or directly GLFactory.getFactory(). If you find which class use this factory to create the GLDrawable, then you can do whatever you want Wink
Edit.11: Oracle has probably dropped JOGL. All OpenGL calls seem to be done in native code. The GLDrawable contains the native window handle (see getNativeWindow()). Creating an external drawable and using it at the appropriate time seems to be the only way to support JOGL 2.0 in JavaFX.
Edit.12: You can get the graphics pipeline by calling com.sun.prism.GraphicsPipeline.getPipeline().

Offline gouessej
« Reply #18 - Posted 2012-08-26 20:37:07 »

JFXPanel could be a nice source of inspiration to write a NEWT component embedding a JavaFX scene.

The JOGL 2.0 rendering should be done in classes overriding Prism NG* classes. These classes should perform the JOGL 2.0 rendering in doRender(Graphics) or rather in renderContent(Graphics) (if you want to get the proper transforms).

impl_createPGNode() and impl_getPGNode() in javafx.scene.Node are deprecated, the creation is done in Quantum most of the time but I have found no way of setting a custom toolkit and Toolkit.getToolkit() can't be overridden of course. Dejay is right, the key is javafx.scene.Node.impl_createPGNode(). It would be easier and safer if we could rely on a public non deprecated method. Overriding existing nodes so that they use our peers instead of Prism NG* classes should work with the external contexts and drawables.

I will try to implement a blueprint tomorrow if I'm really motivated and not too much tired.

Offline arnaud_couturier
« Reply #19 - Posted 2012-08-27 23:38:40 »

Thanks again for looking into this.

I can't stop wondering why Oracle/the JavaFX team seem to ignore JOGL.
Showcasing OpenGL-powered 3d apps working in tandem with pretty JavaFX GUIs would be a major selling point for them.
Offline gouessej
« Reply #20 - Posted 2012-08-28 06:15:19 »

Thanks again for looking into this.
I don't have a lot of time to work on it. Some help would be welcome. Decompiling JavaFX is not difficult with JD-GUI (I will give some money to the creator of this nice tool).

I can't stop wondering why Oracle/the JavaFX team seem to ignore JOGL.
Showcasing OpenGL-powered 3d apps working in tandem with pretty JavaFX GUIs would be a major selling point for them.
Keep in mind that Oracle gave up JOGL and now it uses only native OpenGL calls, no real binding. I'm not very motivated to make an effort on something that might be quickly broken if Oracle modifies its APIs.

Offline Dejay

Senior Newbie


Medals: 3



« Reply #21 - Posted 2012-09-01 04:41:25 »

Hello Julien,

thank you for your tips in edit 3, I'll check it out. I'm a bit embarrassed but I got a little lost with the NEWT
classes for window handling. They are also in different packages. I'm always so damn impatient =)

I have also made a post in the oracle forum, I just hope I'm not waking sleeping dogs but get a good response Wink
https://forums.oracle.com/forums/thread.jspa?threadID=2434547&tstart=0

Hopefully they'll make prism open source soon. I totally understand your hesitation about the evolving JavaFX code
structure. I can also totally understand the JavaFX team desire to encapsulate the rendering pipeline to avoid breaking
applications for updates. I still think it's very important to be able to do stuff like this.

Quote
Edit.9: Dejay's suggestion is not trivial to implement with the latest version of JavaFX 2.2 because it is impossible to instantiate NGNode.

I used NGRegion which has a public constructor and doesn't do much, but I'm hoping when they remove the _impl_ methods they will
provide a better mechanism like a factory pattern where you can register rendering controllers for new nodes.
Probably NGCanvas has a lot of stuff in it already for the deferring of the canvas draw calls.

Quote
Edit.10: You can use com.sun.prism.es2.ES2Pipeline to get the (public static) GLFactory or directly GLFactory.getFactory(). If you find which class use this factory to create the GLDrawable, then you can do whatever you want
Edit.11: Oracle has probably dropped JOGL. All OpenGL calls seem to be done in native code. The GLDrawable contains the native window handle (see getNativeWindow()). Creating an external drawable and using it at the appropriate time seems to be the only way to support JOGL 2.0 in JavaFX.

What I've tried is implementing a "JOGLPipeline" that only seems to need 7 classes that make up the render pipeline. Basically
an abstraction of shaders, vertex buffers and some predefined shaders to render shapes with compositing etc. The design of
the prism renderer is pretty nice IMO.
I've pasted my pathetic code for your entertainment: https://gist.github.com/3564076

1  
2  
3  
4  
5  
6  
7  
public class JOGLPipeline extends GraphicsPipeline
public class JOGLResourceFactory extends BaseShaderFactory
public class JOGLPresentable implements Presentable, GraphicsResource
public class JOGLContext extends BaseShaderContext
public class JOGLShader implements Shader
public class JOGLVertexBuffer extends VertexBuffer
public class JOGLGraphics extends BaseShaderGraphics

And a class "com.sun.prism.jogl.JOGLPipeline extends org.dejay.prism.opengl.JOGLPipeline".

This can be injected into PrismSettings (it's instantiated with string concatenation and getClassForName)
PrismSettings.verbose = true;
PrismSettings.tryOrder = new String[] { "jogl" };
Application.launch(args);

I've only implemented some log traces and rendered an empty scene to find out what's happening.

I'm not sure how to attach a jogl GLWindow to the view created by JavaFX glass. Atm I tried:
1  
2  
      window = NewtFactory.createWindow(view.getNativeView(), screen, new GLCapabilities(GLProfile.getDefault()));
      glWindow = GLWindow.create(window);



Log output:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
Prism pipeline name = com.sun.prism.jogl.JOGLPipeline
(X) Got class = class com.sun.prism.jogl.JOGLPipeline
Initialized prism pipeline: com.sun.prism.jogl.JOGLPipeline
INFO: org.dejay.prism.opengl.JOGLPipeline init -
INFO: org.dejay.prism.opengl.JOGLPipeline getDefaultResourceFactory screens: 2
INFO: org.dejay.prism.opengl.JOGLResourceFactory createVertexBuffer
RESIZE: 3115294780147 w: 184 h: 162
INFO: org.dejay.prism.opengl.JOGLPipeline getDefaultResourceFactory screens: 2
INFO: org.dejay.prism.opengl.JOGLResourceFactory createRenderingContext
INFO: org.dejay.prism.opengl.JOGLResourceFactory createPresentable view: com.sun.glass.ui.win.WinView@42f25b18
INFO: org.dejay.prism.opengl.JOGLPresentable <init> context: org.dejay.prism.opengl.JOGLContext@13417588 view.getNativeView: 526108
INFO: org.dejay.prism.opengl.JOGLPresentable <init> glWindow: NEWT-GLWindow[
   Helper: GLAnimatorControl: null, GLEventListeners num 0 [],
   Drawable: null,
   Context: null,
   Window: jogamp.newt.driver.windows.WindowsWindow[Config null
, NEWT-Screen[Windows_nil-10, idx 0, refCount 0, 0x0, null, NEWT-Display[Windows_nil-1, refCount 0, hasEDT true, edtRunning true, null]]
, ParentWindow null
, ParentWindowHandle 0x8071c (true)
, WindowHandle 0x0
, SurfaceHandle 0x0 (lockedExt window false, surface false)
, Pos 64/64 (auto true), size 128x128
, Visible false, focus false
, Undecorated true (true)
, AlwaysOnTop false, Fullscreen false
, WrappedWindow null
, ChildWindows 0, SurfaceUpdatedListeners num 0 [], WindowListeners num 1 [com.jogamp.newt.opengl.GLWindow$1@19a8cd8a, ], MouseListeners num 0 [], KeyListeners num 0 [], surfaceLock <194e2c2f, 5b36cea3>[count 0, qsz 0, owner <NULL>], windowLock <6b385e1d, 41aaf8e9>[count 0, qsz 0, owner <NULL>]]]
INFO: org.dejay.prism.opengl.JOGLPresentable createGraphics
INFO: org.dejay.prism.opengl.JOGLPresentable getContentX
INFO: org.dejay.prism.opengl.JOGLPresentable getContentY
INFO: org.dejay.prism.opengl.JOGLPresentable getContentWidth
INFO: org.dejay.prism.opengl.JOGLPresentable getContentHeight
INFO: org.dejay.prism.opengl.JOGLContext updateRenderTarget
INFO: org.dejay.prism.opengl.JOGLGraphics <init> GLGraphics
INFO: org.dejay.prism.opengl.JOGLGraphics clear Color: Color[r=1.0, g=1.0, b=1.0, a=1.0]
INFO: org.dejay.prism.opengl.JOGLResourceFactory createStockShader Solid_Color
INFO: org.dejay.prism.opengl.JOGLShader <init>
INFO: org.dejay.prism.opengl.JOGLShader enable
INFO: org.dejay.prism.opengl.JOGLContext updateShaderTransform
INFO: org.dejay.prism.opengl.JOGLContext updateCompositeMode
INFO: org.dejay.prism.opengl.JOGLPresentable prepare null
INFO: org.dejay.prism.opengl.JOGLPresentable present
RESIZE: 3117915405788 w: 184 h: 163
RESIZE: 3117917257574 w: 185 h: 163
RESIZE: 3117922342587 w: 186 h: 163
INFO: org.dejay.prism.opengl.JOGLPresentable recreateOnResize
INFO: org.dejay.prism.opengl.JOGLPresentable recreateOnResize
INFO: org.dejay.prism.opengl.JOGLPresentable createGraphics
INFO: org.dejay.prism.opengl.JOGLPresentable getContentX
INFO: org.dejay.prism.opengl.JOGLPresentable getContentY
INFO: org.dejay.prism.opengl.JOGLPresentable getContentWidth
INFO: org.dejay.prism.opengl.JOGLPresentable getContentHeight
INFO: org.dejay.prism.opengl.JOGLGraphics <init> GLGraphics
INFO: org.dejay.prism.opengl.JOGLGraphics reset
INFO: org.dejay.prism.opengl.JOGLGraphics clear Color: Color[r=1.0, g=1.0, b=1.0, a=1.0]
INFO: org.dejay.prism.opengl.JOGLShader isValid
INFO: org.dejay.prism.opengl.JOGLPresentable prepare null
INFO: org.dejay.prism.opengl.JOGLPresentable present
Offline gouessej
« Reply #22 - Posted 2012-09-01 07:48:05 »

Hello Dejay

Good job Smiley Your source code is a nice way of beginning the implementation of JavaFX/JOGL interoperability but we still need to get a clear answer to these questions:
- how to disable the Direct3D pipeline under Windows?
- Oracle, are you gonna break our stuff with your changes?

I'm not a big fan of Microsoft but if we can't support Windows, all this is quite a waste of time.

Offline Dejay

Senior Newbie


Medals: 3



« Reply #23 - Posted 2012-09-03 04:48:55 »

I haven't gotten any response of the devs to my post on the oracle forum yet.

Quote
- how to disable the Direct3D pipeline under Windows?

Theoretically with "-Dprism.order=es2" which sets "PrismSettings.tryOrder = new String[] { "es2" };"

This jira bug verifies that there exists an internal gles2 pipeline for windows:
http://javafx-jira.kenai.com/browse/RT-11208

Here is a very sad bug for you ;(
http://javafx-jira.kenai.com/browse/RT-17404
Apparently it was done to reduce memory footprint / startup time which makes sense,
since they only use a handful of methods to handle vertex buffers, textures, framebuffers etc.
But as long as you can bind JOGL to an existing gl context, it doesn't matter I think. The internal
casting of Graphics to ES2Graphics is nice but the internal jogl wouldn't be updated very often
anyway. *IF* and *WHEN* they release a gl es2 pipeline under windows.
I don't know if you can use a OpenGL 3/4 context with a GLES context though.
Offline arnaud_couturier
« Reply #24 - Posted 2013-01-14 00:03:28 »

Is it possible and realistic to do offscreen rendering with JOGL / LWJGL, then switch the result image to JavaFX ?

What approach would be better ?
(I don't need state of the art graphics, I'm using the fixed pipeline. Rendering should be as fast as possible though)
I've seen terms such as pbuffers and FBOs... ??
Offline swpalmer

JGO Coder


Exp: 12 years


Where's the Kaboom?


« Reply #25 - Posted 2013-07-11 01:45:44 »

Excuse my resurrection of this topic.  I haven't been around these parts in ages, but I have been following JavaFX development very closely....

See this thread
http://mail.openjdk.java.net/pipermail/openjfx-dev/2013-May/007885.html


and this
http://mail.openjdk.java.net/pipermail/openjfx-dev/2013-June/008423.html


Basically, there is strong interest from Oracle to expose something like a raw OpenGL surface in JavaFX.  But it is still a ways off.

Offline gouessej
« Reply #26 - Posted 2013-12-19 14:48:42 »

Hi

I've just posted something about the most recent piece of information I obtained from Oracle about the use of native APIs (especially OpenGL) with JavaFX:
https://jogamp.org/bugzilla/show_bug.cgi?id=607#c13

I'll start working on JavaFX when I have some time and when OpenJFX is bundled with OpenJDK (probably before March 2014). Keep in mind that I'm very busy (Ardor3D, NEWT Input API, ...).

I think that Felipe answered to a lot of our questions about JogAmp OpenJFX / JavaFX interoperability in the document that I quoted in the bug report above.

Sorry to be unclear about the road map and contributions are welcome.

Offline Preston

Senior Member


Medals: 4



« Reply #27 - Posted 2014-01-31 11:18:41 »

Hi Julien, thanks for all your work on JOGL etc together with Sven and others.

Your idea to bring JOGL and JavaFX together would much be appreciated. Because, like you, I don't want to throw away our good old computers just because they're older but still work perfectly.
And JavaFX can be useful for new projects (not neccesarily as replacement for Swing), but its demand for newer GPUs is very hard, whilst JOGL runs nearly everyhwere.

"JavaFX 2 Certified System Configurations"
(And it's not relaxed with JFX in Java 8...)

So, keep up the good work, and all the best!
Offline gouessej
« Reply #28 - Posted 2014-02-03 12:39:03 »

Hi

You're welcome. Sorry for the late reply, I was at the FOSDEM. I will implement GLJFXPanel (OpenJFX/JavaFX panel with JOGL support) for sure, this is the least I can do but I'm not sure that I will succeed in implementing a whole alternative pipeline for JavaFX which means that the native existing ES2 pipeline will have to be used (and shipped by yourself for Windows). If you target low end machines, just forget JavaFX. There is a need of a Java GUI widget toolkit working both in desktop and mobile environments but JOGL Graph UI has a very few components compared to Swing and it doesn't support OpenGL(-ES) 1. I'll need to find a real solution on the long term (which JavaFX isn't despite its rich APIs).

Offline xsvenson
« Reply #29 - Posted 2014-02-03 15:29:33 »

The long term plan is to get JavaFX officially working on mobile platforms as well. Currently Oracle is targeting the desktops and embedded systems.
For example: http://stackoverflow.com/questions/20860931/is-it-possible-to-run-javafx-applications-on-iphone-android-win8-mobile
So it's possible and I would even say it's viable solution even for a long term plan.

The question rather is, does it help or is viable, to You, right now

“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
Pages: [1] 2
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Grunnt (23 views)
2014-09-23 14:38:19

radar3301 (14 views)
2014-09-21 23:33:17

BurntPizza (31 views)
2014-09-21 02:42:18

BurntPizza (22 views)
2014-09-21 01:30:30

moogie (20 views)
2014-09-21 00:26:15

UprightPath (30 views)
2014-09-20 20:14:06

BurntPizza (34 views)
2014-09-19 03:14:18

Dwinin (48 views)
2014-09-12 09:08:26

Norakomi (75 views)
2014-09-10 13:57:51

TehJavaDev (108 views)
2014-09-10 06:39:09
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!