babylon.nullEngine.ts 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. module BABYLON {
  2. /**
  3. * The null engine class provides support for headless version of babylon.js.
  4. * This can be used in server side scenario or for testing purposes
  5. */
  6. export class NullEngine extends Engine {
  7. public constructor() {
  8. super(null);
  9. // Init caps
  10. // We consider we are on a webgl1 capable device
  11. this._caps = new EngineCapabilities();
  12. this._caps.maxTexturesImageUnits = 16;
  13. this._caps.maxVertexTextureImageUnits = 16;
  14. this._caps.maxTextureSize = 512;
  15. this._caps.maxCubemapTextureSize = 512;
  16. this._caps.maxRenderTextureSize = 512;
  17. this._caps.maxVertexAttribs = 16;
  18. this._caps.maxVaryingVectors = 16;
  19. this._caps.maxFragmentUniformVectors = 16;
  20. this._caps.maxVertexUniformVectors = 16;
  21. // Extensions
  22. this._caps.standardDerivatives = false;
  23. this._caps.astc = null;
  24. this._caps.s3tc = null;
  25. this._caps.pvrtc = null;
  26. this._caps.etc1 = null;
  27. this._caps.etc2 = null;
  28. this._caps.textureAnisotropicFilterExtension = null;
  29. this._caps.maxAnisotropy = 0;
  30. this._caps.uintIndices = false;
  31. this._caps.fragmentDepthSupported = false;
  32. this._caps.highPrecisionShaderSupported = true;
  33. this._caps.colorBufferFloat = false;
  34. this._caps.textureFloat = false;
  35. this._caps.textureFloatLinearFiltering = false;
  36. this._caps.textureFloatRender = false;
  37. this._caps.textureHalfFloat = false;
  38. this._caps.textureHalfFloatLinearFiltering = false;
  39. this._caps.textureHalfFloatRender = false;
  40. this._caps.textureLOD = false;
  41. this._caps.drawBuffersExtension = false;
  42. this._caps.depthTextureExtension = false;
  43. this._caps.vertexArrayObject = false;
  44. this._caps.instancedArrays = false;
  45. }
  46. }
  47. }