本文整理汇总了C#中Axiom.Core.SceneManager.GetRenderQueue方法的典型用法代码示例。如果您正苦于以下问题:C# SceneManager.GetRenderQueue方法的具体用法?C# SceneManager.GetRenderQueue怎么用?C# SceneManager.GetRenderQueue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Axiom.Core.SceneManager
的用法示例。
在下文中一共展示了SceneManager.GetRenderQueue方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Clipmap
public Clipmap(SceneManager scene)
{
_scene = scene;
_scene.QueueStarted += (sender, args) =>
{
if (args.RenderQueueId == _scene.GetRenderQueue().DefaultRenderGroup)
QueuePatches(_scene.GetRenderQueue());
args.SkipInvocation = false;
};
using (var testMap = (Bitmap)Image.FromFile(@"height.jpg"))
{
_testMapWidth = testMap.Width;
_testMapHeight = testMap.Height;
_testMap = new float[_testMapWidth * _testMapHeight];
var i = 0;
for (var y = 0; y < testMap.Height; y++)
for (var x = 0; x < testMap.Width; x++)
_testMap[i++] = testMap.GetPixel(x, y).R / 255.0f;
}
var tu = _shader.Sampler(() => _shader.Heightmap);
tu.DesiredFormat = PixelFormat.FLOAT32_RGB;
tu.SetTextureFiltering(FilterOptions.Point, FilterOptions.Point, FilterOptions.None);
tu.SetTextureAddressingMode(TextureAddressing.Wrap);
tu.BindingType = TextureBindingType.Vertex;
_shader.SetAuto(() => _shader.ModelViewProjectionMatrix, GpuProgramParameters.AutoConstantType.WorldViewProjMatrix);
//_shader.SetAuto(() => _shader.NormalMatrix, GpuProgramParameters.AutoConstantType.ACT_INVERSE_TRANSPOSE_WORLDVIEW_MATRIX);
_shader.SetAuto(() => _shader.ScaleFactor, GpuProgramParameters.AutoConstantType.Custom, 0);
_shader.SetAuto(() => _shader.FineBlockOrigin, GpuProgramParameters.AutoConstantType.Custom, 1);
Position = new IntFloatVector2(new IntFloat(-_testMapWidth / 4), new IntFloat(-_testMapHeight / 4));
Locations = new PatchLocations(H, M);
var scale = Scale;
var scaleInt = 1;
for (var i = 0; i < Levels; i++)
{
_levels[i] = new ClipmapLevel(scale, scaleInt, this);
var level = _levels[i];
tu.SetTextureName(level.Heightmap.Name);
var m = _shader.CloneMaterial("ClipmapLevel" + i);
_levels[i].Material = m;
scale *= 2.0f;
scaleInt *= 2;
}
UpdatePosition();
Reset();
_initialized = true;
}