[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] Bufferdata behavior




Hi,

the described behavior was in Firefox 14, I tested the same code on Firefox 15 and it's as you said and as I would expect: Same behavior for null and undefined (INVALID_VALUE)

Using Chrome 21.0.1180.83, I don't get INVALID_VALUE with undefined.

  Kristian


On 8/29/12 5:27 PM, Kristian Sons wrote:
just found following inconsistent behavior in my (buggy) code :)

bufferData(GLenum target, ArrayBufferView data, GLenum usage)

If data is null Firefox and Chrome on Windows have the specified
behavior: INVALID_VALUE.
If data is undefined, it seems that Firefox creates a zero sized buffer,
while Chrome seems to just ignore that call.

Just to check, which version of Firefox were you testing? Firefox 15 switched the WebGLRenderingContext to WebIDL, so if you're testing an earlier version the behavior may be different from Firefox 15 and later.


In any case, per spec as it currently stands (and in Firefox 15 and later, based on code inspection), null and undefined should do the same thing. In particular, if you pass either one, you will call this overload:

  void bufferData(GLenum target, ArrayBuffer? data, GLenum usage);

and null will be passed for the data to the underlying implementation.

-Boris

-----------------------------------------------------------
You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email:
unsubscribe public_webgl
-----------------------------------------------------------



--
________________________________________________________

Kristian Sons
Deutsches Forschungszentrum für Künstliche Intelligenz GmbH, DFKI
Agenten und Simulierte Realität
Campus, Geb. D 3 2, Raum 0.77
66123 Saarbrücken, Germany

Phone: +49 681 85775-3833
Phone: +49 681 302-3833
Fax:   +49 681 85775–2235
kristian.sons@dfki.de
http://www.xml3d.org

Geschäftsführung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster (Vorsitzender)
Dr. Walter Olthoff

Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes
Amtsgericht Kaiserslautern, HRB 2313
________________________________________________________


----------------------------------------------------------- You are currently subscribed to public_webgl@khronos.org. To unsubscribe, send an email to majordomo@khronos.org with the following command in the body of your email: unsubscribe public_webgl -----------------------------------------------------------