Reply – Re: Why does NIO buffer have to be direct?
Your Name
Subject
Message
or Cancel
In Reply To
Re: Why does NIO buffer have to be direct?
— by barno barno
the reason why I was asking is that I have most of the data I want to transfer to the GPU already located in an array on the heap. Just wrapping a buffer around it and saving memory (and perhaps copy time) sounded advantageous to me. I understand the performance advantage you get from using direct buffers under most circumstances, but still I would rather not be forced to use direct buffers every time. Perhaps you could change the behavior from throwing an exception to just warning the user?

btw. I love your responsiveness and, of course, the library :-)