www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: guillaume on February 07, 2012, 11:22:56 am

Title: object edge blinking
Post by: guillaume on February 07, 2012, 11:22:56 am
I use two triangle to form a square, and use a serial of png picture  to do frame animation.
when animating, some animation make the object edge blinks. I dont know what's the cause .

Code: [Select]
float[] coord_menu  = {
    0.0f, 0.0f, 0.0f,
    0.0f,10.0f, 0.0f,
    10.0f,10.0f, 0.0f,
    10.0f, 0.0f, 0.0f,
    };
    float[] uvs = {
    0.0f, 0.0f,
    0.0f,1.0f,
    1.0f,1.0f,
    1.0f,0.0f,
    };
    int[] indices = {
    0,1,2,
    2,3,0,   
    };
   
    Object3D menu = new Object3D(coord_menu,uvs,indices,TextureManager.TEXTURE_NOTFOUND);


       I use menu.setTexture() to set a series of texture to make the menu animating, when disable
transparent, the menu's edge blinks, with transparent enable,  the blinking exist also.
Title: Re: object edge blinking
Post by: EgonOlsen on February 07, 2012, 12:18:45 pm
I'm not sure what blinking means here...do you have a screen shot or a video of this?
Title: Re: object edge blinking
Post by: guillaume on February 07, 2012, 01:00:38 pm
I'm not sure what blinking means here...do you have a screen shot or a video of this?

the object.JPG is  the object3D with texture.png applied. see the upper line in the edge of the object.
when I call object3D.setTexture with a series of texture, the edge of the object will blink like a cursor.
please see the texture, there was not any visible upper line.
thanks.
(the texture was a png with transparent background, I convert it for upload , so it's background turns to white.)

[attachment deleted by admin]
Title: Re: object edge blinking
Post by: EgonOlsen on February 07, 2012, 01:26:36 pm
Looks like tiling. Have you tried to call enableClamping() on that texture?
Title: Re: object edge blinking
Post by: guillaume on February 07, 2012, 01:42:23 pm
Looks like tiling. Have you tried to call enableClamping() on that texture?

thanks. I called enableClamping(), and now the texture looks ok. thank you.