Login  Register

Re: Buffers.newDirectIntBuffer(int[]) does not set limit

Posted by jmaasing on Jul 24, 2015; 6:35pm
URL: https://forum.jogamp.org/Buffers-newDirectIntBuffer-int-does-not-set-limit-tp4034959p4034964.html

Xerxes Rånby wrote
It would be good to understand the root cause why the crash can happen when lim do not match capacity.
The only reason i can think of that generates a crash is that the JVM garbage collector has decide to reclaim the memory that have been passed to the GPU.
Actually I think it is my code. I used the buffer limit to calculate the amount of data when uploading data to the driver. Since limit was 0 who knows what crap the driver found when it tried to render the data :-)