A module enabling initialization and termination of the TVG engines.
More...
A module enabling initialization and termination of the TVG engines.
◆ TVG_ENGINE_GL
#define TVG_ENGINE_GL (1 << 2) |
OpenGL raster engine type.
◆ TVG_ENGINE_SW
#define TVG_ENGINE_SW (1 << 1) |
◆ tvg_engine_init()
TVG_EXPORT Tvg_Result tvg_engine_init |
( |
unsigned |
engine_method, |
|
|
unsigned |
threads |
|
) |
| |
Initializes TVG engines.
It must be called before any other function, at the beginning of the TVG client.
- Parameters
-
[in] | engine_method | The engine types
- TVG_ENGINE_SW: CPU rasterizer
- TVG_ENGINE_GL: OpenGL rasterizer (not supported yet)
|
[in] | threads | The number of additional threads used to perform rendering. Zero indicates only the main thread is to be used. |
- Returns
- Tvg_Result enumeration.
- Return values
-
TVG_RESULT_SUCCESS | Succeed. |
TVG_RESULT_INSUFFICIENT_CONDITION | An internal error possibly with memory allocation. |
TVG_RESULT_INVALID_ARGUMENT | Unknown engine type. |
TVG_RESULT_NOT_SUPPORTED | Unsupported engine type. |
TVG_RESULT_UNKNOWN | Other error. |
- Note
- For multiple backeneds bitwise operation on the engine types is allowed.
- See also
- tvg_engine_term()
-
TVG_ENGINE_SW, TVG_ENGINE_GL
◆ tvg_engine_term()
TVG_EXPORT Tvg_Result tvg_engine_term |
( |
unsigned |
engine_method | ) |
|
Terminates TVG engines.
It should be called in case of termination of the TVG client with the same engine types as were passed when tvg_engine_init() was called.
- Parameters
-
engine_method | renderer type
- TVG_ENGINE_SW: CPU rasterizer
- TVG_ENGINE_GL: OpenGL rasterizer (not supported yet)
|
- Returns
- Tvg_Result enumeration.
- Return values
-
TVG_RESULT_SUCCESS | Succeed. |
TVG_RESULT_INSUFFICIENT_CONDITION | Multiple function calls. |
TVG_RESULT_INVALID_ARGUMENT | Unknown engine type. |
TVG_RESULT_NOT_SUPPORTED | Unsupported engine type. |
TVG_RESULT_UNKNOWN | An internal error. |
- See also
- tvg_engine_init()
-
TVG_ENGINE_SW, TVG_ENGINE_GL