Skip to content

DataView displayed as [object DataView] instead of showing how many bytes were uploaded (bufferData, bufferSubData) #263

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
lazarljubenovic opened this issue Jun 4, 2023 · 2 comments

Comments

@lazarljubenovic
Copy link

My code is using the following bufferSubData signature.

bufferSubData(target: GLenum, dstByteOffset: GLintptr, srcData: ArrayBufferView, srcOffset: GLuint, length?: GLuint): void;

Notice that it doesn't support passing in an ArrayBuffer, but only DataView or any of the concrete TypedArray classes. I am using a DataView.

This is what I see in Spector.

image

The issue [object DataView]. It looks like an unhandled case which falls back to using a string for the report.

If you use a concrete TypeArray such as Float32Array, it tells me how much bytes were uploaded.

image

Similar thing happens to bufferData when you use a DataView instead of an ArrayBuffer or a concrete TypedArray.

image

(The STENCIL_BUFFER_BIT is another weird thing visible on the screenshot, but I filed that as a separate issue as #262.)

@sebavan
Copy link
Member

sebavan commented Jun 8, 2023

Thanks for the report I ll address it over the weekend.

@sebavan
Copy link
Member

sebavan commented Jun 8, 2023

Do you have a simple repro I can use to test ?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants