|
ObjectivelyGPU
Object oriented graphics framework for SDL3 and C
|
An SDL_GPUQueryPool and its metadata.
More...
#include <QueryPool.h>
Public Member Functions | |
| QueryPool * | initWithDevice (QueryPool *self, RenderDevice *device, const SDL_GPUQueryPoolCreateInfo *info) |
Initializes this QueryPool, creating its SDL_GPUQueryPool. | |
| Class * | _QueryPool (void) |
| The QueryPool archetype. | |
Data Fields | |
| Object | object |
| The superclass. | |
| SDL_GPUQueryPool * | pool |
The underlying SDL query pool, or NULL if occlusion queries are unsupported by the linked SDL3 (see QueryPool.h). | |
| SDL_GPUQueryType | type |
| The type of query this pool was created for. | |
| Uint32 | queryCount |
| The maximum number of queries in this pool. | |
| ident | data |
| User data. | |
Protected Attributes | |
| QueryPoolInterface * | interface |
| The interface. | |
An SDL_GPUQueryPool and its metadata.
QueryPool owns its underlying SDL_GPUQueryPool and releases it in dealloc, so a QueryPool is freed with release like any other Objectively object. Begin and end queries against it via RenderPass::beginQuery / RenderPass::endQuery, and retrieve results via CopyPass::downloadQueryResults:
| QueryPool * initWithDevice | ( | QueryPool * | self, |
| RenderDevice * | device, | ||
| const SDL_GPUQueryPoolCreateInfo * | info | ||
| ) |
Initializes this QueryPool, creating its SDL_GPUQueryPool.
This is the designated initializer. Always succeeds, even when occlusion queries are unsupported by the linked SDL3 – self->pool is NULL in that case, and the pool behaves as an inert no-op.
| self | The QueryPool. |
| device | The RenderDevice used to create and release the query pool. Retained. |
| info | Query pool creation parameters (query type, query count). |
NULL on failure. | ident QueryPool::data |
User data.
|
protected |
The interface.
| Object QueryPool::object |
The superclass.
| SDL_GPUQueryPool* QueryPool::pool |
The underlying SDL query pool, or NULL if occlusion queries are unsupported by the linked SDL3 (see QueryPool.h).
| Uint32 QueryPool::queryCount |
The maximum number of queries in this pool.
| SDL_GPUQueryType QueryPool::type |
The type of query this pool was created for.