A module enabling initialization and termination of the TVG engines.
More...
A module enabling initialization and termination of the TVG engines.
◆ Tvg_Engine
Enumeration specifying the engine type used for the graphics backend. For multiple backends bitwise operation is allowed.
Enumerator |
---|
TVG_ENGINE_SW | CPU rasterizer.
|
TVG_ENGINE_GL | OpenGL rasterizer.
|
◆ tvg_engine_init()
Initializes TVG engines.
TVG requires the running-engine environment. TVG runs its own task-scheduler for parallelizing rendering tasks efficiently. You can indicate the number of threads, the count of which is designated threads
. In the initialization step, TVG will generate/spawn the threads as set by threads
count.
- Parameters
-
[in] | engine_method | The engine types to initialize. This is relative to the Canvas types, in which it will be used. For multiple backends bitwise operation is allowed.
- 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_FAILED_ALLOCATION | 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
- The Initializer keeps track of the number of times it was called. Threads count is fixed at the first init() call.
- See also
- tvg_engine_term()
-
Tvg_Engine
◆ tvg_engine_term()
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 | The engine types to terminate. This is relative to the Canvas types, in which it will be used. For multiple backends bitwise operation is allowed
- 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 | Nothing to be terminated. |
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