Rotation calling Garbage Collector Too Often Android MatrixMultiply -


good day,

i writing open gl app on android. have 100 game objects execute fine when update position, velocity or acceleration. in game loop, want able call "yaw" (or pitch, or roll) method every iteration of update game object. problem causing the garbage collector go crazy gc_concurrent printout statements logcat.

in yaw method, have following calls...

realignvectors(); //no heap allocations in method wrote matrix.rotatem(rotationarray,0,angle,0,1,0); //rotationarray float[16] matrix.setidentitym(rotationalcomputearray,0); //another float[16] matrix.rotatem(rotationalcomputearray,0,angle,upvector.x, upvector.y, upvector.z); matrix.multiplymv(lookvector... matrix.multiplymv(rightvector.. 

i've commented out code call yaw method , have no calls garbage collector (gc), , 100 objects move through out world out noticable difference. when uncomment out yaw call, significant decrease in performance. objects move choppy , gc calls.

does know if matrix.multiplymv or matrix.rotatem reallocate memory in heap? seams thing guess? if so, know way prevent or fix situation in?

thanks help.


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -