'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});

var _webgl = require('../webgl.js');

var _webgl2 = _interopRequireDefault(_webgl);

function _interopRequireDefault(obj) {
  return obj && obj.__esModule ? obj : { default: obj };
}

/**
 * @constructor
 * @param {Array.<number>=} opt_arr Array.
 * @param {number=} opt_usage Usage.
 * @struct
 */
var _ol_webgl_Buffer_ = function (opt_arr, opt_usage) {

  /**
   * @private
   * @type {Array.<number>}
   */
  this.arr_ = opt_arr !== undefined ? opt_arr : [];

  /**
   * @private
   * @type {number}
   */
  this.usage_ = opt_usage !== undefined ? opt_usage : _ol_webgl_Buffer_.Usage_.STATIC_DRAW;
};

/**
 * @return {Array.<number>} Array.
 */
_ol_webgl_Buffer_.prototype.getArray = function () {
  return this.arr_;
};

/**
 * @return {number} Usage.
 */
_ol_webgl_Buffer_.prototype.getUsage = function () {
  return this.usage_;
};

/**
 * @enum {number}
 * @private
 */
_ol_webgl_Buffer_.Usage_ = {
  STATIC_DRAW: _webgl2.default.STATIC_DRAW,
  STREAM_DRAW: _webgl2.default.STREAM_DRAW,
  DYNAMIC_DRAW: _webgl2.default.DYNAMIC_DRAW
};
exports.default = _ol_webgl_Buffer_;
module.exports = exports['default'];