RenderBuffer.js 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. function RenderBuffer(width,height,attachDepthBuffer,floatingPoint) {
  2. if(arguments[0] != "__skip_ptr__") {
  3. this.__ptr = Polycode.RenderBuffer(width,height,attachDepthBuffer,floatingPoint)
  4. }
  5. Object.defineProperties(this, {
  6. 'platformData': { enumerable: true, configurable: true, get: RenderBuffer.prototype.__get_platformData, set: RenderBuffer.prototype.__set_platformData},
  7. 'depthBufferPlatformData': { enumerable: true, configurable: true, get: RenderBuffer.prototype.__get_depthBufferPlatformData, set: RenderBuffer.prototype.__set_depthBufferPlatformData}
  8. })
  9. }
  10. RenderBuffer.prototype.__get_platformData = function() {
  11. var retVal = new RendererPlatformData("__skip_ptr__")
  12. retVal.__ptr = Polycode.RenderBuffer__get_platformData(this.__ptr)
  13. return retVal
  14. }
  15. RenderBuffer.prototype.__set_platformData = function(val) {
  16. Polycode.RenderBuffer__set_platformData(this.__ptr, val.__ptr)
  17. }
  18. RenderBuffer.prototype.__get_depthBufferPlatformData = function() {
  19. var retVal = new RendererPlatformData("__skip_ptr__")
  20. retVal.__ptr = Polycode.RenderBuffer__get_depthBufferPlatformData(this.__ptr)
  21. return retVal
  22. }
  23. RenderBuffer.prototype.__set_depthBufferPlatformData = function(val) {
  24. Polycode.RenderBuffer__set_depthBufferPlatformData(this.__ptr, val.__ptr)
  25. }
  26. Duktape.fin(RenderBuffer.prototype, function (x) {
  27. if (x === RenderBuffer.prototype) {
  28. return;
  29. }
  30. Polycode.RenderBuffer__delete(x.__ptr)
  31. })
  32. RenderBuffer.prototype.getWidth = function() {
  33. return Polycode.RenderBuffer_getWidth(this.__ptr)
  34. }
  35. RenderBuffer.prototype.getHeight = function() {
  36. return Polycode.RenderBuffer_getHeight(this.__ptr)
  37. }