Jump to content

View more

Image of the Day

Working on an auto spawn system. #gamedev #indiedev #screenshotsaturday https://t.co/Mm2kfekz7b
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Opengles 1.1 glBufferData Equivilant?

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
No replies to this topic

#1 Suto   Members   

102
Like
0Likes
Like

Posted 03 August 2014 - 11:51 PM

Hello.

 

I have a project that needs to run on opengles 1.1. I am talking 5 year old hardware.

 

I currently store the vertex information like this:

floatbuffer vb = ByteBuffer.allocateDirect(tCoords.length * size).order(ByteOrder.nativeOrder()).asFloatBuffer();
vb.put(tCoords).position(0);

 

and I draw it like this:

gl.glVertexPointer(3, GL10.GL_FLOAT, 0, vb);
gl.glDrawArrays(GL10.GL_TRIANGLES, 0, 6*bList.listCount);

 

 

In this case, am I sending the floatbuffer vb from cpu memory to gpu memory every frame?

 

Looking around the web, most tutorials seem to use glBufferData. I thing that glBufferData requires a higher version of opengles though.

 

Is there a way to send my floatbuffer to the GPU once and keep it there, if I am not doing it already? If it matters, I don't need to change the float data once it is sent, it is static, and there are a couple thousand verticies.






Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.