Sha256: c2ffd8cac6f91e4bb4c2525f7c5e796e3ed0ba319481d7964f31d84a9c966cff

Contents?: true

Size: 1.34 KB

Versions: 9

Compression:

Stored size: 1.34 KB

Contents

describe("Framebuffer", function() {
  var c; // Jax context
  var buf;
  beforeEach(function() { c = new Jax.Context('canvas-element'); });
  
  describe("with no attachments", function() {
    beforeEach(function() { buf = new Jax.Framebuffer(); });
    
    it("should bind", function() {
      // because there's a default GL_RGBA color profile generated.
      // This was the only way to circumvent an unknown error in FF and Chrome when
      // using a depth buffer only.
      expect(function() {buf.bind(c)}).not.toThrow();
    });
  });
  
  describe("with only a depth attachment", function() {
    beforeEach(function() {
      buf = new Jax.Framebuffer({ depth: true });
    });
    
    it("should bind", function() {
      expect(function() {buf.bind(c)}).not.toThrow();
    });
  });
  
  describe("with only a stencil attachment", function() {
    beforeEach(function() {
      buf = new Jax.Framebuffer({ stencil: true });
    });
    
    xit("should bind", function() { // raising GL_FRAMEBUFFER_UNSUPPORTED
      expect(function() {buf.bind(c)}).not.toThrow();
    });
  });

  describe("with a depth and a stencil attachment", function() {
    beforeEach(function() {
      buf = new Jax.Framebuffer({ depth: true, stencil: true });
    });
    
    it("should bind", function() {
      expect(function() {buf.bind(c)}).not.toThrow();
    });
  });
});

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
jax-0.0.0.9 spec/javascripts/jax/webgl/framebuffer_spec.js
jax-0.0.0.8 spec/javascripts/jax/webgl/framebuffer_spec.js
jax-0.0.0.7 spec/javascripts/jax/webgl/framebuffer_spec.js
jax-0.0.0.6 spec/javascripts/jax/webgl/framebuffer_spec.js
jax-0.0.0.5 spec/javascripts/jax/webgl/framebuffer_spec.js
jax-0.0.0.4 spec/javascripts/jax/webgl/framebuffer_spec.js
jax-0.0.0.3 spec/javascripts/jax/webgl/framebuffer_spec.js
jax-0.0.0.2 spec/javascripts/jax/webgl/framebuffer_spec.js
jax-0.0.0.1 spec/javascripts/jax/webgl/framebuffer_spec.js