You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 11, 2021. It is now read-only.
This should be a non issue. The user example was trying to draw to a render texture using a CCDrawNode which is actually part of the Scene Graph and follows flow of the Scene Graph.
To actually draw to the RenderTarget that is created you will need to use the CCDrawingPrimitives which draws to the GraphicsDevice which the RenderTarget is attached to example following:
// create render texture containing draw node
CCRenderTexture rtm = new CCRenderTexture(new CCSize(200.0f, 200.0f), new CCSize(200.0f, 200.0f), CCSurfaceFormat.Color, CCDepthFormat.Depth24Stencil8);
rtm.Begin();
CCDrawingPrimitives.Begin();
CCDrawingPrimitives.DrawColor = new CCColor4B(255, 255, 255, 255);
CCDrawingPrimitives.DrawSolidCircle(new CCPoint(100.0f, 100.0f), 75.0f, 0, 20);
CCDrawingPrimitives.End();
rtm.End();
// create sprite from render texture
CCSprite circleSprite = new CCSprite(rtm.Texture);
circleSprite.Position = new CCPoint(200.0f, 200.0f);
AddChild(circleSprite);
We will wait to hear back from the user before closing this but to me this works as designed.
From the forums: http://forums.xamarin.com/discussion/31704/problem-creating-a-ccsprite-out-of-a-ccdrawnode#latest
The text was updated successfully, but these errors were encountered: