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.


Messages - kiffa

Pages: [1] 2 3 ... 14
1
Bones / Re: Hardware skinning needed
« on: June 23, 2014, 05:18:12 am »
Cool~ Would you like to share it when you done? This will give  others(include me  ;) ) a lot of help.

2
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:
   Quaternion
 

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


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

5
News / Re: Version 1.28 has been released!
« on: March 06, 2014, 03:08:39 am »
Cheer! ;D

6
Support / Got black texture when using mulit textures
« on: February 13, 2014, 01:14:55 pm »
code:
Code: [Select]
//first use 1 texture
car.setTexture("car_1");

//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);
car.setTexture(info);


7
I have the same issue in my game. You can use the android's tools which called "Allocation Tracker" to see the detail of memory allocations.

Providing a method with some params of  buffer which are provided and managed by user could be a choice. But I hope there could be an internal improvement without damaging the current clean & simple api-designs.


8
Support / Re: glError 1280 on Android 4.2
« on: December 14, 2013, 06:00:09 am »
Setting "Config.internalMipmapCreation = true" resolve it, thanks.

I want to always set this option to true in order to support most devices, but I don't know if there is any disadvantages than GPUMipmapCreation(such as loading time、memory usage\peak、performance and so on).

9
Could you tell me why choose this coordinates system instead of a GL-like system?

10
Support / Re: Sometimes my game suddenly gets a heavy fps dropping.
« on: December 12, 2013, 10:07:38 am »
This may be the reason, I will check it, thanks!

11
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 "jpct_shaders.zip", 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(Logger.java:193)
12-12 14:40:07.416: W/System.err(10293): at com.threed.jpct.GL20.checkError(GL20.java:147)
12-12 14:40:07.416: W/System.err(10293): at com.threed.jpct.GL20.glGenBuffers(GL20.java:1354)
12-12 14:40:07.416: W/System.err(10293): at com.threed.jpct.CompiledInstanceFP.compileToVBO(CompiledInstanceFP.java:1199)
12-12 14:40:07.417: W/System.err(10293): at com.threed.jpct.CompiledInstanceFP.render(CompiledInstanceFP.java:74)
12-12 14:40:07.417: W/System.err(10293): at com.threed.jpct.GLRenderer.drawVertexArray(GLRenderer.java:2211)
12-12 14:40:07.417: W/System.err(10293): at com.threed.jpct.World.draw(World.java:1351)
12-12 14:40:07.417: W/System.err(10293): at com.threed.jpct.World.draw(World.java:1091)
12-12 14:40:07.417: W/System.err(10293): at com.zwenyu.woo3d.components.GameRenderer.renderWorld(GameRenderer.java:596)
12-12 14:40:07.417: W/System.err(10293): at com.zwenyu.woo3d.components.GameRenderer.handleGameRender(GameRenderer.java:516)
12-12 14:40:07.417: W/System.err(10293): at com.zwenyu.woo3d.components.GameRenderer.onDrawFrame(GameRenderer.java:171)
12-12 14:40:07.418: W/System.err(10293): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1516)
12-12 14:40:07.418: W/System.err(10293): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)



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

13
Support / Re: How to use renderTarget?
« on: December 06, 2013, 04:29:10 am »
Thanks, i have tried this before, but the result is not what i expect, which seems i got an incomplete renderTargetTexture. There is another question:

Assume the size of display is 2X2, and can be spilt to 4 parts:
12
34

If i use a 1X1 (npot)texture as the renderTarget, which one is the correct result:
a, 1

b, 3

c, 4

d, a scaled
12
34

Could i render the full scene into a smaller texture? The following code seems useless:
Code: [Select]
Texture t = new NPOTTexture(w, h);
frameBuffer.resize(w, h);
renderToTarget();
frameBuffer.resize(oldW, oldH);
framBuffer.blit(t);

14
Support / Re: How to use renderTarget?
« on: December 05, 2013, 01:49:53 pm »
> You'll also notice that the blitted result is upside-down. You can fix that by using a negative height (and maybe setting the y start to screenHeight/4...i can't remember if that's needed ATM).

After some try, i am not very clear how to do(to fix the upside-down). Could you give me some sample code?



15
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);
    mTexture.setMipmap(false);
    TextureManager.getInstance().addTexture("rt", mTexture);
  }
 
  private void update(World world, FrameBuffer frameBuffer){
    int screenWidth = 800;
    int screenHeight = 480;
   
    //first rendering
    world.renderScene(frameBuffer);
    world.draw(frameBuffer);
   
    //second rendering
    frameBuffer.setRenderTarget(mTexture);
    world.renderScene(frameBuffer);
    world.draw(frameBuffer);
    frameBuffer.blit(mTexture, 0, 0, 0, 0, screenWidth/4, screenHeight/4, false);
    frameBuffer.removeRenderTarget();
   
  }

Pages: [1] 2 3 ... 14