jPCT - a 3d engine for Java > Support

JPCT and Jide Docking Framework

(1/5) > >>

kavyro:
In our project we use JPCT together with Jide Docking Framework (http://www.jidesoft.com/products/dock.htm). Jide arranges components in "frames". The JPCT canvas (buffer.enableGLCanvasRenderer()) is also running as a separate "frame", so user can move/minimize/maximize the frame freely. Jide frames works perfectly with swing components, but has issues when it comes to JPCT. When application starts everything works OK: the JPCT canvas displays the world with all objects (see screenshot "before.png" in attachments). However when JPCT frame is moved/minimized/maximized/etc most of the objects "disappears" (screenshot "after.png"). It is extremely hard to identify what exactly produces such issues. Neither Jide or JPCT logs any errors. Since not all objects "disappear" but most of them it looks like JPCT issue. So the question is - is it a JPCT issue? Can you point me to correct direction if the issue is related to JPCT?

Some code related to JPCT init:

--- Code: ---...
protected void setupFrameBuffer(Dimension size) {
    Dimension framebufferSize = size == null ? Toolkit.getDefaultToolkit().getScreenSize() : size;

    _buffer = new FrameBuffer(framebufferSize.width, framebufferSize.height, FrameBuffer.SAMPLINGMODE_NORMAL);

    _frameBufferBGColor = DEFAULT_FRAMEBUFFER_BG_COLOR;

    _buffer.disableRenderer(IRenderer.RENDERER_SOFTWARE);
    _buffer.enableRenderer(IRenderer.RENDERER_OPENGL);
    _canvas = _buffer.enableGLCanvasRenderer();
   
    _textureHandler.setFrameBuffer(_buffer);
    _textureHandler.setCanvas(_canvas);
   
    getNotifier().rendererInitialized(_canvas);
  }

  ...
  public void updateFrameBuffer() {
    _performanceStatistics.incrementFPS();
    _performanceStatistics.startMethod();

    _buffer.clear(_frameBufferBGColor);

    world.renderScene(_buffer);
    world.draw(_buffer);
    _textureHandler.blit();

    _buffer.update();

    _videoHandler.encodeFrame(_currentDate);

    _buffer.displayGLOnly();

    _canvas.repaint();
   
    _performanceStatistics.endDrawMethod();
  }

--- End code ---

EgonOlsen:
jPCT actually doesn't really care to where it outputs the rendering, at least not in a way that it should matter in this case. Are you calling FrameBuffer.resize() when the size of the output window changes?

kavyro:
Yep, I perfectly know that. But the issue in my case is so strange...
Now I call buffer resize() when output windows size changes, but it makes no difference - the issue is still there

EgonOlsen:
Is there any other log output from jPCT when the resize happens?

kavyro:
Nope, JPCT logs nothing when resize. At all.

Navigation

[0] Message Index

[#] Next page

Go to full version