Rename lovr.graphics.getSupported and getSystemLimits;

"Features" and "Limits" will be the standard terminology used now.
This commit is contained in:
bjorn 2019-03-14 21:24:25 -07:00
parent 25fe88b493
commit 7441456aab
3 changed files with 9 additions and 9 deletions

View File

@ -352,8 +352,8 @@ static int l_lovrGraphicsHasWindow(lua_State *L) {
return 1;
}
static int l_lovrGraphicsGetSupported(lua_State* L) {
const GpuFeatures* features = lovrGraphicsGetSupported();
static int l_lovrGraphicsGetFeatures(lua_State* L) {
const GpuFeatures* features = lovrGraphicsGetFeatures();
lua_newtable(L);
lua_pushboolean(L, features->compute);
lua_setfield(L, -2, "compute");
@ -362,7 +362,7 @@ static int l_lovrGraphicsGetSupported(lua_State* L) {
return 1;
}
static int l_lovrGraphicsGetSystemLimits(lua_State* L) {
static int l_lovrGraphicsGetLimits(lua_State* L) {
const GpuLimits* limits = lovrGraphicsGetLimits();
lua_newtable(L);
lua_pushnumber(L, limits->pointSizes[1]);
@ -957,7 +957,7 @@ static int l_lovrGraphicsNewShaderBlock(lua_State* L) {
lua_pop(L, 1);
}
lovrAssert(type == BLOCK_UNIFORM || lovrGraphicsGetSupported()->compute, "Compute blocks are not supported on this system");
lovrAssert(type == BLOCK_UNIFORM || lovrGraphicsGetFeatures()->compute, "Compute blocks are not supported on this system");
size_t size = lovrShaderComputeUniformLayout(&uniforms);
Buffer* buffer = lovrBufferCreate(size, NULL, type == BLOCK_COMPUTE ? BUFFER_SHADER_STORAGE : BUFFER_UNIFORM, usage, readable);
ShaderBlock* block = lovrShaderBlockCreate(type, buffer, &uniforms);
@ -1417,8 +1417,8 @@ static const luaL_Reg lovrGraphics[] = {
{ "getDimensions", l_lovrGraphicsGetDimensions },
{ "getPixelDensity", l_lovrGraphicsGetPixelDensity },
{ "hasWindow", l_lovrGraphicsHasWindow },
{ "getSupported", l_lovrGraphicsGetSupported },
{ "getSystemLimits", l_lovrGraphicsGetSystemLimits },
{ "getFeatures", l_lovrGraphicsGetFeatures },
{ "getLimits", l_lovrGraphicsGetLimits },
{ "getStats", l_lovrGraphicsGetStats },
// State

View File

@ -202,7 +202,7 @@ int lovrGraphicsGetHeight(void);
float lovrGraphicsGetPixelDensity(void);
void lovrGraphicsSetCamera(Camera* camera, bool clear);
Buffer* lovrGraphicsGetIdentityBuffer(void);
#define lovrGraphicsGetSupported lovrGpuGetSupported
#define lovrGraphicsGetFeatures lovrGpuGetFeatures
#define lovrGraphicsGetLimits lovrGpuGetLimits
#define lovrGraphicsGetStats lovrGpuGetStats
@ -322,6 +322,6 @@ void lovrGpuDirtyTexture(void);
void* lovrGpuLock(void);
void lovrGpuUnlock(void* lock);
void lovrGpuDestroyLock(void* lock);
const GpuFeatures* lovrGpuGetSupported(void);
const GpuFeatures* lovrGpuGetFeatures(void);
const GpuLimits* lovrGpuGetLimits(void);
const GpuStats* lovrGpuGetStats(void);

View File

@ -1184,7 +1184,7 @@ void lovrGpuDestroyLock(void* lock) {
#endif
}
const GpuFeatures* lovrGpuGetSupported() {
const GpuFeatures* lovrGpuGetFeatures() {
return &state.features;
}