ObjectivelyGPU
Object oriented graphics framework for SDL3 and C
Loading...
Searching...
No Matches
QueryPool.h File Reference

QueryPool wraps an SDL_GPUQueryPool, owning its handle and metadata. More...

#include <SDL3/SDL_gpu.h>
#include <Objectively/Object.h>
#include <ObjectivelyGPU/Types.h>

Go to the source code of this file.

Data Structures

struct  SDL_GPUQueryPoolCreateInfo
 
struct  QueryPool
 An SDL_GPUQueryPool and its metadata. More...
 

Typedefs

typedef struct SDL_GPUQueryPool SDL_GPUQueryPool
 Polyfills for the query types this prototype API depends on, so ObjectivelyGPU's own headers can declare that API unconditionally even when the linked SDL3 doesn't yet provide it.
 
typedef enum SDL_GPUQueryType SDL_GPUQueryType
 
typedef struct SDL_GPUQueryPoolCreateInfo SDL_GPUQueryPoolCreateInfo
 
typedef struct RenderDevice RenderDevice
 
typedef struct QueryPool QueryPool
 

Enumerations

enum  SDL_GPUQueryType { SDL_GPU_QUERY_TIMESTAMP , SDL_GPU_QUERY_BINARY_OCCLUSION , SDL_GPU_QUERY_PRECISE_OCCLUSION }
 

Functions

OBJECTIVELYGPU_EXPORT Class * _QueryPool (void)
 

Detailed Description

QueryPool wraps an SDL_GPUQueryPool, owning its handle and metadata.

The occlusion/timestamp query API is a prototype not yet part of upstream SDL. The types and methods here are always available, but when linked against an SDL3 build that does not define SDL_GPU_OCCLUSION_QUERY, this class and the related RenderPass/CopyPass query methods are inert no-ops: initWithDevice still succeeds (so callers never need to special-case its absence), but beginQuery/endQuery do nothing and downloadQueryResults always reports "not occluded". This lets client code (e.g. Quetoo) unconditionally use occlusion queries as an optimization that silently disables itself where unsupported.

Typedef Documentation

◆ QueryPool

typedef struct QueryPool QueryPool

◆ RenderDevice

typedef struct RenderDevice RenderDevice

◆ SDL_GPUQueryPool

Polyfills for the query types this prototype API depends on, so ObjectivelyGPU's own headers can declare that API unconditionally even when the linked SDL3 doesn't yet provide it.

◆ SDL_GPUQueryPoolCreateInfo

◆ SDL_GPUQueryType

Enumeration Type Documentation

◆ SDL_GPUQueryType

Enumerator
SDL_GPU_QUERY_TIMESTAMP 
SDL_GPU_QUERY_BINARY_OCCLUSION 
SDL_GPU_QUERY_PRECISE_OCCLUSION 

Function Documentation

◆ _QueryPool()

OBJECTIVELYGPU_EXPORT Class * _QueryPool ( void  )