forked from BabylonJS/Babylon.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
David Catuhe
committed
Sep 23, 2021
1 parent
a86acb2
commit 2afa09b
Showing
83 changed files
with
1,577 additions
and
1,560 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53773,6 +53773,7 @@ var NativeEngine = /** @class */ (function (_super) { | |
texture.generateMipMaps = !noMipmap; | ||
texture.samplingMode = samplingMode; | ||
texture.invertY = invertY; | ||
texture._useSRGBBuffer = this._getUseSRGBBuffer(useSRGBBuffer, noMipmap); | ||
if (!this.doNotHandleContextLost) { | ||
// Keep a link to the buffer only if we plan to handle context lost | ||
texture._buffer = buffer; | ||
|
@@ -53819,7 +53820,6 @@ var NativeEngine = /** @class */ (function (_super) { | |
} | ||
var underlyingResource = texture._hardwareTexture.underlyingResource; | ||
_this._native.loadTexture(underlyingResource, data, !noMipmap, invertY, useSRGBBuffer, function () { | ||
texture._useSRGBBuffer = useSRGBBuffer && _this._caps.supportSRGBBuffers; | ||
texture.baseWidth = _this._native.getTextureWidth(underlyingResource); | ||
texture.baseHeight = _this._native.getTextureHeight(underlyingResource); | ||
texture.width = texture.baseWidth; | ||
|
@@ -56184,7 +56184,7 @@ var ThinEngine = /** @class */ (function () { | |
*/ | ||
// Not mixed with Version for tooling purpose. | ||
get: function () { | ||
return "[email protected].45"; | ||
return "[email protected].47"; | ||
}, | ||
enumerable: false, | ||
configurable: true | ||
|
@@ -56194,7 +56194,7 @@ var ThinEngine = /** @class */ (function () { | |
* Returns the current version of the framework | ||
*/ | ||
get: function () { | ||
return "5.0.0-alpha.45"; | ||
return "5.0.0-alpha.47"; | ||
}, | ||
enumerable: false, | ||
configurable: true | ||
|
@@ -58744,6 +58744,11 @@ var ThinEngine = /** @class */ (function () { | |
ThinEngine.prototype._createHardwareTexture = function () { | ||
return new _WebGL_webGLHardwareTexture__WEBPACK_IMPORTED_MODULE_17__["WebGLHardwareTexture"](this._createTexture(), this._gl); | ||
}; | ||
/** @hidden */ | ||
ThinEngine.prototype._getUseSRGBBuffer = function (useSRGBBuffer, noMipmap) { | ||
// Generating mipmaps for sRGB textures is not supported in WebGL1 so we must disable the support if mipmaps is enabled | ||
return useSRGBBuffer && this._caps.supportSRGBBuffers && (this.webGLVersion > 1 || this.isWebGPU || noMipmap); | ||
}; | ||
ThinEngine.prototype._createTextureBase = function (url, noMipmap, invertY, scene, samplingMode, onLoad, onError, prepareTexture, prepareTextureProcessFunction, buffer, fallback, format, forcedExtension, mimeType, loaderOptions, useSRGBBuffer) { | ||
var _this = this; | ||
if (samplingMode === void 0) { samplingMode = _constants__WEBPACK_IMPORTED_MODULE_8__["Constants"].TEXTURE_TRILINEAR_SAMPLINGMODE; } | ||
|
@@ -58788,7 +58793,7 @@ var ThinEngine = /** @class */ (function () { | |
texture.generateMipMaps = !noMipmap; | ||
texture.samplingMode = samplingMode; | ||
texture.invertY = invertY; | ||
texture._useSRGBBuffer = !!useSRGBBuffer && this._caps.supportSRGBBuffers && (this.webGLVersion > 1 || this.isWebGPU || noMipmap); // it seems generating mipmaps for sRGB textures is not supported in WebGL1 so we must disable the support if mipmaps is enabled | ||
texture._useSRGBBuffer = this._getUseSRGBBuffer(!!useSRGBBuffer, noMipmap); | ||
if (!this._doNotHandleContextLost) { | ||
// Keep a link to the buffer only if we plan to handle context lost | ||
texture._buffer = buffer; | ||
|
@@ -114150,7 +114155,7 @@ var BaseTexture = /** @class */ (function (_super) { | |
if (!engine) { | ||
return null; | ||
} | ||
var correctedUseSRGBBuffer = !!useSRGBBuffer && engine._caps.supportSRGBBuffers && (engine.webGLVersion > 1 || engine.isWebGPU || noMipmap); | ||
var correctedUseSRGBBuffer = engine._getUseSRGBBuffer(!!useSRGBBuffer, noMipmap); | ||
var texturesCache = engine.getLoadedTexturesCache(); | ||
for (var index = 0; index < texturesCache.length; index++) { | ||
var texturesCacheEntry = texturesCache[index]; | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.