GPUDrawBuffer.js 3.8 KB

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