glDisableVertexAttribArray causes my OpenGLES 2.0 program to slow down dramatically over time

Hi!

So my attributearray drawing method looks like this:

I have a function that enables all my attributes (glEnableVertexAttribArray for each attributeLocation)
Then I use glBindBuffer to bind the VBO
After that I call glVertexAttribPointer(…)
And last but no least I use a method to disable all attributes with glDisableVertexAttribArray

When I don’t use the last step I have great performance and everything seems to work just fine.
But when I do (and everyone online and every book tells me to do so) my performance decreases dramatically over time.

It seems to be necessary… am I doing something wrong?

Not that you’ve described. Post some code for your draw setup and draw call (and mark it with the “</> - Preformatted text” button in the edit toolbar).

1 Like

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.