Skip to main content

OffScreenCanvas3D: various

1 reply [Last post]
nvaidya
Offline
Joined: 2004-08-03
Points: 0

Kevin and Chien,

OK ! firstly on Issue 18. Well, was trying to figure why is it that the testcase (static) fails while my module which continuously captures the canvas, makes a texture, blends with another and finally re-textures an onscreen geometry WORKS and w/o memory leaks ! - see for example the following pic. which shows the result in a JSplitPane (note the 2 notches below the Help button):
http://www.freewebs.com/matspring/

The difference simply was that for the dynamic case, I was specifying a power-of-2 texture. With this mod. in the Issue 18 testcase, the JSplitPane can be resized without any catastrophe. To verify this, simply respecify the width and height in OffScreenCanvas3D#doRender(..) by adding the following line:
width = height = 512;

The performance of OffScreen rendering, however, is quite poor. I notice that there is already an RFE regarding this. Questions I have are:

1. Why is OffScreenRendering slower (nearly 5 times) than screen capture with a Raster in Canvas3D's postSwap() ? The problem doesn't appear to be waitForOffScreenRendering() since commenting it out makes zippo difference ! Maybe glRead/DrawPixels is quite slow, but Java 3D seems to be slower than OGL+GLUT. As I asked earlier, will a glCopyTexImage2D help shortcircuiting anything in the process, if all I need do is to make a texture directly from the Canvas ?

2. Is pbuffer used by WinOGL Java 3D ? I tried to follow the #ifdef in the source code, and I may be wrong but it appeared that there was no reference to it.

3. What happens if I set the ByRef flag in the buffer passed onto OffC ? Does it make a difference to memory usage at all in continuous frame capture ?

4. I notice that there is a small issue when multiple Appearances refer to a dynamic texture. Making one of them non-live freezes updates to the other. I have a workaround currently, and will see if I can reproduce the problem in a small testcase.

Thanks for the help

--Vaidya

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
nvaidya
Offline
Joined: 2004-08-03
Points: 0

1. Any chance we could get pbuffer+RTT support in Java3D ? I grep-ed the source code for WGL_ARB_pbuffer, but couldn't get any hit.

2. I'd like to be able to do the following in a Behavior triggered by WakeupOnElapsedFrames(0) condition:

public void processStimulus(..) {
step1. take an OffScreen snapshot
step2. change some live appearance attributes
step3. take an OffScreen snapshot again
}

Is the above possible/impossible currently (because of appearance attribute frame latency) ?

Thanks