[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Public WebGL] ANGLE_instanced_arrays extension proposal
On Wed, Mar 7, 2012 at 1:04 AM, Kenneth Russell <firstname.lastname@example.org> wrote:
vertex data that's been uploaded. As I mentioned above I think this is
This implies that the WebGL implementation maintains a copy of all
impractical on mobile devices.
Well, two points:
- WebGL loose context forces us anyway to keep copies of buffers around in client memory, so it's moot to discuss weather it's impractical on mobile devices. It's not impractical, it's a necessity.
- If somebody wants draw instanced, he can emulate it with more buffer updates or more draw calls himself. However that's guaranteed to be markedly slower then munching up a bit more ram and letting native code drive it rather than JS.
The crux of the story is that before an attributes divisor is set and a buffer has been assigned to that attribute, it's unknown which buffer is intended to be used in that fashion. However from an application programmers point of view, there is no overlap between divisor advancing attributes and non divisor advancing ones. You're simply never gonna use a buffer intended to supply say bone matrices for each instance, in some kind of non divisor based fashion. It seems to me to be a bit an oversight not to structure the API such that it can be optimized more easily (like say marking buffers with attributes for divisors, rather than attributes).