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.int 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.int 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: 2018-08-10
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)