Version updates!

Started by EgonOlsen, March 28, 2010, 09:47:50 PM

Previous topic - Next topic

EgonOlsen

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.

zammbi

Quotebecause 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?

EgonOlsen

Quote from: zammbi on June 08, 2012, 12:50:52 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.

Darkflame

#318
Just a quick thanks for the updates!
Some really cool stuff here.

Seems to have fixed a transparency issue I was having :)

K24A3

Any progress on implementing Shader Attributes? i.e. use of functions GLES20.glVertexAttribPointer and GLES20.glEnableVertexAttribArray

No rush, just wandering :)

EgonOlsen

Quote from: K24A3 on September 25, 2012, 03:19:56 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.

K24A3

#321
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

EgonOlsen

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?

K24A3

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.


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;
}

EgonOlsen

I see. I'll try to add it, when i find the time.

zammbi

Is it possible to add a setting to Virtualizer to only save to/load off sd card if the device is low on memory?

Thomas.

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...

EgonOlsen

Quote from: zammbi 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?
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.

EgonOlsen

#328
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.

EgonOlsen

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.