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

RenderTexture.resize fails on WebGL #746

Closed
photonstorm opened this issue May 15, 2014 · 2 comments
Closed

RenderTexture.resize fails on WebGL #746

photonstorm opened this issue May 15, 2014 · 2 comments

Comments

@photonstorm
Copy link
Collaborator

Wow this one took me a good while to track down, but basically RenderTexture.resize is broken in WebGL.

The offending line is https://github.com/GoodBoyDigital/pixi.js/blob/master/src/pixi/textures/RenderTexture.js#L118

this.baseTexture._glTextures[gl.id] appears to be an empty object, and when that happens the bind fails and the texImage2D starts throwing console errors like they are going out of fashion.

This is easy to replicate. Just open Pixi example 11 and stick this on line 37:

renderTexture.resize(400, 300);

@photonstorm
Copy link
Collaborator Author

Sorry should have added, the error thrown is:

WebGL: INVALID_FRAMEBUFFER_OPERATION: clear: attachments do not have the same dimensions

But @GoodBoyDigital knew this anyway from our IM chat :)

photonstorm added a commit to photonstorm/pixi.js that referenced this issue May 15, 2014
…ses the textureBuffer to resize and has a new optional 'updateBase' parameter which will set the new dimensions on the baseTexture as well. Fixes pixijs#746.
@lock
Copy link

lock bot commented Feb 27, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Feb 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants