{"size": 1312, "ext": "js", "max_stars_repo_path": "src/renderPass.js", "max_stars_repo_name": "OpenGeoscience/vgl", "max_stars_repo_stars_event_min_datetime": "2015-05-03T05:23:11.000Z", "max_stars_repo_stars_event_max_datetime": "2018-09-15T08:17:13.000Z", "max_issues_repo_path": "src/renderPass.js", "max_issues_repo_name": "OpenGeoscience/vgl", "max_issues_repo_issues_event_min_datetime": "2015-02-04T18:40:33.000Z", "max_issues_repo_issues_event_max_datetime": "2018-12-18T16:16:51.000Z", "max_forks_repo_path": "src/renderPass.js", "max_forks_repo_name": "OpenGeoscience/vgl", "max_forks_repo_forks_event_min_datetime": "2015-10-12T00:47:01.000Z", "max_forks_repo_forks_event_max_datetime": "2015-10-12T00:47:01.000Z"}
{"max_stars_count": 6, "max_issues_count": 44, "max_forks_count": 1, "avg_line_length": 20.8253968254, "max_line_length": 78, "alphanum_fraction": 0.5403963415}
//////////////////////////////////////////////////////////////////////////////
vgl.renderPass = function () {
  'use strict';

  if (!(this instanceof vgl.renderPass)) {
    return new vgl.renderPass();
  }
  vgl.object.call(this);

  var m_this = this,
      m_renderTarget = null,
      m_renderer = vgl.renderer();

  this.setRenderer = function (ren) {
    if (ren !== m_renderer) {
      m_renderer = ren;
      m_this.modified();
    }
  };

  this.renderer = function () {
    return m_renderer;
  };

  this.setRenderTarget = function (renTgt) {
    if (m_renderTarget !== renTgt) {
      m_renderTarget = renTgt;
      m_this.modified();
    }
  };

  this.renderTarget = function () {
    return m_renderTarget;
  };

  this.render = function (renderState) {
    var result = false;

    if (m_renderTarget) {
      result = m_renderTarget.render(renderState);
    }

    m_renderer.render(renderState);

    return result;
  };

  this.remove = function (renderState) {
    if (m_renderTarget) {
      return m_renderTarget.remove(renderState);
    }
  };

  ////////////////////////////////////////////////////////////////////////////
  this.resize = function (width, height) {
    if (m_renderTarget) {
      m_renderTarget.resize(width, height);
    }
  };
};

inherit(vgl.renderPass, vgl.object);
