Texture.js 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. function Texture() {
  2. Object.defineProperties(this, {
  3. 'clamp': { enumerable: true, configurable: true, get: Texture.prototype.__get_clamp, set: Texture.prototype.__set_clamp},
  4. 'textureData': { enumerable: true, configurable: true, get: Texture.prototype.__get_textureData, set: Texture.prototype.__set_textureData},
  5. 'type': { enumerable: true, configurable: true, get: Texture.prototype.__get_type, set: Texture.prototype.__set_type},
  6. 'filteringMode': { enumerable: true, configurable: true, get: Texture.prototype.__get_filteringMode, set: Texture.prototype.__set_filteringMode},
  7. 'createMipmaps': { enumerable: true, configurable: true, get: Texture.prototype.__get_createMipmaps, set: Texture.prototype.__set_createMipmaps},
  8. 'anisotropy': { enumerable: true, configurable: true, get: Texture.prototype.__get_anisotropy, set: Texture.prototype.__set_anisotropy},
  9. 'framebufferTexture': { enumerable: true, configurable: true, get: Texture.prototype.__get_framebufferTexture, set: Texture.prototype.__set_framebufferTexture},
  10. 'depthTexture': { enumerable: true, configurable: true, get: Texture.prototype.__get_depthTexture, set: Texture.prototype.__set_depthTexture}
  11. })
  12. }
  13. Texture.prototype.__get_clamp = function() {
  14. return Polycode.Texture__get_clamp(this.__ptr)
  15. }
  16. Texture.prototype.__set_clamp = function(val) {
  17. Polycode.Texture__set_clamp(this.__ptr, val)
  18. }
  19. Texture.prototype.__get_textureData = function() {
  20. var retVal = new char()
  21. retVal.__ptr = Polycode.Texture__get_textureData(this.__ptr)
  22. return retVal
  23. }
  24. Texture.prototype.__set_textureData = function(val) {
  25. Polycode.Texture__set_textureData(this.__ptr, val.__ptr)
  26. }
  27. Texture.prototype.__get_type = function() {
  28. return Polycode.Texture__get_type(this.__ptr)
  29. }
  30. Texture.prototype.__set_type = function(val) {
  31. Polycode.Texture__set_type(this.__ptr, val)
  32. }
  33. Texture.prototype.__get_filteringMode = function() {
  34. return Polycode.Texture__get_filteringMode(this.__ptr)
  35. }
  36. Texture.prototype.__set_filteringMode = function(val) {
  37. Polycode.Texture__set_filteringMode(this.__ptr, val)
  38. }
  39. Texture.prototype.__get_createMipmaps = function() {
  40. return Polycode.Texture__get_createMipmaps(this.__ptr)
  41. }
  42. Texture.prototype.__set_createMipmaps = function(val) {
  43. Polycode.Texture__set_createMipmaps(this.__ptr, val)
  44. }
  45. Texture.prototype.__get_anisotropy = function() {
  46. return Polycode.Texture__get_anisotropy(this.__ptr)
  47. }
  48. Texture.prototype.__set_anisotropy = function(val) {
  49. Polycode.Texture__set_anisotropy(this.__ptr, val)
  50. }
  51. Texture.prototype.__get_framebufferTexture = function() {
  52. return Polycode.Texture__get_framebufferTexture(this.__ptr)
  53. }
  54. Texture.prototype.__set_framebufferTexture = function(val) {
  55. Polycode.Texture__set_framebufferTexture(this.__ptr, val)
  56. }
  57. Texture.prototype.__get_depthTexture = function() {
  58. return Polycode.Texture__get_depthTexture(this.__ptr)
  59. }
  60. Texture.prototype.__set_depthTexture = function(val) {
  61. Polycode.Texture__set_depthTexture(this.__ptr, val)
  62. }
  63. Texture.prototype.reloadResource = function() {
  64. Polycode.Texture_reloadResource(this.__ptr)
  65. }
  66. Texture.prototype.setImageData = function(data) {
  67. Polycode.Texture_setImageData(this.__ptr, data)
  68. }
  69. Texture.prototype.getTextureData = function() {
  70. var retVal = new char()
  71. retVal.__ptr = Polycode.Texture_getTextureData(this.__ptr)
  72. return retVal
  73. }
  74. Texture.prototype.getWidth = function() {
  75. return Polycode.Texture_getWidth(this.__ptr)
  76. }
  77. Texture.prototype.getHeight = function() {
  78. return Polycode.Texture_getHeight(this.__ptr)
  79. }
  80. Texture.prototype.setCreateMipmaps = function(createMipmapsIn) {
  81. Polycode.Texture_setCreateMipmaps(this.__ptr, createMipmapsIn)
  82. }
  83. Texture.prototype.getCreateMipmaps = function() {
  84. return Polycode.Texture_getCreateMipmaps(this.__ptr)
  85. }