Author Topic: Version updates!  (Read 78536 times)

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11771
    • View Profile
    • http://www.jpct.net
Re: Version updates!
« Reply #315 on: June 08, 2012, 12:09:36 am »
Yes. But i forgot to add it to the log, because at the time i implemented it, i wasn't sure if i would keep it.

Offline zammbi

  • float
  • ****
  • Posts: 360
    • View Profile
Re: Version updates!
« Reply #316 on: June 08, 2012, 12:50:52 am »
Quote
because at the time i implemented it, i wasn't sure if i would keep it.
Why's that?
I noticed it also slows down resuming. Seems like it compresses the images again on resume? I thought it would do it once and only use the ETC1 compressed textures. Unless I'm mistaken?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11771
    • View Profile
    • http://www.jpct.net
Re: Version updates!
« Reply #317 on: June 08, 2012, 08:03:51 am »
I noticed it also slows down resuming. Seems like it compresses the images again on resume? I thought it would do it once and only use the ETC1 compressed textures. Unless I'm mistaken?
Yes, it compresses them on each upload. That has something to do with the way the ETC-utility class in Android works and me being lazy.

Offline Darkflame

  • int
  • **
  • Posts: 55
    • View Profile
Re: Version updates!
« Reply #318 on: July 02, 2012, 10:49:18 am »
Just a quick thanks for the updates!
Some really cool stuff here.

Seems to have fixed a transparency issue I was having :)
« Last Edit: July 02, 2012, 04:17:44 pm by Darkflame »

Offline K24A3

  • long
  • ***
  • Posts: 231
    • View Profile
Re: Version updates!
« Reply #319 on: September 25, 2012, 03:19:56 pm »
Any progress on implementing Shader Attributes? i.e. use of functions GLES20.glVertexAttribPointer and GLES20.glEnableVertexAttribArray

No rush, just wandering :)

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11771
    • View Profile
    • http://www.jpct.net
Re: Version updates!
« Reply #320 on: September 25, 2012, 08:48:48 pm »
Any progress on implementing Shader Attributes? i.e. use of functions GLES20.glVertexAttribPointer and GLES20.glEnableVertexAttribArray
Progress implies that i wanted to add this...did i? I can't remember ATM. I'll add it, if somebody needs it. So far, nobody did.

Offline K24A3

  • long
  • ***
  • Posts: 231
    • View Profile
Re: Version updates!
« Reply #321 on: September 26, 2012, 01:32:26 am »
The GLSL Docs mention 'Note: Because jPCT-AE doesn't support vertex attributes for external usage ATM, there are no setters for these. If you need additional data of that kind, consider baking it into a texture instead'

If it's not a hassle Attribute support would be great. I would like to use a shader that uses a large array in java code, unless there is a way to add a float[1000] into the shader program itself?

Here is the shader I would like to use:
http://opengles-book-samples.googlecode.com/svn-history/r49/trunk/Android/Ch13_ParticleSystem/src/com/openglesbook/particlesystem/ParticleSystemRenderer.java
« Last Edit: September 26, 2012, 09:43:35 am by K24A3 »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11771
    • View Profile
    • http://www.jpct.net
Re: Version updates!
« Reply #322 on: September 26, 2012, 02:45:31 pm »
I haven't looked at the shader, but...do you just need an array of floats that you access in the shader somehow or do you need them per vertex as attributes?

Offline K24A3

  • long
  • ***
  • Posts: 231
    • View Profile
Re: Version updates!
« Reply #323 on: September 26, 2012, 03:15:43 pm »
Below is the vertex shader, the three attributes are 1000 in length stored in an array of floats uploaded to the shader as an array with pointers pointing to each of the three attributes... at least that's what I understand. If you open the java link it has the shader program and array code near the top.

Code: [Select]
uniform float u_time;
uniform vec3 u_centerPosition;

attribute float a_lifetime;                         
attribute vec3 a_startPosition;                     
attribute vec3 a_endPosition;                       

varying float v_lifetime; 


                         
void main()                                         
{                                                   
  if ( u_time <= a_lifetime )
  {
    gl_Position.xyz = a_startPosition + (u_time * a_endPosition);
                           
    gl_Position.xyz += u_centerPosition;             
    gl_Position.w = 1.0;                             
  }                                                 
  else                                               
    gl_Position = vec4( -1000, -1000, 0, 0 );       
v_lifetime = 1.0 - ( u_time / a_lifetime );       
v_lifetime = clamp ( v_lifetime, 0.0, 1.0 );       
gl_PointSize = ( v_lifetime * v_lifetime ) * 40.0;
}

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11771
    • View Profile
    • http://www.jpct.net
Re: Version updates!
« Reply #324 on: September 26, 2012, 10:21:22 pm »
I see. I'll try to add it, when i find the time.

Offline zammbi

  • float
  • ****
  • Posts: 360
    • View Profile
Re: Version updates!
« Reply #325 on: October 07, 2012, 11:09:05 pm »
Is it possible to add a setting to Virtualizer to only save to/load off sd card if the device is low on memory?

Offline Thomas.

  • double
  • *****
  • Posts: 833
    • View Profile
Re: Version updates!
« Reply #326 on: October 07, 2012, 11:20:41 pm »
I can share my class for loading textures if you want... it does not need any extra time, you can load/reload textures in specific quality and you can use it for load all textures if is changed context...

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11771
    • View Profile
    • http://www.jpct.net
Re: Version updates!
« Reply #327 on: October 07, 2012, 11:22:29 pm »
Is it possible to add a setting to Virtualizer to only save to/load off sd card if the device is low on memory?
Sounds pretty shaky to me...you can't be sure that this operation is able to complete if you are low on memory anyway. I would rather detect the available memory and adjust usage of the Virtualizer in your own app. Because you know, what you are doing...the Virtualizer doesn't.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11771
    • View Profile
    • http://www.jpct.net
Re: Version updates!
« Reply #328 on: December 18, 2012, 02:42:36 pm »
Version 1.26 has been released!

Change log:
Quote
Reduced memory usage.
Fixed a rare sorting issue with sorting transparent objects in combination with objects with user shaders.
Fixed a flaw with fogging when making multiple calls to draw() without calling renderScene() in between.
Added support for loading normals from OBJ files.
Improved performance when using multiple render targets.
Added support for nPot-textures by introducing a new class, NPOTTexture.
Added clearColorBufferOnly() to FrameBuffer.
Added a new class DepthBuffer to allow for sharing of depth buffers between render targets.
Added support for a projectionMatrix uniform to shaders.
Fixed Object3D constructor for arrays.
Added visibility setter and getter to Polyline.
Changed behaviour when setting the near plane. You don't have to manually adjust the fov anymore.
Changed TextureManager.preWarm() to make it ignore textures without any texels.
Fixed trilinear filtering on compressed textures.
Fixed stripping of objects with dynamic uv coordinates.
Fixed a problem in the obj-loader with loading empty material definitions.
Fixed a crash in the PolygonManager when adding a texture with no texture stages left.
Fixed name parsing from OBJ files.
SkyBox doesn't crash on missing textures anymore.
Added a method to get the projection matrix to Camera.
Fixed a bug in the DeSerializer that assigned a dummy texture where it shouldn't assign anything.
Fixed an issue with texture stages not handled correctly in ES 2.0 mode in some cases.
GLSLShader can handle updates to implicit uniforms (the ones that jPCT-AE injects by itself if present) in the IRenderHook implementation.
Fixed a problem where texture stages weren't initialized correctly in some cases when cloning a multi-textured object.
Fixed a flaw with ellipsoid collision detection on scaled objects.

Additional information can be found here: http://www.jpct.net/forum2/index.php/topic,3114.0.html

In addition to the changes mentioned above, the examples in this version should run fine again on later version of the Android SDK. And there's an experimental switch in Config (Config.cacheCompressedTextures) to cache compressed textures on your sd.
« Last Edit: December 18, 2012, 02:45:51 pm by EgonOlsen »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11771
    • View Profile
    • http://www.jpct.net
Re: Version updates!
« Reply #329 on: April 09, 2013, 09:53:48 pm »
Some testers needed!

If somebody finds the time, please try this version: http://jpct.de/download/beta/jpct_ae.jar

Looking at the renderer's code, i found a section that looked like a relic from the desktop version to me that caused nothing but unneeded state changes. In the version posted above, i've simply removed all that code. It seems to work fine for me, but i'm not 100% sure if this code was really pointless in all situations, so i would like to get some feedback from others. Thank you for your time.