Click or drag to resize

ViewManagerGetBackgroundRenderingImage Method

OpenGL 메모리 상에 렌더링된 화면을 이미지로 반환

Namespace:  VIZCore3D.NET.Manager
Assembly:  VIZCore3D.NET (in VIZCore3D.NET.dll) Version: 2.8.24.1104 (2.8.24.1104)
Syntax
C#
public Image GetBackgroundRenderingImage()

Return Value

Type: Image
렌더링된 이미지
Examples
C#
// VIZCore3D.NET Control
private VIZCore3D.NET.VIZCore3DControl vizcore3d;

private void Example()
{
    int width = 800;
    int height = 600;

    // 메모리 기반 렌더링 모드 시작
    vizcore3d.View.BeginBackgroundRenderingMode(width, height);

    // 화면에 가시화하지 않고, 메모리 상태에서 렌더링 및 화면 이미지 반환
    vizcore3d.View.MoveCamera(VIZCore3D.NET.Data.CameraDirection.ISO_PLUS);
    System.Drawing.Image img1 = vizcore3d.View.GetBackgroundRenderingImage();
    vizcore3d.View.MoveCamera(VIZCore3D.NET.Data.CameraDirection.ISO_MINUS);
    System.Drawing.Image img2 = vizcore3d.View.GetBackgroundRenderingImage();

    vizcore3d.View.MoveCamera(VIZCore3D.NET.Data.CameraDirection.X_PLUS);
    System.Drawing.Image img3 = vizcore3d.View.GetBackgroundRenderingImage();
    vizcore3d.View.MoveCamera(VIZCore3D.NET.Data.CameraDirection.X_MINUS);
    System.Drawing.Image img4 = vizcore3d.View.GetBackgroundRenderingImage();

    vizcore3d.View.MoveCamera(VIZCore3D.NET.Data.CameraDirection.Y_PLUS);
    System.Drawing.Image img5 = vizcore3d.View.GetBackgroundRenderingImage();
    vizcore3d.View.MoveCamera(VIZCore3D.NET.Data.CameraDirection.Y_MINUS);
    System.Drawing.Image img6 = vizcore3d.View.GetBackgroundRenderingImage();

    vizcore3d.View.MoveCamera(VIZCore3D.NET.Data.CameraDirection.Z_PLUS);
    System.Drawing.Image img7 = vizcore3d.View.GetBackgroundRenderingImage();
    vizcore3d.View.MoveCamera(VIZCore3D.NET.Data.CameraDirection.Z_MINUS);
    System.Drawing.Image img8 = vizcore3d.View.GetBackgroundRenderingImage();

    // 메모리 기반 렌더링 모드 종료
    vizcore3d.View.EndBackgroundRenderingMode();
}

private void Example2()
{
    int width = 800;
    int height = 600;

    // 메모리 기반 렌더링 모드 시작
    vizcore3d.View.BeginBackgroundRenderingMode(width, height);

    // 메모리 기반 렌더링 모드 현재 상태등록
    vizcore3d.BeginUpdate();
    vizcore3d.EndUpdate();

    // 메모리 상태에서 렌더링 및 화면 이미지 반환
    System.Drawing.Image img = vizcore3d.View.GetBackgroundRenderingImage();

    // 메모리 기반 렌더링 모드 종료
    vizcore3d.View.EndBackgroundRenderingMode();
}
See Also