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

[Public WebGL] readPixels overloads?

Thinking about readPixels some more, would it make sense to add an overload like this to the spec:

  void readPixels(GLint x, GLint y, GLsizei width, GLsizei height,
                  ArrayBufferView? pixels)

which assumes format=RGBA and type=UNSIGNED_BYTE? If one really wanted, one could even make it take a Uint8Array; I think the current behavior of allowing passing in the wrong array types but "silently" not writing data to them is sorta hostile as APIs go.

This would not break existing code (or future code if more modes/formats ever get added), since the old overload would still be there, but would allow simpler code to be written in the meantime.


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