Jump to content
  • Advertisement
Sign in to follow this  

OpenGL Are attributes shared between programs?

This topic is 1939 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!