Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Should pass argument for border in WebGL texImage2D #50

Open
SasasoftHUN opened this issue Oct 28, 2019 · 0 comments
Open

Should pass argument for border in WebGL texImage2D #50

SasasoftHUN opened this issue Oct 28, 2019 · 0 comments

Comments

@SasasoftHUN
Copy link

According to the WebGL Specification the method texImage2D has an overload with 6 arguments and one with 9 arguments. TexImage2DAsync batches the command with only 8 arguments. The border argument is not passed (it always has to be 0...)

Possible fix in WebGLContext.cs:

public async Task TexImage2DAsync<T>(Texture2DType target, int level, PixelFormat internalFormat, int width, int height, PixelFormat format, PixelType type, T[] pixels)
where T : struct
=> await this.BatchCallAsync(TEX_IMAGE_2D, isMethodCall: true, target, level, internalFormat, width, height, 0, format, type, pixels);

Stack trace:
Chrome

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

No branches or pull requests

1 participant