Jump to content

View more

Image of the Day

Adding some finishing touches...
Follow us for more
#screenshotsaturday #indiedev... by #MakeGoodGames https://t.co/Otbwywbm3a
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

Are attributes shared between programs?

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 link102   Members   

252
Like
0Likes
Like

Posted 31 May 2013 - 09:36 AM

Hi GameDev,
 
I'm currently working on a game in OpenGL ES 2.0 (Android) and I've ran into a bit of an issue:
 
I have 2 meshes, both have their own shader object (code below). During initialization I upload the vertexdata (setPositionAttribute & setTextureAttribute). When it's time to draw though, I can only see the 2nd object. So I'm assuming the vertexdata from the 2nd object has replaced the vertexdata from the 1st.
 
Is this assumption (vertexdata is being shared by all program objects) correct?
Is there a way to separate the vertexdata or do I have to upload it each frame?
 
Edit: problem solved. I forgot to use VBOs. More info here


Edited by link102, 01 June 2013 - 06:29 PM.





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.