This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
UnigineEditor
界面概述
资产工作流程
设置和首选项
项目开发
调整节点参数
Setting Up Materials
Setting Up Properties
照明
Landscape Tool
Sandworm (Experimental)
使用编辑器工具执行特定任务
Extending Editor Functionality
嵌入式节点类型
Nodes
Objects
Effects
Decals
Light Sources
Geodetics
World Objects
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine Tools
GUI
双精度坐标
应用程序接口
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

Unigine.RenderContext Class

This class is used to manage render context.

RenderContext Class

Members


int CreateContext ( IntPtr handle, int width, int height ) #

Creates a new rendering context.

Arguments

  • IntPtr handle - Window handle.
  • int width - Canvas width.
  • int height - Canvas height.

Return value

1 if rendering context is created successfully; otherwise, 0.

bool IsCreated ( ) #

Returns a value indicating if rendering context is created.

Return value

1 if rendering context is created successfully; otherwise, 0.

int DestroyContext ( ) #

Destroys the rendering context.

Return value

1 if the rendering context is destroyed successfully; otherwise, 0.

int GetContextAPI ( ) #

Returns the graphics API of the rendering context.

Return value

One of the following values:

string GetContextName ( ) #

Returns the name of the graphics API of the rendering context.

Return value

One of the following values:
  • opengl
  • direct3d11

IntPtr GetD3D11Context ( ) #

Returns a pointer to the existing ID3D11DeviceContext interface.

Return value

ID3D11DeviceContext interface pointer.

IntPtr GetD3D11DepthStencil ( ) #

Returns a pointer to the depth stencil texture.

Return value

Depth stencil texture pointer.

IntPtr GetD3D11DepthStencilView ( ) #

Returns a pointer to the existing ID3D11DepthStencilView interface.

Return value

ID3D11DepthStencilView interface pointer.

IntPtr GetD3D11Device ( ) #

Returns a pointer to the existing ID3D11Device interface.

Return value

ID3D11Device interface pointer.

IntPtr GetD3D11RenderTarget ( ) #

Returns a pointer to the render target texture.

Return value

Render target texture pointer.

IntPtr GetD3D11RenderTargetView ( ) #

Returns a pointer to the existing ID3D11RenderTargetView interface.

Return value

ID3D11RenderTargetView interface pointer.

IntPtr GetD3D11SwapChain ( ) #

Returns a pointer to the existing IDXGISwapChain interface.

Return value

IDXGISwapChain interface pointer.

IntPtr GetHandle ( ) #

Returns a window handle.

Return value

Window handle.

IntPtr GetGLContext ( ) #

Returns a pointer to the OpenGL context.

Return value

OpenGL context pointer.

int ResizeWindow ( int width, int height ) #

Resizes the window.

Arguments

  • int width - New window width.
  • int height - New window height.

Return value

1 if the window is resized successfully; otherwise, 0.

int RenderWindow ( ) #

Renders the window.

Return value

1 if the window is rendered successfully; otherwise, 0.

int SwapWindow ( ) #

Swaps the window.

Return value

1 if the window is swapped successfully; otherwise, 0.

bool IsReady ( ) #

Returns a value indicating if the rendering context is ready.

Return value

1 if the rendering context is ready; otherwise, 0.

IntPtr CreateVisual ( ) #

Creates a visual context.

Return value

Pointer to the created visual context.
Last update: 2020-11-24
Build: ()