Skip to content

Class QAccelPlot::DataTexture

ClassList > QAccelPlot > DataTexture

Series data uploaded to the GPU as an RGBA8888 texture, one float per texel. More...

  • #include <DataTexture.hpp>

Public Functions

Type Name
DataTexture () = default
Constructs an empty data texture; texture() staysnullptr until the first upload.
DataTexture (std::unique_ptr< QSGTexture > texture)
Wraps the existing texture , for example in tests.
QSGTexture * texture () const
Returns the texture the shaders sample, or nullptr before the first successful upload.
void upload (QQuickWindow * window, const float * data, int floatCount)
Uploads floatCount raw floats from__data , reusing GPU and CPU buffers where possible.

Detailed Description

Materials hold it through a std::shared_ptr, so several nodes of one series can sample the same upload. It is created and destroyed on the render thread, like the materials holding it.

Public Functions Documentation

function DataTexture

Constructs an empty data texture; texture() staysnullptr until the first upload.

QAccelPlot::DataTexture::DataTexture () = default


function DataTexture

Wraps the existing texture , for example in tests.

explicit QAccelPlot::DataTexture::DataTexture (
    std::unique_ptr< QSGTexture > texture
) 


function texture

Returns the texture the shaders sample, or nullptr before the first successful upload.

QSGTexture * QAccelPlot::DataTexture::texture () const


function upload

Uploads floatCount raw floats from__data , reusing GPU and CPU buffers where possible.

void QAccelPlot::DataTexture::upload (
    QQuickWindow * window,
    const float * data,
    int floatCount
) 

Does nothing when window is nullptr or floatCount is not positive.



The documentation for this class was generated from the following file QAccelPlot/src/QAccelPlot/materials/DataTexture.hpp