2017-10-31 08:14:09 +00:00
|
|
|
#include <stdbool.h>
|
2022-04-21 09:16:17 +00:00
|
|
|
#include <stdint.h>
|
2016-09-21 07:55:53 +00:00
|
|
|
|
2017-01-26 10:20:30 +00:00
|
|
|
#pragma once
|
2016-09-27 06:48:09 +00:00
|
|
|
|
2022-04-21 09:16:17 +00:00
|
|
|
typedef struct {
|
|
|
|
bool discrete;
|
|
|
|
uint32_t serial;
|
|
|
|
uint32_t vendor;
|
|
|
|
uint32_t version;
|
|
|
|
const char* name;
|
|
|
|
const char* renderer;
|
|
|
|
uint32_t subgroupSize;
|
|
|
|
} GraphicsDevice;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
bool bptc;
|
|
|
|
bool astc;
|
|
|
|
bool wireframe;
|
|
|
|
bool depthClamp;
|
|
|
|
bool clipDistance;
|
|
|
|
bool cullDistance;
|
|
|
|
bool fullIndexBufferRange;
|
|
|
|
bool indirectDrawFirstInstance;
|
|
|
|
bool dynamicIndexing;
|
|
|
|
bool nonUniformIndexing;
|
|
|
|
bool float64;
|
|
|
|
bool int64;
|
|
|
|
bool int16;
|
|
|
|
} GraphicsFeatures;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
uint32_t textureSize2D;
|
|
|
|
uint32_t textureSize3D;
|
|
|
|
uint32_t textureSizeCube;
|
|
|
|
uint32_t textureLayers;
|
|
|
|
uint32_t renderSize[3];
|
|
|
|
uint32_t uniformBufferRange;
|
|
|
|
uint32_t storageBufferRange;
|
|
|
|
uint32_t uniformBufferAlign;
|
|
|
|
uint32_t storageBufferAlign;
|
|
|
|
uint32_t vertexAttributes;
|
|
|
|
uint32_t vertexBufferStride;
|
|
|
|
uint32_t vertexShaderOutputs;
|
|
|
|
uint32_t computeDispatchCount[3];
|
|
|
|
uint32_t computeWorkgroupSize[3];
|
|
|
|
uint32_t computeWorkgroupVolume;
|
|
|
|
uint32_t computeSharedMemory;
|
|
|
|
uint32_t shaderConstantSize;
|
|
|
|
uint32_t indirectDrawCount;
|
|
|
|
uint32_t instances;
|
|
|
|
float anisotropy;
|
|
|
|
float pointSize;
|
|
|
|
} GraphicsLimits;
|
|
|
|
|
2022-04-21 07:27:13 +00:00
|
|
|
bool lovrGraphicsInit(bool debug);
|
2019-02-17 22:39:51 +00:00
|
|
|
void lovrGraphicsDestroy(void);
|
2022-04-21 09:16:17 +00:00
|
|
|
|
|
|
|
void lovrGraphicsGetDevice(GraphicsDevice* device);
|
|
|
|
void lovrGraphicsGetFeatures(GraphicsFeatures* features);
|
|
|
|
void lovrGraphicsGetLimits(GraphicsLimits* limits);
|