In questa pagina

QRhiBuffer::NativeBuffer Struct

struct QRhiBuffer::NativeBuffer

Contiene informazioni sulle risorse native sottostanti di un buffer. Per saperne di più...

Variabili pubbliche

const void *[3] objects
int slotCount

Descrizione dettagliata

Documentazione sulle variabili membro

const void *[3] NativeBuffer::objects

Questa variabile contiene un array di puntatori agli handle degli oggetti nativi.

Con OpenGL, l'handle nativo è un valore GLuint, quindi gli elementi dell'objects sono puntatori a un GLuint. Con Vulkan, l'handle nativo è un VkBuffer, quindi gli elementi dell'array sono puntatori a un VkBuffer. Con Direct3D 11 e Metal gli elementi sono rispettivamente puntatori a un ID3D11Buffer o a un MTLBuffer. Con Direct3D 12, gli elementi sono puntatori a un ID3D12Resource.

Nota: prestare attenzione al fatto che gli elementi sono sempre puntatori al tipo nativo di handle del buffer, anche se il tipo nativo stesso è un puntatore. (Pertanto, gli elementi sono di tip VkBuffer * o su Vulkan, anche se VkBuffer stesso è un puntatore sulle architetture a 64 bit).

int NativeBuffer::slotCount

Specifica il numero di elementi validi nell'array degli oggetti.

In pratica, il valore può essere 0, 1, 2 o 3. 0 indica che l'QRhiBuffer e non è supportato da alcun oggetto buffer nativo. Ciò può verificarsi con i QRhiBuffer con l'UniformBuffer e d'uso quando l'API sottostante non supporta (o il backend sceglie di non utilizzare) buffer uniformi nativi. Il valore 1 è comunemente utilizzato per i tipi Immutable e Static (ma alcuni backend potrebbero comportarsi diversamente). I valori 2 o 3 sono tipici quando il tipo è Dynamic (ma alcuni backend potrebbero comportarsi diversamente).

Vedi anche QRhi::currentFrameSlot() e QRhi::FramesInFlight.

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.