Texture2D and offscreen rendering problem

classic Classic list List threaded Threaded
28 messages Options
12
Tex
Reply | Threaded
Open this post in threaded view
|

Re: Texture2D and offscreen rendering problem

Tex
Any update on this issue?

I also have same problem -

Encountered white background only
when attempt to capture the screen by using offscreen Canvas3D.

It worked with 1.5.2
Reply | Threaded
Open this post in threaded view
|

Re: Texture2D and offscreen rendering problem

gouessej
Administrator
Which version of Java3D do you use? Please take my comment into account:
http://forum.jogamp.org/Texture2D-and-offscreen-rendering-problem-tp4030882p4030885.html

This bug might be reproducible with a recent JRE and Java3D 1.5.2.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Texture2D and offscreen rendering problem

jimmypag
In reply to this post by Tex
Hi Tex.

what I did is having my own java3D with the line replaced:
GLDrawable offDrawable = GLDrawableFactory.getFactory(profile).createGLPbuffer(GLDrawableFactory.getDesktopFactory().getDefaultDevice() ,offCaps, null,width, height, GLContext.getCurrent());

I did not have time to dig deeper and so far, it worked. But I did not test last java3D 1.6 releases.

Laurent.
Tex
Reply | Threaded
Open this post in threaded view
|

Re: Texture2D and offscreen rendering problem

Tex
Thank you all,

As you suggested,
I modified the createOffscreenBuffer() method in the Joglpipeline.java.
Just replaced offCaps.setFBO(true) with offCaps.setPBuffer(true).

It woks now!
Reply | Threaded
Open this post in threaded view
|

Re: Texture2D and offscreen rendering problem

gouessej
Administrator
In reply to this post by jimmypag
Please can you provide a diff patch so that I can understand which line has been replaced by what and provide a clean fix. Tex's change will only work where pbuffers work correctly which isn't the case on all platforms, it's not a real solution.

Edit.: I have looked at the previous comments, jimmypag's solution can't work with the latest JOGL version. Tex's suggestion is less dangerous but what happens if you call both offCaps.setFBO(true) and offCaps.setPBuffer(true)? If it works, it's acceptable in a patch.
Julien Gouesse | Personal blog | Website
Tex
Reply | Threaded
Open this post in threaded view
|

Re: Texture2D and offscreen rendering problem

Tex
This post was updated on .
You already mentioned diff in Edit.

I tested as you suggested, Both offCaps.setFBO(true) and offCaps.setPBuffer(true) didn't work.

Only offCaps.setPBuffer(true) worked on Windows 10.

And this didn't work on MacOS X (MacBook late 2009, 10.7.5, Oracle JDK 1.8) anyway.

BTW, When I tried to build "j3dcore-master", I couldn't find "VersionInfo" class and it generated error.
I commented it for build though.
Reply | Threaded
Open this post in threaded view
|

Re: Texture2D and offscreen rendering problem

gouessej
Administrator
Your modification worked on your machine under Windows 10 with your graphics card, ... It doesn't mean that it will work on other machines under Windows 10 but with a completely different graphics card. However, actually, your fix is closer to the previous behavior. My hardware doesn't support FBO, I can't test. I assume that something is missing to make it work with both pbuffers and FBOs.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Texture2D and offscreen rendering problem

hharrison
In reply to this post by Tex
VersionInfo is a generated source file, not shipped in version control, see build.xml for details.

Harvey
12