Yes sorry I forgot. Previously in onDrawFrame was happening all image analysis but I changed it and there is small chance that the analysis will be shorter than drawing.
Thank you.
Thank you.
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 @Override
public void onDrawFrame(GL10 gl) {
while (!CameraModel.getInstance().mBackgroundLoaded) {
Thread.yield();
}
fb.clear(back);
CameraModel model = CameraModel.getInstance();
mBackgroundTex.overrideTexelData(model.getBackground());
fb.blit(mBackgroundTex, 0, 0, 0, 0, (int) model.mPow2width,
(int) model.mPow2Height, model.mCamWidth, model.mCamHeight, -1,
false);
world.renderScene(fb); //app crashes on this line
world.draw(fb);
fb.display();
if (mSaveScene) {
int[] array = fb.getPixels();
IntBuffer dst = IntBuffer.wrap(array);
dst.rewind();
Bitmap bmp = Bitmap.createBitmap(fb.getWidth(), fb.getHeight(),
Bitmap.Config.ARGB_8888);
bmp.copyPixelsFromBuffer(dst);
saveScene(bmp);
mSaveScene = false;
}
}
public void addObject(Object3D obj) {
world.addObject(obj);
}
public void removeObject(Object3D obj) {
world.removeObject(obj);
}
Page created in 0.054 seconds with 12 queries.