private void CompositionTarget_Rendering(object sender, EventArgs e) { OnUpdate(); OnRender(); // Set the BackBuffer to Present the results backBufferView.SetToDevice(); // Draw a Quad usign the render as a texture editorEngine.Device.DrawQuad(renderRenderTarget.Texture); /* Invalidate our D3DImage */ InvalidateD3DImage(); }
void UpdateAndRender() { OnUpdate(); OnRender(); // Set the BackBuffer to Present the results backBufferView.SetToDevice(); // Draw a Quad usign the render as a texture editorEngine.Device.DrawQuad(renderRenderTarget.Texture); /* Invalidate our D3DImage */ InvalidateD3DImage(); }
/// <summary> /// This is the Render method /// </summary> private void OnRender() { // Set this renderView for rendering renderView.SetToDevice(); // Fill it whith a Red color renderRenderTarget.Clear(1, 0, 0, 1); // We need to update the camera each frame camera.UpdateProjection(renderView.RenderTarget.Width, renderView.RenderTarget.Height); // Draw the scene scene.Draw(camera); }
/// <summary> /// This is the Render method /// </summary> private void OnRender() { // Set this renderView for rendering renderView.SetToDevice(); // Fill it whith a green color and Clear Depth with 1 and stencil 0 renderView.Clear(0, 1, 0, 1); // Draw the scene scene.Draw(camera); /* * AIOEngine.MathSpace.Vector3[] lines=mesh.Mesh.BoundingBox.ToRenderLines(); * * editorEngine.DrawLines(lines,new AIOEngine.MathSpace.Vector4(1,0,0,1),ref node.WorldMatrix,ref camera.View,ref camera.Projection); * * VerticesVector3Indices result=mesh.Mesh.BoundingSphere.ToRenderLines(15); * * editorEngine.DrawLines(result.Vertices,result.Indices, new AIOEngine.MathSpace.Vector4(1, 0, 0, 1), ref node.WorldMatrix, ref camera.View, ref camera.Projection); */ }