Buffer Out Of Bounds Errors in Android JNI with Filament #8869
-
|
I'm trying to move some code from the Android/Kotlin side of my app over to a JNI layer. Unfortunately, I'm running into issues with just setting the index and vertex buffers. I've created and configured the engine, view, scene, camera, renderer, etc., the exact same way I had them on the Kotlin side. And I'm also trying to create the buffers in the exact same way -- modified as per examples and sample code posted. This is the code I have for creating the buffers ('vertices' is a simple vector of four float3 elements). The error I get is that there's an out of bounds detected. Can anyone point me in the direction of what the issue with this could be? For reference, I'm using tagged release v.1.57.1. Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
This issue was fixed when converting the index and vertex arrays to class member variables versus function-scope variables. There must be some issue with the lifetime of these variables that was causing the error I was getting. |
Beta Was this translation helpful? Give feedback.
This issue was fixed when converting the index and vertex arrays to class member variables versus function-scope variables. There must be some issue with the lifetime of these variables that was causing the error I was getting.