Author Topic: a question about "Using jPCT in Swing" in wiki  (Read 2161 times)

Offline wruiwr

  • byte
  • *
  • Posts: 6
    • View Profile
a question about "Using jPCT in Swing" in wiki
« on: September 19, 2014, 04:09:32 pm »
Hi,

I tried the example in "Using jPCT in Swing", and I have a question that after I dragged the edge of the window, the window became bigger, but the 3D world rendered did not change its size with the window. So, I wonder how to make the size of the rendered 3D world to change with the window, when dragging the edge of the window. Dose anyone know about some solution about this?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: a question about "Using jPCT in Swing" in wiki
« Reply #1 on: September 19, 2014, 05:24:22 pm »
There's a resize() method in FrameBuffer that should do the trick.

Offline wruiwr

  • byte
  • *
  • Posts: 6
    • View Profile
Re: a question about "Using jPCT in Swing" in wiki
« Reply #2 on: September 19, 2014, 07:38:09 pm »
Hi EgonOlsen!

Thank you for your reply!
But, where should I call resize(), and how to set the width and height according the change of the window? Besides, it's software rendering, so is it possible to use it?