Esempio n. 1
0
		public void Render(UiSceneBuffer buffer)
		{
			if (m_Disposed == true)
			{
				return;
			}
			
			SlimDX.Direct3D11.DeviceContext context = GameEnvironment.Device.ImmediateContext;

			context.InputAssembler.InputLayout = m_Layout;

			m_Pass_BoxesAndText.Apply(context);

			context.InputAssembler.PrimitiveTopology = PrimitiveTopology.TriangleList;
			context.InputAssembler.SetVertexBuffers(0, buffer.Triangles);
			context.InputAssembler.SetIndexBuffer(buffer.TriangleIndices, Format.R32_UInt, 0);
			context.DrawIndexed(buffer.TriangleIndicesCount, 0, 0);

			m_Pass_Lines.Apply(context);

			context.InputAssembler.PrimitiveTopology = PrimitiveTopology.LineList;
			context.InputAssembler.SetVertexBuffers(0, buffer.Lines);
			context.InputAssembler.SetIndexBuffer(buffer.LineIndices, Format.R32_UInt, 0);
			context.DrawIndexed(buffer.LineIndicesCount, 0, 0);			
		}
Esempio n. 2
0
		public UiScene()
		{
			if (Effect == null)
			{
				Effect = SharedEffects.Effects["UI"] as UiEffect;
			}

			Controls = new UiSceneControlCollection(this);

			m_StaticBuffer = new UiSceneBuffer();
			m_DynamicBuffer = new UiSceneBuffer();

		}