Main Menu
Menu

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.

Show posts Menu

Topics - Colli

#1
Support / creating FrameBuffer
September 22, 2012, 10:39:26 AM
Hi,

Sorry I am asking again for help ;D , but I am wondering if it is possible to create FrameBuffer not in the methods onSurfaceCreate, onSurfaceChanged, onSurfaceDestroyed. Now i am creating the framebuffer in the onSurfaceChanged, and it takes about 2 seconds to create and it causes lags when starting the scene, that is why i would like to create it before the actual rendering begins(so before that when the user starts the level). I tried to run it on the GL thread this way :

mGLView.queueEvent(new Runnable() {
public void run() {
renderer.createBuffer();
}
});


but i just get an error:
Quote09-22 08:34:17.470: E/AndroidRuntime(610): java.lang.RuntimeException: [ 1348302857466 ] - ERROR: java.lang.RuntimeException: [ 1348302857454 ] - ERROR: java.lang.RuntimeException: [ 1348302857418 ] - ERROR: java.lang.RuntimeException: [ 1348302857409 ] - ERROR: Failed to load and compile vertex shaders!




#2
Support / AA not working
September 12, 2012, 11:42:56 AM
Hi,

I am trying to enable AA in my game on Android. I am doing it this way:
mGLView.setEGLContextClientVersion(2);
mGLView.setEGLConfigChooser(new AAConfigChooser(mGLView) {
public EGLConfig chooseConfig(EGL10 egl, EGLDisplay display) {
int[] attributes = new int[] {EGL10.EGL_BLUE_SIZE,8,EGL10.EGL_RED_SIZE,8,EGL10.EGL_GREEN_SIZE,8, EGL10.EGL_DEPTH_SIZE, 16, EGL10.EGL_NONE };//EGL10.EGL_DEPTH_SIZE, 16,
EGLConfig[] configs = new EGLConfig[1];

int[] result = new int[1];
egl.eglChooseConfig(display, attributes, configs, 1, result);
return configs[0];
}
});


and in LogCat i found this:
Quote09-12 09:35:09.637: I/jPCT-AE(1267): No AA config found...defaulting to non-AA modes!
09-12 09:35:09.637: I/jPCT-AE(1267): No AA enabled!

As you can see i have enabled OpenGL 2.0, so i don't know what could be the problem.

Thanks for any help

#3
Support / PolygonID of an event TYPE_SOURCE
July 23, 2012, 08:46:57 AM
Hi,

My question is how can a I get the PolygonID of an event which type is TYPE_SOURCE . The object's(this object is the only one moving in my scene) collision mode which triggers this event is set to COLLISION_CHECK_SELF.  The other objects (which can't move) are set to COLLISION_CHECK_OTHERS. That is for me a problem because i need the polygonID of the moving object.

here is the collision setup in code :
                        Ball.setCollisionMode(Object3D.COLLISION_CHECK_SELF);
Wall.setCollisionMode(Object3D.COLLISION_CHECK_OTHERS);
Cube.setCollisionMode(Object3D.COLLISION_CHECK_OTHERS);

ballPolygonManager = Ball.getPolygonManager();
wallPolygonManager = Wall.getPolygonManager();
cubePolygonManager = Cube.getPolygonManager();

Wall.addCollisionListener(new CollisionListener() {
public void collision(CollisionEvent ce) {
polygonID = ce.getPolygonIDs();
polygonManager = wallPolygonManager;
}

public boolean requiresPolygonIDs() {
return true;
}
});

Cube.addCollisionListener(new CollisionListener() {
public void collision(CollisionEvent ce) {
polygonID = ce.getPolygonIDs();
polygonManager = cubePolygonManager;
}

public boolean requiresPolygonIDs() {
return true;
}
});

Thanks for any help
#4
Support / Ray-Polygon Collision problem
June 27, 2012, 06:21:16 PM
Hi,

I have a problem with collision detection of two objects. I use Ray-Polygon method, problem is that when a cube is coliding with a longish cuboid, the collision event come just when i hit the long side of the cuboid, when i try to hit the cuboid from the top, the collision event come when the cube is a little bit in the cuboid, so it is not so precise. How can i make to receive collision events when the objects just touches each other? I tried to change the collideOffset, but with no result.

here is the setup for the collison mode:
Cube.setCollisionMode(Object3D.COLLISION_CHECK_SELF );
Cuboid.setCollisionMode(Object3D.COLLISION_CHECK_OTHERS);


and this is how i call the checkForCollision method :
cube.checkForCollision(movingDirection, 1)

I am also not sure what does the "step" argument in checkForCollision function mean. should that be the actual speed of the cube?

and there is the collisonListener :
Cube.addCollisionListener(new CollisionListener() {
public void collision(CollisionEvent ce) {
Log.e("COLLISION"," ");
}
public boolean requiresPolygonIDs() {
return false;
}
});


PS: Sorry for my English