2
0

GPUDrawBuffer.js 4.7 KB

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