mirror of https://github.com/bjornbytes/lovr.git
Expose max UBO size in lovr.graphics.getSystemLimits;
This commit is contained in:
parent
c531852932
commit
2e5c927b92
|
@ -359,6 +359,8 @@ static int l_lovrGraphicsGetSystemLimits(lua_State* L) {
|
|||
lua_setfield(L, -2, "texturemsaa");
|
||||
lua_pushinteger(L, limits->textureAnisotropy);
|
||||
lua_setfield(L, -2, "anisotropy");
|
||||
lua_pushinteger(L, limits->blockSize);
|
||||
lua_setfield(L, -2, "blocksize");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -81,6 +81,7 @@ typedef struct {
|
|||
int textureSize;
|
||||
int textureMSAA;
|
||||
float textureAnisotropy;
|
||||
int blockSize;
|
||||
} GpuLimits;
|
||||
|
||||
typedef struct {
|
||||
|
|
|
@ -624,7 +624,9 @@ void lovrGpuInit(bool srgb, getProcAddressProc getProcAddress) {
|
|||
#endif
|
||||
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &state.limits.textureSize);
|
||||
glGetIntegerv(GL_MAX_SAMPLES, &state.limits.textureMSAA);
|
||||
glGetIntegerv(GL_MAX_UNIFORM_BLOCK_SIZE, &state.limits.blockSize);
|
||||
glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &state.limits.textureAnisotropy);
|
||||
|
||||
glEnable(GL_BLEND);
|
||||
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
||||
state.srgb = srgb;
|
||||
|
|
Loading…
Reference in New Issue