I just ran in a small issue with WebGL today, while doing a project on point set visualisation. I understand there is a index limit in drawElements, due to the indexes being 16-bit integers. According to this post, however, there isn't for drawArrays, which I confirmed by being able to send some 400k points to the GPU.
The thing is, once I tried with 400k, I wanted to explore the possibilities of WebGL, and I tried with a 3M vertices model. Bang! Nothing gets displayed, and the WebGL inspector shows no drawArrays call.
Are you aware of some kind of limit for direct drawArray calls?
I just ran in a small issue with WebGL today, while doing a project on point set visualisation. I understand there is a index limit in drawElements, due to the indexes being 16-bit integers. According to this post, however, there isn't for drawArrays, which I confirmed by being able to send some 400k points to the GPU.
The thing is, once I tried with 400k, I wanted to explore the possibilities of WebGL, and I tried with a 3M vertices model. Bang! Nothing gets displayed, and the WebGL inspector shows no drawArrays call.
Are you aware of some kind of limit for direct drawArray calls?
Share Improve this question edited May 23, 2017 at 12:23 CommunityBot 11 silver badge asked Jun 29, 2011 at 22:00 F.X.F.X. 7,3576 gold badges52 silver badges73 bronze badges 4-
I've been mucking through the Chromium source to try and see if I can find anything in there for you. The
drawArrays()
function callsgles2::DrawArrays()
... and I'm still trying to track that one down. – Nathan Osman Commented Jun 29, 2011 at 23:36 -
This file contains the code for
drawArrays()
and it in turn callshelper_->DrawArrays(...)
which in turn leads to theDrawArrays()
function in this file. Hmmm... – Nathan Osman Commented Jun 29, 2011 at 23:40 -
I'm guessing it somehow leads to this file and the
glDrawArrays()
function there. – Nathan Osman Commented Jun 29, 2011 at 23:41 - What I thought was, it could be a hardware limitation. But I couldn't find anything about it on the spec. And 3M vertices don't seem like it's a lot for current graphic cards... – F.X. Commented Jun 30, 2011 at 9:00
2 Answers
Reset to default 2It looks like the same question is already discussed/answered here: Is there a limit of vertices in WebGL?. In that thread, the post by brainjam says that he discovered that drawArrays was not limited to 65k.
It sounds like you've got an outdated driver. The definition of drawArrays():
void drawArrays(enum mode, int first, long count)
The count elements is a long integer, that would mean at least 2^32 Elements in 32-bit architectures and 2^64 on 64-bit archs.
Remember that, unlike what anyone could presume, both Chrome/Chromium and Firefox use Direct3D as the underlying technology for WebGL on windows.