cocos2d / cocos2d-x-samples

Contains different cocos2d-x samples
MIT License
576 stars 242 forks source link

issue #4692: add condition to update the VBO buffer. #14

Closed boyu0 closed 10 years ago

boyu0 commented 10 years ago
  1. add condition to update the VBO buffer.
  2. fix android app name.
ricardoquesada commented 10 years ago

Hi boyu0, What bug did you find with the VBO code?

It looks fine to me. Was it crashing for you? What are the steps to reproduce it? In your code you are checking whether VAOs are enabled, but my code is not using VAO at all.

thanks.

boyu0 commented 10 years ago

@ricardoquesada You said that EyeCandy crashed at your Nexus 7, I discussed with @LinWenhai, he think you phone doesn't support glUnmapBuffer, and I checked codes in our engine, we use glMapBuffer and glUnmapBuffer only when devices support VAO, so I think maybe glUnmapBuffer only be supported in opengl es3.0, or maybe has some problem in es2.0, so I moved this 2 api under the VAO support condition checking.

ricardoquesada commented 10 years ago

@boyu0 Interesting theory. Thanks. I'll try it today.

ricardoquesada commented 10 years ago

thanks. it works as expected with your patch.