Sha256: 669870e61f3f4e3921b62076273831001c098852a7b6ae7f93ed7e8164710ed9

Contents?: true

Size: 1.29 KB

Versions: 6

Compression:

Stored size: 1.29 KB

Contents

describe("Framebuffer", function() {
  var buf;
  
  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(SPEC_CONTEXT)}).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(SPEC_CONTEXT)}).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(SPEC_CONTEXT)}).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(SPEC_CONTEXT)}).not.toThrow();
    });
  });
});

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
jax-2.0.5 spec/javascripts/jax/webgl/framebuffer_spec.js
jax-2.0.4 spec/javascripts/jax/webgl/framebuffer_spec.js
jax-2.0.3 spec/javascripts/jax/webgl/framebuffer_spec.js
jax-2.0.2 spec/javascripts/jax/webgl/framebuffer_spec.js
jax-2.0.1 spec/javascripts/jax/webgl/framebuffer_spec.js
jax-2.0.0 spec/javascripts/jax/webgl/framebuffer_spec.js