Merge pull request #36 from tsauerwein/webgl-point-has-stable

Mark ol.has.WEBGL_MAX_TEXTURE_SIZE as API
This commit is contained in:
Tobias Sauerwein
2014-11-21 10:33:18 +01:00
2 changed files with 7 additions and 4 deletions
+2 -1
View File
@@ -15,7 +15,8 @@ var atlasManager = new ol.style.AtlasManager({
// we increase the default size so that all symbols fit into // we increase the default size so that all symbols fit into
// a single atlas image // a single atlas image
size: 512, size: 512,
maxSize: ol.has.WEBGL_MAX_TEXTURE_SIZE}); maxSize: ol.has.WEBGL_MAX_TEXTURE_SIZE
});
var symbolInfo = [{ var symbolInfo = [{
opacity: 1.0, opacity: 1.0,
+5 -3
View File
@@ -124,9 +124,10 @@ ol.has.WEBGL;
/** /**
* The maximum supported WebGL texture size in pixels. If WebGL is not * The maximum supported WebGL texture size in pixels. If WebGL is not
* supported, the value is set to `-1`. * supported, the value is set to `undefined`.
* @const * @const
* @type {number} * @type {number|undefined}
* @api
*/ */
ol.has.WEBGL_MAX_TEXTURE_SIZE; ol.has.WEBGL_MAX_TEXTURE_SIZE;
@@ -142,8 +143,9 @@ ol.has.WEBGL_EXTENSIONS;
(function() { (function() {
if (ol.ENABLE_WEBGL) { if (ol.ENABLE_WEBGL) {
var hasWebGL = false; var hasWebGL = false;
var textureSize = -1; var textureSize;
var /** @type {Array.<string>} */ extensions = []; var /** @type {Array.<string>} */ extensions = [];
if ('WebGLRenderingContext' in goog.global) { if ('WebGLRenderingContext' in goog.global) {
try { try {
var canvas = /** @type {HTMLCanvasElement} */ var canvas = /** @type {HTMLCanvasElement} */