|
VTK
9.7.20260823
|
#include <vtkOpenGLArrayTextureBufferAdapter.h>
Interfaces vtkDataArray to an OpenGL texture buffer.
The desktop OpenGL and GLES/WebGL2 upload paths are deliberately asymmetric because the two APIs store buffer-backed sampler data differently:
Definition at line 44 of file vtkOpenGLArrayTextureBufferAdapter.h.
Public Member Functions | |
| vtkOpenGLArrayTextureBufferAdapter () | |
| vtkOpenGLArrayTextureBufferAdapter (vtkDataArray *array, bool asScalars, bool *integerTexture=nullptr) | |
| vtkOpenGLArrayTextureBufferAdapter (const vtkOpenGLArrayTextureBufferAdapter &)=default | |
| vtkOpenGLArrayTextureBufferAdapter & | operator= (const vtkOpenGLArrayTextureBufferAdapter &)=default |
| void | Upload (vtkOpenGLRenderWindow *renderWindow, bool force=false) |
| void | ReleaseGraphicsResources (vtkWindow *window) |
| void | SetUploaded (bool uploaded) |
| Get/set the "already uploaded" guard. | |
| bool | GetUploaded () const |
| Get/set the "already uploaded" guard. | |
| void | SetOwnsTexture (bool ownsTexture) |
| Get/set who owns this adapter's Texture/Buffer. | |
| bool | GetOwnsTexture () const |
| Get/set who owns this adapter's Texture/Buffer. | |
| void | SetPendingReset (bool pendingReset) |
| Get/set the pending-reset flag used to recycle an adapter across rebuild cycles. | |
| bool | GetPendingReset () const |
| Get/set the pending-reset flag used to recycle an adapter across rebuild cycles. | |
Public Attributes | |
| std::vector< vtkSmartPointer< vtkDataArray > > | Arrays |
| vtkSmartPointer< vtkTextureObject > | Texture |
| vtkSmartPointer< vtkOpenGLBufferObject > | Buffer |
| vtkOpenGLBufferObject::ObjectType | BufferType |
| vtkOpenGLBufferObject::ObjectUsage | BufferUsage |
| bool | IntegerTexture |
| bool | ScalarComponents |
| vtkOpenGLArrayTextureBufferAdapter::vtkOpenGLArrayTextureBufferAdapter | ( | ) |
| vtkOpenGLArrayTextureBufferAdapter::vtkOpenGLArrayTextureBufferAdapter | ( | vtkDataArray * | array, |
| bool | asScalars, | ||
| bool * | integerTexture = nullptr ) |
|
default |
|
default |
| void vtkOpenGLArrayTextureBufferAdapter::Upload | ( | vtkOpenGLRenderWindow * | renderWindow, |
| bool | force = false ) |
| void vtkOpenGLArrayTextureBufferAdapter::ReleaseGraphicsResources | ( | vtkWindow * | window | ) |
|
inline |
Get/set the "already uploaded" guard.
When true, Upload() skips the GPU transfer unless forced; callers clear it (SetUploaded(false)) whenever the bound array list changes to request a re-upload. It is the GLES-safe replacement for the old Buffer->IsReady() check, since on GLES the data goes straight into the texture and no buffer object is kept around to query. The setter does not call Modified().
Definition at line 74 of file vtkOpenGLArrayTextureBufferAdapter.h.
|
inline |
Get/set the "already uploaded" guard.
When true, Upload() skips the GPU transfer unless forced; callers clear it (SetUploaded(false)) whenever the bound array list changes to request a re-upload. It is the GLES-safe replacement for the old Buffer->IsReady() check, since on GLES the data goes straight into the texture and no buffer object is kept around to query. The setter does not call Modified().
Definition at line 75 of file vtkOpenGLArrayTextureBufferAdapter.h.
|
inline |
Get/set who owns this adapter's Texture/Buffer.
True (the default) means the adapter owns them: it allocates them, may partially re-upload in place, and releases them in ReleaseGraphicsResources(). False means they are borrowed from a shared vtkOpenGLArrayTextureBufferCache entry that owns their lifetime; the adapter only references them and never frees or partially rewrites them. Upload() sets this automatically per call (false when it routes a single array through the cache, true otherwise). The setter does not call Modified().
Definition at line 88 of file vtkOpenGLArrayTextureBufferAdapter.h.
|
inline |
Get/set who owns this adapter's Texture/Buffer.
True (the default) means the adapter owns them: it allocates them, may partially re-upload in place, and releases them in ReleaseGraphicsResources(). False means they are borrowed from a shared vtkOpenGLArrayTextureBufferCache entry that owns their lifetime; the adapter only references them and never frees or partially rewrites them. Upload() sets this automatically per call (false when it routes a single array through the cache, true otherwise). The setter does not call Modified().
Definition at line 89 of file vtkOpenGLArrayTextureBufferAdapter.h.
|
inline |
Get/set the pending-reset flag used to recycle an adapter across rebuild cycles.
vtkDrawTexturedElements::BeginArrayRebuild() sets it on every adapter; the first Bind/Append of the new cycle then drops the stale source-array list (keeping the GL texture/buffer and layout records so the next Upload() can diff against them) and clears the flag. An adapter still flagged after the cycle was not re-listed this frame, so draw-time loops skip it rather than upload/activate a now-stale array. The setter does not call Modified().
Definition at line 101 of file vtkOpenGLArrayTextureBufferAdapter.h.
|
inline |
Get/set the pending-reset flag used to recycle an adapter across rebuild cycles.
vtkDrawTexturedElements::BeginArrayRebuild() sets it on every adapter; the first Bind/Append of the new cycle then drops the stale source-array list (keeping the GL texture/buffer and layout records so the next Upload() can diff against them) and clears the flag. An adapter still flagged after the cycle was not re-listed this frame, so draw-time loops skip it rather than upload/activate a now-stale array. The setter does not call Modified().
Definition at line 102 of file vtkOpenGLArrayTextureBufferAdapter.h.
| std::vector<vtkSmartPointer<vtkDataArray> > vtkOpenGLArrayTextureBufferAdapter::Arrays |
Definition at line 47 of file vtkOpenGLArrayTextureBufferAdapter.h.
| vtkSmartPointer<vtkTextureObject> vtkOpenGLArrayTextureBufferAdapter::Texture |
Definition at line 48 of file vtkOpenGLArrayTextureBufferAdapter.h.
| vtkSmartPointer<vtkOpenGLBufferObject> vtkOpenGLArrayTextureBufferAdapter::Buffer |
Definition at line 49 of file vtkOpenGLArrayTextureBufferAdapter.h.
| vtkOpenGLBufferObject::ObjectType vtkOpenGLArrayTextureBufferAdapter::BufferType |
Definition at line 50 of file vtkOpenGLArrayTextureBufferAdapter.h.
| vtkOpenGLBufferObject::ObjectUsage vtkOpenGLArrayTextureBufferAdapter::BufferUsage |
Definition at line 51 of file vtkOpenGLArrayTextureBufferAdapter.h.
| bool vtkOpenGLArrayTextureBufferAdapter::IntegerTexture |
Definition at line 52 of file vtkOpenGLArrayTextureBufferAdapter.h.
| bool vtkOpenGLArrayTextureBufferAdapter::ScalarComponents |
Definition at line 53 of file vtkOpenGLArrayTextureBufferAdapter.h.