예제 #1
0
파일: UiEffect.cs 프로젝트: RugCode/drg-pt
		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);			
		}
예제 #2
0
파일: UiScene.cs 프로젝트: RugCode/drg-pt
		public UiScene()
		{
			if (Effect == null)
			{
				Effect = SharedEffects.Effects["UI"] as UiEffect;
			}

			Controls = new UiSceneControlCollection(this);

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

		}