Login  Register

Re: Another variant for glBufferData?

Posted by Sven Gothel on Aug 22, 2014; 1:10pm
URL: https://forum.jogamp.org/Another-variant-for-glBufferData-tp4032875p4032894.html

On 08/22/2014 01:37 PM, jmaasing [via jogamp] wrote:

>     Sven Gothel wrote
>     The manual page does not make it specific whether the client storage
>     must exist past function call:
>       https://www.opengl.org/sdk/docs/man/html/glBufferData.xhtml
>
>     Hence it would be legal w/ an array-backed client storage,
>     even though your mileage may vary on certain OpenGL drivers .. (bugs).
>
> Yes, this was confusing to me also in the beginning. I started out generating
> meshes into heap memory for processing but then it was unclear to me the best
> way to pass data into the GL-methods.
> Maybe there is some way to include in the javadoc a pointer to a "best
> practice" description, e.g. "You can use the helper classes in
> com.jogamp.common.nio.Buffers to create a suitable buffer" in those cases
> where it makes sense.
Agreed - do it!

~Sven



signature.asc (828 bytes) Download Attachment