Skip to content

Conversation

@JackieAnxis
Copy link

For the graph example, when visualizing a graph with more than MAX_TEXTURE_SIZE (it may be 2^14 or 2^15), webGL will report that: WebGL: INVALID_VALUE: texImage2D: width or height out of range.
Now, the data is bound to texture with one row (newData.width = data.length; newData.height = 1), when the length of data exceeds the MAX_TEXTURE_SIZE, it will not be visualized.
I fold the data into several rows in the texture (newData.width = data.length > MAX_TEXTURE_SIZE ? MAX_TEXTURE_SIZE : data.length; newData.height = Math.ceil(data.length / MAX_TEXTURE_SIZE)), so that its length will not exceed the MAX_TEXTURE_SIZE.

@JackieAnxis
Copy link
Author

JackieAnxis commented Oct 22, 2021

For the graph example, when visualizing a graph with more than MAX_TEXTURE_SIZE (it may be 2^14 or 2^15), webGL will report that: WebGL: INVALID_VALUE: texImage2D: width or height out of range. Now, the data is bound to texture with one row (newData.width = data.length; newData.height = 1), when the length of data exceeds the MAX_TEXTURE_SIZE, it will not be visualized. I fold the data into several rows in the texture (newData.width = data.length > MAX_TEXTURE_SIZE ? MAX_TEXTURE_SIZE : data.length; newData.height = Math.ceil(data.length / MAX_TEXTURE_SIZE)), so that its length will not exceed the MAX_TEXTURE_SIZE.

This PR will fix #8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants