jogamp
›
jogl
Login
Register
Search
everywhere
only in this topic
Advanced Search
glBufferData usage
Classic
List
Threaded
♦
♦
Locked
4 messages
Options
Loading...
Subscribe via email
Move topic
Pin topic
Unpin topic
Lock topic
Unlock topic
Delete this topic
Delete this topic
Change title and meta tags
Embed post
Permalink
Joost Oudejans
Reply
|
Threaded
Open this post in threaded view
♦
♦
|
More
Loading...
Edit post
Move post
Delete this post
Delete this post and replies
Change post date
Print post
Permalink
Raw mail
Jan 11, 2013; 1:55pm
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
♦
♦
|
More
Loading...
Reply to author
Edit post
Move post
Delete this post
Delete this post and replies
Change post date
Print post
Permalink
Raw mail
Jan 11, 2013; 7:43pm
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
♦
♦
|
More
Loading...
Edit post
Move post
Delete this post
Delete this post and replies
Change post date
Print post
Permalink
Raw mail
Jan 12, 2013; 11:36am
Re: glBufferData usage
Thank you, this will really help me.
gouessej
Reply
|
Threaded
Open this post in threaded view
♦
♦
|
More
Loading...
Reply to author
Edit post
Move post
Delete this post
Delete this post and replies
Change post date
Print post
Permalink
Raw mail
Jan 12, 2013; 2:16pm
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