Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up performance in VBOWithVAO and supply performance test #3916

Merged
merged 1 commit into from
Apr 2, 2016

Conversation

Tom-Ski
Copy link
Member

@Tom-Ski Tom-Ski commented Mar 11, 2016

  • Adds attribute location caching
  • Removes unnecessary gl calls

Performance test shows this change results in a ~95% decrease in total time taken to render a mesh with the VBOWithVAO VertexDataType.

Related issues: #3593

if (!stillValid) {
Gdx.gl.glBindBuffer(GL20.GL_ARRAY_BUFFER, bufferHandle);
unbindAttributes(shader);
this.cachedLocations = new int[numAttributes];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better use IntArray?

@xoppa
Copy link
Member

xoppa commented Mar 11, 2016

Looks good. Did you had the chance to test it on all platforms? @code-disaster could you have a look at it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants