jogamp
›
jogl
Search
everywhere
only in this topic
Advanced Search
glBufferData usage
Classic
List
Threaded
♦
♦
Locked
4 messages
Joost Oudejans
Reply
|
Threaded
Open this post in threaded view
♦
♦
|
glBufferData usage
I would like to use the method glBufferData(int target, long size, Buffer data, int usage) of GL, but I do not know how to calculate the size required.
I think the size can be calculated with the GLBuffers class. Could someone help me?
gouessej
Reply
|
Threaded
Open this post in threaded view
♦
♦
|
Re: glBufferData usage
Administrator
Hi
Rather use the class com.jogamp.common.nio.Buffers. Generally, I just do:
size = data.limit() * Buffers.SIZEOF_FLOAT; //for FloatBuffer instances
Julien Gouesse |
Personal blog
|
Website
Joost Oudejans
Reply
|
Threaded
Open this post in threaded view
♦
♦
|
Re: glBufferData usage
Thank you, this will really help me.
gouessej
Reply
|
Threaded
Open this post in threaded view
♦
♦
|
Re: glBufferData usage
Administrator
You're welcome. I advise you to look at the documentation of the original C method when you have a doubt:
http://www.opengl.org/sdk/docs/man/xhtml/glBufferData.xml
Julien Gouesse |
Personal blog
|
Website
Free forum by Nabble
Edit this page