b=533663; use js typed arrays in webgl; r=jmuizelaar,mrbkap,brendan

This commit is contained in:
Vladimir Vukicevic
2010-01-22 13:34:25 -08:00
parent 49e536a18b
commit c7eff490a3
11 changed files with 1646 additions and 1071 deletions

View File

@@ -81,17 +81,17 @@ WebGLContext::ValidateBuffers(PRUint32 count)
// is this a problem?
if (!vd.enabled)
continue;
continue;
if (vd.buf == nsnull) {
LogMessage("No VBO bound to index %d (or it's been deleted)!", i);
return PR_FALSE;
LogMessage("No VBO bound to index %d (or it's been deleted)!", i);
return PR_FALSE;
}
GLuint needed = vd.offset + (vd.stride ? vd.stride : vd.size) * count;
if (vd.buf->Count() < needed) {
LogMessage("VBO too small for bound attrib index %d: need at least %d elements, but have only %d", i, needed, vd.buf->Count());
return PR_FALSE;
if (vd.buf->ByteLength() < needed) {
LogMessage("VBO too small for bound attrib index %d: need at least %d bytes, but have only %d", i, needed, vd.buf->ByteLength());
return PR_FALSE;
}
}