Jump to content

generateTexture does not work in Stock Browsers?


Recommended Posts

I've been trying to reduce the amount of sprites I use in game for performance considerations by using generateTexture for sprites however when I try to run my game in the android stock browser (on a samsung galaxy S3) nothing appears after setting up sprites to use generatedTextures :/


Any ideas?


here's an example:

var sprite1 = new PIXI.Sprite();var sprite2 = new PIXI.Sprite();var sprite3 = new PIXI.Sprite();sprite1.setTexture('/textures/layer1.png');sprite2.setTexture('/textures/layer2.png');sprite.1.addChild(sprite2);var texture = sprite1.generateTexture();sprite3.setTexture(texture);container.addChild(sprite3);

Imagine the the container is a pixi.displayobjectcontainer attached to the stage.


Theoretically the stage should now show a single sprite with the combined texture of 1 & 2. But nothing shows.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...