GPUDrawBuffer.js 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. function GPUDrawBuffer() {
  2. if(arguments[0] != "__skip_ptr__") {
  3. this.__ptr = Polycode.GPUDrawBuffer()
  4. }
  5. Object.defineProperties(this, {
  6. 'projectionMatrix': { enumerable: true, configurable: true, get: GPUDrawBuffer.prototype.__get_projectionMatrix, set: GPUDrawBuffer.prototype.__set_projectionMatrix},
  7. 'viewMatrix': { enumerable: true, configurable: true, get: GPUDrawBuffer.prototype.__get_viewMatrix, set: GPUDrawBuffer.prototype.__set_viewMatrix},
  8. 'cameraMatrix': { enumerable: true, configurable: true, get: GPUDrawBuffer.prototype.__get_cameraMatrix, set: GPUDrawBuffer.prototype.__set_cameraMatrix},
  9. 'clearColor': { enumerable: true, configurable: true, get: GPUDrawBuffer.prototype.__get_clearColor, set: GPUDrawBuffer.prototype.__set_clearColor},
  10. 'clearDepthBuffer': { enumerable: true, configurable: true, get: GPUDrawBuffer.prototype.__get_clearDepthBuffer, set: GPUDrawBuffer.prototype.__set_clearDepthBuffer},
  11. 'clearColorBuffer': { enumerable: true, configurable: true, get: GPUDrawBuffer.prototype.__get_clearColorBuffer, set: GPUDrawBuffer.prototype.__set_clearColorBuffer},
  12. 'backingResolutionScale': { enumerable: true, configurable: true, get: GPUDrawBuffer.prototype.__get_backingResolutionScale, set: GPUDrawBuffer.prototype.__set_backingResolutionScale},
  13. 'viewport': { enumerable: true, configurable: true, get: GPUDrawBuffer.prototype.__get_viewport, set: GPUDrawBuffer.prototype.__set_viewport}
  14. })
  15. }
  16. GPUDrawBuffer.prototype.__get_projectionMatrix = function() {
  17. var retVal = new Matrix4()
  18. retVal.__ptr = Polycode.GPUDrawBuffer__get_projectionMatrix(this.__ptr)
  19. return retVal
  20. }
  21. GPUDrawBuffer.prototype.__set_projectionMatrix = function(val) {
  22. Polycode.GPUDrawBuffer__set_projectionMatrix(this.__ptr, val.__ptr)
  23. }
  24. GPUDrawBuffer.prototype.__get_viewMatrix = function() {
  25. var retVal = new Matrix4()
  26. retVal.__ptr = Polycode.GPUDrawBuffer__get_viewMatrix(this.__ptr)
  27. return retVal
  28. }
  29. GPUDrawBuffer.prototype.__set_viewMatrix = function(val) {
  30. Polycode.GPUDrawBuffer__set_viewMatrix(this.__ptr, val.__ptr)
  31. }
  32. GPUDrawBuffer.prototype.__get_cameraMatrix = function() {
  33. var retVal = new Matrix4()
  34. retVal.__ptr = Polycode.GPUDrawBuffer__get_cameraMatrix(this.__ptr)
  35. return retVal
  36. }
  37. GPUDrawBuffer.prototype.__set_cameraMatrix = function(val) {
  38. Polycode.GPUDrawBuffer__set_cameraMatrix(this.__ptr, val.__ptr)
  39. }
  40. GPUDrawBuffer.prototype.__get_clearColor = function() {
  41. var retVal = new Color()
  42. retVal.__ptr = Polycode.GPUDrawBuffer__get_clearColor(this.__ptr)
  43. return retVal
  44. }
  45. GPUDrawBuffer.prototype.__set_clearColor = function(val) {
  46. Polycode.GPUDrawBuffer__set_clearColor(this.__ptr, val.__ptr)
  47. }
  48. GPUDrawBuffer.prototype.__get_clearDepthBuffer = function() {
  49. return Polycode.GPUDrawBuffer__get_clearDepthBuffer(this.__ptr)
  50. }
  51. GPUDrawBuffer.prototype.__set_clearDepthBuffer = function(val) {
  52. Polycode.GPUDrawBuffer__set_clearDepthBuffer(this.__ptr, val)
  53. }
  54. GPUDrawBuffer.prototype.__get_clearColorBuffer = function() {
  55. return Polycode.GPUDrawBuffer__get_clearColorBuffer(this.__ptr)
  56. }
  57. GPUDrawBuffer.prototype.__set_clearColorBuffer = function(val) {
  58. Polycode.GPUDrawBuffer__set_clearColorBuffer(this.__ptr, val)
  59. }
  60. GPUDrawBuffer.prototype.__get_backingResolutionScale = function() {
  61. var retVal = new Vector2()
  62. retVal.__ptr = Polycode.GPUDrawBuffer__get_backingResolutionScale(this.__ptr)
  63. return retVal
  64. }
  65. GPUDrawBuffer.prototype.__set_backingResolutionScale = function(val) {
  66. Polycode.GPUDrawBuffer__set_backingResolutionScale(this.__ptr, val.__ptr)
  67. }
  68. GPUDrawBuffer.prototype.__get_viewport = function() {
  69. var retVal = new Rectangle()
  70. retVal.__ptr = Polycode.GPUDrawBuffer__get_viewport(this.__ptr)
  71. return retVal
  72. }
  73. GPUDrawBuffer.prototype.__set_viewport = function(val) {
  74. Polycode.GPUDrawBuffer__set_viewport(this.__ptr, val.__ptr)
  75. }
  76. Duktape.fin(GPUDrawBuffer.prototype, function (x) {
  77. if (x === GPUDrawBuffer.prototype) {
  78. return;
  79. }
  80. Polycode.GPUDrawBuffer__delete(x.__ptr)
  81. })