Defines GL image abstractions, and streamer and format conversion APIs.
|
DW_VIZ_API_PUBLIC dwStatus | dwImage_createAndBindBufferGL (dwImageHandle_t *image, dwImageProperties properties, void *buffersIn[DW_MAX_IMAGE_PLANES], size_t pitches[DW_MAX_IMAGE_PLANES], size_t bufferCount, dwContextHandle_t ctx) |
| Works only with DW_IMAGE_GL and DW_IMAGE_LAYOUT_BLOCK (or DEFAULT) memory layout, in which case the buffer passed is a cpu memory pointer and the content is uploaded onto the GPU as a GL texture. More...
|
|
DW_VIZ_API_PUBLIC dwStatus | dwImage_createAndBindTexture (dwImageHandle_t *image, dwImageProperties properties, GLenum texID, GLenum target) |
| Creates a dwImageHandle_t based on the properties passed and binds a GL texture to it. More...
|
|
DW_VIZ_API_PUBLIC dwStatus | dwImage_createGL (dwImageHandle_t *image, dwImageProperties properties, dwContextHandle_t ctx) |
| Creates and allocates resources for a dwImageHandle_t based on the properties passed as input. More...
|
|
DW_VIZ_API_PUBLIC dwStatus | dwImage_getGL (dwImageGL **imageGL, dwImageHandle_t image) |
| Retrieves the dwImageGL of a dwImageHandle_t. More...
|
|
◆ dwImageGL
Data Fields |
dwImageProperties |
prop |
Specifies the properties of the image. - Note
- prop.type is always DW_IMAGE_GL and would have to be casted accordingly
|
GLenum |
target |
Specifies the OpenGL texture target. |
GLuint |
tex |
Specifies the OpenGL texture handle. |
dwTime_t |
timestamp_us |
Specifies the time, in microseconds, when the image was acquired. |
◆ dwImage_createAndBindBufferGL()
Works only with DW_IMAGE_GL and DW_IMAGE_LAYOUT_BLOCK (or DEFAULT) memory layout, in which case the buffer passed is a cpu memory pointer and the content is uploaded onto the GPU as a GL texture.
Given that this implies a change in domain and device, the ownership of the original buffer remains to the user and the image allocates its own memory onto the GPU.
- Parameters
-
[out] | image | A handle to the image |
[in] | properties | The image properties. |
[in] | buffersIn | An array of pointers to individual buffers. |
[in] | pitches | An array of pitches for each buffer. |
[in] | bufferCount | The number of buffers (maximum is DW_MAX_IMAGE_PLANES). |
[in] | ctx | The DriveWorksGL context. |
- Returns
- DW_SUCCESS if the image was created,
DW_INVALID_ARGUMENT if the given image properties are invalid or the image pointer is null,
DW_INVALID_HANDLE if the given context handle is invalid,
◆ dwImage_createAndBindTexture()
Creates a dwImageHandle_t based on the properties passed and binds a GL texture to it.
Valid only for types of DW_IMAGE_GL with DW_IMAGE_LAYOUT_BLOCK layout
- Parameters
-
[out] | image | A handle to the image |
[in] | properties | The image properties. |
[in] | texID | The id of the gl texture |
[in] | target | The number of buffers (maximum is DW_MAX_IMAGE_PLANES). |
- Returns
- DW_SUCCESS if the image was created,
DW_INVALID_ARGUMENT if the given image types is invalid,
◆ dwImage_createGL()
Creates and allocates resources for a dwImageHandle_t based on the properties passed as input.
- Parameters
-
[out] | image | A handle to the image |
[in] | properties | The image properties. |
[in] | ctx | The DriveWorksGL context. |
- Returns
- DW_SUCCESS if the image was created,
DW_INVALID_ARGUMENT if the given image types are invalid or the streamer pointer is null,
DW_INVALID_HANDLE if the given context handle is invalid,
- Note
- This method can only create GL images and will ignore any type set in the properties.
◆ dwImage_getGL()
Retrieves the dwImageGL of a dwImageHandle_t.
The image must have been created as a DW_IMAGE_GL type Note that any modification to the image retrieved will modify the content of the original handle
- Parameters
-
[out] | imageGL | A pointer to the dwImageGL pointer |
[in] | image | A handle to the image |
- Returns
- DW_SUCCESS if the dwImageGL is successfully retrieved,
DW_INVALID_ARGUMENT if the given image pointer or image handle is null,
DW_INVALID_HANDLE if the given image handle is invalid,