Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - kiffa

Pages: [1] 2 3 ... 6
Support / Could you add some useful math functions?
« on: March 19, 2014, 07:05:19 am »
1, To optimize the comparing of the length of vector:
    SimpleVector.length()^2; SimpleVector.distance()^2

2, For animation、camera moving 、physic simulation and so on:
   Interpolation - linear、sin、pow、slerp and so on.

3, For animation、rotation Interpolation:

Support / Should I use etc1 or Texture.defaultTo4bpp(true)
« on: March 06, 2014, 12:30:45 pm »
My purpose is for reduce memory usage\texture bandwith.

Which one is better?(for performance\memory usage\generation time\visual quality\compatibility and so on). - Assume the texture doesn't have alpha.

The shaders exist in 2 locations, one is, the other is jPCT-AE.jar, I found some of them are not the same: defaultFragmentShaderTex1.src、defaultFragmentShader.src.

Support / Got black texture when using mulit textures
« on: February 13, 2014, 01:14:55 pm »
Code: [Select]
//first use 1 texture

//after a while, use 2 to blending
int id = TextureManager.getInstance().getTextureID("car_1");
int id2 = TextureManager.getInstance().getTextureID("car_2");
TextureInfo info = new TextureInfo(id);
info.add(id2, TextureInfo.MODE_MODULATE);

Support / glError 1280 on Android 4.2
« on: December 12, 2013, 08:05:12 am »
My game crashes on Android 4.2(test with only one device who has a heavily customized system based on Android 4.2), but runs well on other versions(2.3 - 4.4).

First, seems the engine can't find the default shader-files in jar, so I push all sharder-files into a zip named "", and put it in "assets" of project, then call
Code: [Select]
GLSLShader.setShaderLocator(new ShaderLocator(getAssets()));

When I run game again, the engine found shader-files, but crashed when gen VBO, logs:

Code: [Select]
12-12 14:40:07.394: W/dalvikvm(10293): threadid=15: thread exiting with uncaught exception (group=0x41578930)
12-12 14:40:07.416: W/System.err(10293): java.lang.RuntimeException: [ 1386830407375 ] - ERROR: before: glError 1280
12-12 14:40:07.416: W/System.err(10293): at com.threed.jpct.Logger.log(
12-12 14:40:07.416: W/System.err(10293): at com.threed.jpct.GL20.checkError(
12-12 14:40:07.416: W/System.err(10293): at com.threed.jpct.GL20.glGenBuffers(
12-12 14:40:07.416: W/System.err(10293): at com.threed.jpct.CompiledInstanceFP.compileToVBO(
12-12 14:40:07.417: W/System.err(10293): at com.threed.jpct.CompiledInstanceFP.render(
12-12 14:40:07.417: W/System.err(10293): at com.threed.jpct.GLRenderer.drawVertexArray(
12-12 14:40:07.417: W/System.err(10293): at com.threed.jpct.World.draw(
12-12 14:40:07.417: W/System.err(10293): at com.threed.jpct.World.draw(
12-12 14:40:07.417: W/System.err(10293): at com.zwenyu.woo3d.components.GameRenderer.renderWorld(
12-12 14:40:07.417: W/System.err(10293): at com.zwenyu.woo3d.components.GameRenderer.handleGameRender(
12-12 14:40:07.417: W/System.err(10293): at com.zwenyu.woo3d.components.GameRenderer.onDrawFrame(
12-12 14:40:07.418: W/System.err(10293): at android.opengl.GLSurfaceView$GLThread.guardedRun(
12-12 14:40:07.418: W/System.err(10293): at android.opengl.GLSurfaceView$

Support / Sometimes my game suddenly gets a heavy fps dropping.
« on: December 10, 2013, 04:14:38 am »
My game runs in 55+ fps normally, but sometimes could suddenly drop to 10- fps, and  resume to normal(55+fps) after several seconds(8 - 20s).

First I doubt other processes kill too many cpu load, but when the fps-dropping occur, I watched the total usage of cpu with android's tool(system information), seems the cpu load is normal(without a suddenly increase, and there is enough idle load).

Then I doubt the GC and incorrect Thread.Sleep() in game loop(there is a mechanism to limit the fps to save power). But I have not check this due to the hard reappearing.

All above is about cpu, my question is:

Is there any issue with gpu(code\driver) could result in this problem? Please give your options, I will check them, thanks.

Support / How to use renderTarget?
« on: December 05, 2013, 07:19:38 am »
My purpose is to render the scene 2 times with different camera per frame, the first rendering will render to full screen, the second rendering will render to a smaller(1/4w、1/4h of the screen). But my code seems useless(the result seems like which don't do the second rendering).

Code: [Select]

  private void init(){
    mTexture = new Texture(256, 128);
    TextureManager.getInstance().addTexture("rt", mTexture);
  private void update(World world, FrameBuffer frameBuffer){
    int screenWidth = 800;
    int screenHeight = 480;
    //first rendering
    //second rendering
    frameBuffer.blit(mTexture, 0, 0, 0, 0, screenWidth/4, screenHeight/4, false);

Support / The RuntimeException of "Tried to set an undefined texture!"
« on: December 03, 2013, 09:38:45 am »
Could you add some info of the incorrect texture name in the exception? Which like "Tried to set an undefined texture: textureName". This may help to debug, thanks!

Support / Does mobile GPU(s) support the Early-Z culling?
« on: November 30, 2013, 08:35:06 am »
And another question:

PowerVR SGX uses TBDR, so sorting objs front-to-back makes no sense on such device.

But for Tegra(IMR)、Adreno(TBR)、Mali(TBR), will "Config.stateOrientedSorting = false" gain better performace?

Support / Some questions about CollisionEvent
« on: November 07, 2013, 05:48:43 am »
Code: [Select]
CollisionEvent event;
int[] ids = event.getPolygonIDs();
Object3D[] objs = event.getTargets();

When objs.length > 1, how to judge which PolygonID(ids[j]) belongs to which Object3D(objs[j])? For example, to calc:

Code: [Select]
SimpleVector normal = objs[i].getPolygonManager().getTransformedNormal(ids[i]);

Support / Is there a method to scale obj by just one dimension?
« on: November 06, 2013, 06:34:35 am »
I found there is only a Object3D.scale(); Are there some methods like scaleX()\scaleY()\scaleZ()... etc?

Support / Does scale affect the Ray-detection?
« on: November 05, 2013, 04:32:51 am »
Code: [Select]
SimpleVector d = new SimpleVector(0, -1, 0);
float frontHeight = mRoad.calcMinDistance(front, d, 100 * 30);

Code: [Select]
SimpleVector d = new SimpleVector(0, -1, 0);
float frontHeight = mRoad.calcMinDistance(front, d, 100 * 30);

Are the 2 codes above equal or not?  What's the situation when invoking mRoad.enableLazyTransformations()?

Support / Does ARM® NEON™ make sense for jPCT-AE?
« on: October 24, 2013, 05:29:27 am »
NEON is ARM's Single Input Multiple Data (SIMD) architecture available on most Android ARM powered devices. It is a powerful engine for accelerating processing of media, augmented reality, gaming graphics and physics engines, DSP, etc.

And there is an  open source project of NEON targeting Android and Linux apps. Project Ne10 has been set up to provide a set of common, useful functions which have been heavily optimized for the ARM Architecture and provide consistent well tested behavior that can be easily incorporated into applications.

Maybe jPCT-AE can benefit form this.

ARM's introduce:

Project Ne10:

Support / Screwy Object3D.
« on: October 22, 2013, 02:46:26 pm »
In my racing game, the scene is correct first, but after a minute(driving on the road, arriving the position of about 3/4 length of the road), the scene become screwy(hard to describe the look, seems some objects mix together).

The model are exported as .objs and converted to .sers. All looks fine if importing the .objs into MAYA.

What may be the reason?

Support / How to upload an Object3D?
« on: October 17, 2013, 04:15:19 am »
I want to load models -> compile -> build -> strip -> upload-> virtualize one by one.

But I don't know how to upload an Object3D(as VBO). Is there a  method like TextureManager.prewarm for Object3D?

Pages: [1] 2 3 ... 6