GPUDrawCall.js 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. function GPUDrawCall() {
  2. Object.defineProperties(this, {
  3. 'options': { enumerable: true, configurable: true, get: GPUDrawCall.prototype.__get_options, set: GPUDrawCall.prototype.__set_options},
  4. 'modelMatrix': { enumerable: true, configurable: true, get: GPUDrawCall.prototype.__get_modelMatrix, set: GPUDrawCall.prototype.__set_modelMatrix},
  5. 'material': { enumerable: true, configurable: true, get: GPUDrawCall.prototype.__get_material, set: GPUDrawCall.prototype.__set_material}
  6. })
  7. }
  8. GPUDrawCall.prototype.__get_options = function() {
  9. var retVal = new GPUDrawOptions()
  10. retVal.__ptr = Polycode.GPUDrawCall__get_options(this.__ptr)
  11. return retVal
  12. }
  13. GPUDrawCall.prototype.__set_options = function(val) {
  14. Polycode.GPUDrawCall__set_options(this.__ptr, val.__ptr)
  15. }
  16. GPUDrawCall.prototype.__get_modelMatrix = function() {
  17. var retVal = new Matrix4()
  18. retVal.__ptr = Polycode.GPUDrawCall__get_modelMatrix(this.__ptr)
  19. return retVal
  20. }
  21. GPUDrawCall.prototype.__set_modelMatrix = function(val) {
  22. Polycode.GPUDrawCall__set_modelMatrix(this.__ptr, val.__ptr)
  23. }
  24. GPUDrawCall.prototype.__get_material = function() {
  25. var retVal = new Material()
  26. retVal.__ptr = Polycode.GPUDrawCall__get_material(this.__ptr)
  27. return retVal
  28. }
  29. GPUDrawCall.prototype.__set_material = function(val) {
  30. Polycode.GPUDrawCall__set_material(this.__ptr, val.__ptr)
  31. }
  32. Duktape.fin(GPUDrawCall.prototype, function (x) {
  33. if (x === GPUDrawCall.prototype) {
  34. return;
  35. }
  36. Polycode.GPUDrawCall__delete(x.__ptr)
  37. })