1
Support / creating FrameBuffer
« on: September 22, 2012, 10:39:26 am »
Hi,
Sorry I am asking again for help , 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 :
but i just get an error:
Sorry I am asking again for help , 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 :
Code: [Select]
mGLView.queueEvent(new Runnable() {
public void run() {
renderer.createBuffer();
}
});
but i just get an error:
Quote
09-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!