Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Behavior of CCRenderTexture after update

$
0
0

Hi there,

I am developing an app where the user can draw lines (drawings). The lines get then converted to sprites with CCRenderTexture. The problem is that after the update 1.5.0.0 the lines aren't converted anymore (or not visible).

I read the new render pipeline, especially the part about visiting in a render texture but I could not find out the problem in my code.

Following code worked fine before the update:

CCDrawNode line;
.
.
CCSize cSize = bounding.Size + FrameSize;
rtm = new CCRenderTexture(cSize, cSize);

rtm.BeginWithClear(new CCColor4B(217/255f, 217/255f, 217/255f, 1.0f));
line.AdditionalTransform = CCAffineTransform.Translate(CCAffineTransform.Identity, -bounding.Origin.X + FrameSize * 0.5f, -bounding.Origin.Y + FrameSize * 0.5f);
line.Visit();
rtm.End();
line.AdditionalTransform = CCAffineTransform.Identity;

rtm.Texture.IsAntialiased = true;

modelSprite = new CCSprite(rtm.Texture);
modelSprite.AnchorPoint = CCPoint.AnchorMiddle;
this.AddChild(modelSprite, 2)

I have attached a screenshot with before and after the update.

Anyone an idea what could be going wrong in my code?

Best regard


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>