File tree Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Original file line number Diff line number Diff line change @@ -2881,7 +2881,7 @@ var LibraryGLEmulation = {
2881
2881
// User can override the maximum number of texture units that we emulate. Using fewer texture units increases runtime performance
2882
2882
// slightly, so it is advantageous to choose as small value as needed.
2883
2883
// Limit to a maximum of 28 to not overflow the state bits used for renderer caching (31 bits = 3 attributes + 28 texture units).
2884
- GLImmediate . MAX_TEXTURES = Math . max ( Module [ 'GL_MAX_TEXTURE_IMAGE_UNITS' ] || GLctx . getParameter ( GLctx . MAX_TEXTURE_IMAGE_UNITS ) , 28 ) ;
2884
+ GLImmediate . MAX_TEXTURES = Math . min ( Module [ 'GL_MAX_TEXTURE_IMAGE_UNITS' ] || GLctx . getParameter ( GLctx . MAX_TEXTURE_IMAGE_UNITS ) , 28 ) ;
2885
2885
2886
2886
GLImmediate . TexEnvJIT . init ( GLctx , GLImmediate . MAX_TEXTURES ) ;
2887
2887
You can’t perform that action at this time.
0 commit comments