Author Topic: Off screen rendering  (Read 4445 times)

Offline mxar

  • int
  • **
  • Posts: 73
    • View Profile
Re: Off screen rendering
« Reply #30 on: April 13, 2015, 12:30:44 am »
Hi,
sorry for the delay to answer.

I use the C++ method

 void glReadPixels(   GLint x,
    GLint y,
    GLsizei width,
    GLsizei height,
    GLenum format,
    GLenum type,
    GLvoid * data);

for better performance.

Best Regards


Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11776
    • View Profile
    • http://www.jpct.net
Re: Off screen rendering
« Reply #31 on: April 13, 2015, 07:47:11 am »
The Java version does some additional conversions. Looking at the code, it seems to me that there's some room for improvement. I'll try to speed up the java version even if you aren't using it anymore.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11776
    • View Profile
    • http://www.jpct.net
Re: Off screen rendering
« Reply #32 on: April 13, 2015, 09:09:24 pm »
I've updated the java version for faster getPixels(). I should have looked at this method earlier. It has been converted 1-to-1 from desktop jPCT, which isn't ideal in this case. Maybe you want to give it a try: http://jpct.de/download/beta/jpct_ae.jar

Offline mxar

  • int
  • **
  • Posts: 73
    • View Profile
Re: Off screen rendering
« Reply #33 on: April 13, 2015, 10:04:15 pm »

Ok thanks.

But the jpct_ae.jar supports the Object3D constructor with normals?

Object3D(float[] coordinates, float[] normals, float[] uvs, int[] indices, int textureId)


You had created a special version of jpct_ae.jar for me.

Thanks in advance.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11776
    • View Profile
    • http://www.jpct.net
Re: Off screen rendering
« Reply #34 on: April 13, 2015, 10:06:09 pm »
You had created a special version of jpct_ae.jar for me.
No, I haven't. Whatever I add will make it into the main branch. Or otherwise, I wouldn't add it at all. So: Yes, it still supports this.

Offline mxar

  • int
  • **
  • Posts: 73
    • View Profile
Re: Off screen rendering
« Reply #35 on: April 15, 2015, 09:32:42 am »
Ok,

I will try the updated version and I let you know about the results.

Many thanks :)

Offline mxar

  • int
  • **
  • Posts: 73
    • View Profile
Re: Off screen rendering
« Reply #36 on: April 18, 2015, 11:30:32 pm »

Hi ,

i just tested the FrameBuffer.getPixels() method of the  http://jpct.de/download/beta/jpct_ae.jar

It is much faster now.

The previews getPixels() for a screen 1794 x 1080 of Nexus 5 had around 1100 ms process time
and the new one has around 140 ms.

Is a great difference!!!

Many thanks :)