Loading [MathJax]/extensions/tex2jax.js
  • <xmp id="om0om">
  • <table id="om0om"><noscript id="om0om"></noscript></table>

  • DriveWorks SDK Reference
    5.10.90 Release
    For Test and Development only

    All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
    GL Image Interface

    Detailed Description

    Defines GL image abstractions, and streamer and format conversion APIs.

    Data Structures

    struct  dwImageGL
     Defines a GL texture image. More...
     

    Functions

    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...
     

    Data Structure Documentation

    ◆ dwImageGL

    struct 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.

    Function Documentation

    ◆ dwImage_createAndBindBufferGL()

    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.

    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]imageA handle to the image
    [in]propertiesThe image properties.
    [in]buffersInAn array of pointers to individual buffers.
    [in]pitchesAn array of pitches for each buffer.
    [in]bufferCountThe number of buffers (maximum is DW_MAX_IMAGE_PLANES).
    [in]ctxThe 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()

    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.

    Valid only for types of DW_IMAGE_GL with DW_IMAGE_LAYOUT_BLOCK layout

    Parameters
    [out]imageA handle to the image
    [in]propertiesThe image properties.
    [in]texIDThe id of the gl texture
    [in]targetThe 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()

    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.

    Parameters
    [out]imageA handle to the image
    [in]propertiesThe image properties.
    [in]ctxThe 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()

    DW_VIZ_API_PUBLIC dwStatus dwImage_getGL ( dwImageGL **  imageGL,
    dwImageHandle_t  image 
    )

    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]imageGLA pointer to the dwImageGL pointer
    [in]imageA 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,
    人人超碰97caoporen国产