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

maskSprite emits GL ERROR when applied #7

Closed
rkdrnf opened this issue Nov 25, 2018 · 5 comments
Closed

maskSprite emits GL ERROR when applied #7

rkdrnf opened this issue Nov 25, 2018 · 5 comments

Comments

@rkdrnf
Copy link

rkdrnf commented Nov 25, 2018

I'm trying to convert masking as batch operation using pixi-heaven.

But below code which is almost same as that of in README, emits error
[.WebGL-0x7f87e084c200]GL ERROR :GL_INVALID_OPERATION : glDrawElements: attempt to access out of range vertices in attribute 0

        this.heartGauge.maskSprite = this.mask;
        this.heartGauge.pluginName = 'spriteMasked';
        this.mask.renderable = false;

        this.container.addChild(
            this.heartGauge,
            this.frame,
            this.mask
        );

heartGauge is a PIXI.heaven.Sprite and mask is a PIXI.Sprite.

container is plain Pixi container

Plain PIXI mask works well with same mask texture.

My pixi version is v4.

Is there anything I'm missing?

@Dai696
Copy link

Dai696 commented Dec 1, 2018

@ivan I actually noticed this bug too...

I didn't wanna bother u with it at the time and since I was limited on time I couldn't spend too much time messing with it

spriteMasked gave me the same issue so I wasn't able to use it...

@ivanpopelyshev
Copy link
Collaborator

Yesm I broke it and spent three last days fixing it. I uploaded fix here: https://github.com/gameofbombs/pixi-heaven/tree/master/dist

gonna make npm release now.

Thank you, @rkdrnf for noticing that!

@Dai696
Copy link

Dai696 commented Dec 1, 2018

Awesome Ivan!!!

I'll test it soon!

@ErikSom
Copy link

ErikSom commented Dec 1, 2018

Had the same issue. Is solved with great help from @ivanpopelyshev!

@rkdrnf
Copy link
Author

rkdrnf commented Jan 5, 2019

Thank you it now works!

@rkdrnf rkdrnf closed this as completed Jan 5, 2019
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

4 participants