DXContextCreate

Creates a graphic context for rendering frames of a specified size.

int  DXContextCreate(
   uint  width,      // width in pixels
   uint  height      // height in pixels
   );

Parameters

width

[in]  Frame width in pixels.

height

[in]  Frame height in pixels.

Return Value

A handle for a created context or INVALID_HANDLE in case of an error. To receive an error code, the GetLastError() function should be called.

Note

All graphical objects created using the DXBufferCreate, DXInputCreate, DXShaderCreate and DXTextureCreate functions can be used only in a graphic context they were created in.

A frame size can subsequently be changed to DXContextSetSize().

A created handle that is no longer in use should be explicitly released by the DXRelease() function.