This page has been translated automatically.
Видеоуроки
Интерфейс
Основы
Продвинутый уровень
Подсказки и советы
Основы
Программирование на C#
Рендеринг
Профессиональный уровень (SIM)
Принципы работы
Свойства (properties)
Компонентная Система
Рендер
Физика
Редактор UnigineEditor
Обзор интерфейса
Работа с ассетами
Контроль версий
Настройки и предпочтения
Работа с проектами
Настройка параметров ноды
Setting Up Materials
Настройка свойств
Освещение
Sandworm
Использование инструментов редактора для конкретных задач
Расширение функционала редактора
Встроенные объекты
Ноды (Nodes)
Объекты (Objects)
Эффекты
Декали
Источники света
Geodetics
World-ноды
Звуковые объекты
Объекты поиска пути
Player-ноды
Программирование
Основы
Настройка среды разработки
Примеры использования
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Плагины
Форматы файлов
Материалы и шейдеры
Rebuilding the Engine Tools
Интерфейс пользователя (GUI)
Двойная точность координат
API
Animations-Related Classes
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
Rendering-Related Classes
VR-Related Classes
Работа с контентом
Оптимизация контента
Материалы
Визуальный редактор материалов
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Учебные материалы

Unigine::RenderContext Class

Header: #include <UnigineRenderContext.h>

This class is used to manage render context.

RenderContext Class

Members


int createContext ( void * handle, int width, int height ) #

Creates a new rendering context.

Arguments

  • void * handle - Window handle.
  • int width - Canvas width.
  • int height - Canvas height.

Return value

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

bool isCreated ( ) const#

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 ( ) const#

Returns the graphics API of the rendering context.

Return value

One of the following values:

const char * getContextName ( ) const#

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

Return value

One of the following values:
  • opengl
  • direct3d11

void * getD3D11Context ( ) const#

Returns a pointer to the existing ID3D11DeviceContext interface.

Return value

ID3D11DeviceContext interface pointer.

void * getD3D11DepthStencil ( ) const#

Returns a pointer to the depth stencil texture.

Return value

Depth stencil texture pointer.

void * getD3D11DepthStencilView ( ) const#

Returns a pointer to the existing ID3D11DepthStencilView interface.

Return value

ID3D11DepthStencilView interface pointer.

void * getD3D11Device ( ) const#

Returns a pointer to the existing ID3D11Device interface.

Return value

ID3D11Device interface pointer.

void * getD3D11RenderTarget ( ) const#

Returns a pointer to the render target texture.

Return value

Render target texture pointer.

void * getD3D11RenderTargetView ( ) const#

Returns a pointer to the existing ID3D11RenderTargetView interface.

Return value

ID3D11RenderTargetView interface pointer.

void * getD3D11SwapChain ( ) const#

Returns a pointer to the existing IDXGISwapChain interface.

Return value

IDXGISwapChain interface pointer.

void * getHandle ( ) #

Returns a window handle.

Return value

Window handle.

void * getGLContext ( ) const#

Returns a pointer to the OpenGL context.

Return value

OpenGL context pointer.

void * getGLDisplay ( ) const#

Returns a pointer to the OpenGL display.

Return value

OpenGL display 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 ( ) const#

Returns a value indicating if the rendering context is ready.

Return value

true if the rendering context is ready; otherwise, false.

void * createVisual ( ) #

Creates a visual context.

Return value

Pointer to the created visual context.
Last update: 13.12.2021
Build: ()