Jump to content

How to crop a RenderTexture


starobrno
 Share

Recommended Posts

Either there are serious flaws or im really stupid, i tried so many ways to somehow crop a renderTexture, but none worked, there are a few past entries in this forum and in other places that complain that you cant crop a rendertexture, all of the suggestions dont work currently.

 

http://www.html5gamedevs.com/topic/8613-upgrading-to-pixi-160/#entry51302

(doesnt work)

 

http://www.html5gamedevs.com/topic/8114-sub-texture-of-a-rendertexture/

(doesnt work)

 

 

No matter if i build a Rendertexture with 

 

rendertexture = tempContainer.generateTexture();

 

or with 

 

rendertexture .render(tempContainer);

 

i can display the rendertexture itself fine if i place it inside a sprite and add it to the stage.

But theres not a single technique i found to generate a subtexture it and then add it to the stage.

 

i tried new PIXI.Texture(rendertexture, x, y), i tried PIXI.Texture(rendertexture.baseTexture, x, y), i tried .crop, i tried .frame.

 

I don't know where to go from here.

 

Could anyone try if they can get it to work?

All i could accomplish is stretching it.

 

Thanks so much in advance, this is a core feature for my app and i appreciate any help!

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.

Guest
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.

Loading...
 Share

  • Recently Browsing   0 members

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