本文整理汇总了C#中RenderTexture.dispose方法的典型用法代码示例。如果您正苦于以下问题:C# RenderTexture.dispose方法的具体用法?C# RenderTexture.dispose怎么用?C# RenderTexture.dispose使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RenderTexture
的用法示例。
在下文中一共展示了RenderTexture.dispose方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Game
//.........这里部分代码省略.........
};
#endregion
var memory_for_text = new RenderTexture(1024, 1024, true, 1);
// Error: Error #3691: Resource limit for this resource type exceeded.
//at flash.display3D::Context3D/createTexture()
var count = 0;
for (int iy = -1; iy <= 4; iy++)
{
for (int ix = -1; ix <= 4; ix++)
{
try
{
var rimg = new_tile();
rimg.scaleX = 0.1;
rimg.scaleY = 0.1;
rimg.y = iy * texsize * rimg.scaleX;
rimg.x = ix * texsize * rimg.scaleY;
content_rot.addChild(rimg);
count++;
}
catch
{
// skip it
}
}
}
memory_for_text.dispose();
// StarlingRenderTextureExperiment.ApplicationSprite+__in_Delegate__in_Method
//System.NullReferenceException: Object reference not set to an instance of an object.
// at jsc.Languages.ActionScript.ActionScriptCompiler.WriteMethodCallVerified(Prestatement p, ILInstruction i, MethodBase m) in x:\jsc.internal.svn\compiler\jsc\Languages\ActionScript\ActionScriptCompiler.WriteMethodCallVerified.cs:line 99
// at jsc.Script.CompilerBase.WriteMethodCall(Prestatement p, ILInstruction i, MethodBase m) in x:\jsc.internal.svn\compiler\jsc\Languages\CompilerBase.cs:line 1307
//script: error JSC1000: ActionScript : failure at starling.display.DisplayObject.add_enterFrame : Object reference not set to an instance of an object.
// do events from flash native actually work?
ApplicationSprite.__stage.enterFrame +=
delegate
{
content_rot.rotation += 0.0001 * xsw.ElapsedMilliseconds;
xsw.Restart();
};
var loc = new Sprite();
content_rot.addChild(xinfo);
loc.addChild(content_rot);
loc.x = 200;
loc.y = 200;
addChild(loc);
#region fps