MaterialManager.js 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. function MaterialManager() {
  2. }
  3. MaterialManager.prototype.Update = function(elapsed) {
  4. Polycode.MaterialManager_Update(this.__ptr, elapsed)
  5. }
  6. MaterialManager.prototype.createTexture = function(width,height,imageData,clamp,createMipmaps,type) {
  7. Polycode.MaterialManager_createTexture(this.__ptr, width,height,imageData,clamp,createMipmaps,type)
  8. }
  9. MaterialManager.prototype.createNewTexture = function(width,height,clamp,createMipmaps,type) {
  10. Polycode.MaterialManager_createNewTexture(this.__ptr, width,height,clamp,createMipmaps,type)
  11. }
  12. MaterialManager.prototype.createTextureFromImage = function(image,clamp,createMipmaps) {
  13. Polycode.MaterialManager_createTextureFromImage(this.__ptr, image,clamp,createMipmaps)
  14. }
  15. MaterialManager.prototype.createTextureFromFile = function(fileName,clamp,createMipmaps,resourcePool) {
  16. Polycode.MaterialManager_createTextureFromFile(this.__ptr, fileName,clamp,createMipmaps,resourcePool)
  17. }
  18. MaterialManager.prototype.deleteTexture = function(texture) {
  19. Polycode.MaterialManager_deleteTexture(this.__ptr, texture)
  20. }
  21. MaterialManager.prototype.reloadTextures = function() {
  22. Polycode.MaterialManager_reloadTextures(this.__ptr)
  23. }
  24. MaterialManager.prototype.reloadProgramsAndTextures = function() {
  25. Polycode.MaterialManager_reloadProgramsAndTextures(this.__ptr)
  26. }
  27. MaterialManager.prototype.reloadPrograms = function() {
  28. Polycode.MaterialManager_reloadPrograms(this.__ptr)
  29. }
  30. MaterialManager.prototype.getTextureByResourcePath = function(resourcePath) {
  31. Polycode.MaterialManager_getTextureByResourcePath(this.__ptr, resourcePath)
  32. }
  33. MaterialManager.prototype.createProgramFromFile = function(programPath) {
  34. Polycode.MaterialManager_createProgramFromFile(this.__ptr, programPath)
  35. }
  36. MaterialManager.prototype.loadMaterialLibraryIntoPool = function(pool,materialFile) {
  37. Polycode.MaterialManager_loadMaterialLibraryIntoPool(this.__ptr, pool,materialFile)
  38. }
  39. MaterialManager.prototype.cubemapFromXMLNode = function(node) {
  40. Polycode.MaterialManager_cubemapFromXMLNode(this.__ptr, node)
  41. }
  42. MaterialManager.prototype.materialFromXMLNode = function(resourcePool,node) {
  43. Polycode.MaterialManager_materialFromXMLNode(this.__ptr, resourcePool,node)
  44. }
  45. MaterialManager.prototype.createMaterial = function(resourcePool,materialName,shaderName) {
  46. Polycode.MaterialManager_createMaterial(this.__ptr, resourcePool,materialName,shaderName)
  47. }
  48. MaterialManager.prototype.setShaderFromXMLNode = function(resourcePool,node) {
  49. Polycode.MaterialManager_setShaderFromXMLNode(this.__ptr, resourcePool,node)
  50. }
  51. MaterialManager.prototype.createShaderFromXMLNode = function(resourcePool,node) {
  52. Polycode.MaterialManager_createShaderFromXMLNode(this.__ptr, resourcePool,node)
  53. }
  54. MaterialManager.prototype.createShader = function(resourcePool,shaderType,name,vpName,fpName,screenShader) {
  55. Polycode.MaterialManager_createShader(this.__ptr, resourcePool,shaderType,name,vpName,fpName,screenShader)
  56. }
  57. MaterialManager.prototype.loadMaterialsFromFile = function(resourcePool,fileName) {
  58. Polycode.MaterialManager_loadMaterialsFromFile(this.__ptr, resourcePool,fileName)
  59. }
  60. MaterialManager.prototype.loadShadersFromFile = function(resourcePool,fileName) {
  61. Polycode.MaterialManager_loadShadersFromFile(this.__ptr, resourcePool,fileName)
  62. }
  63. MaterialManager.prototype.loadCubemapsFromFile = function(fileName) {
  64. Polycode.MaterialManager_loadCubemapsFromFile(this.__ptr, fileName)
  65. }
  66. MaterialManager.prototype.setAnisotropyAmount = function(anisotropy) {
  67. Polycode.MaterialManager_setAnisotropyAmount(this.__ptr, anisotropy)
  68. }
  69. MaterialManager.prototype.setTextureFilteringMode = function(textureFilteringMode) {
  70. Polycode.MaterialManager_setTextureFilteringMode(this.__ptr, textureFilteringMode)
  71. }
  72. MaterialManager.prototype.getTextureFilteringMode = function() {
  73. Polycode.MaterialManager_getTextureFilteringMode(this.__ptr)
  74. }
  75. MaterialManager.prototype.addMaterial = function(material) {
  76. Polycode.MaterialManager_addMaterial(this.__ptr, material)
  77. }
  78. MaterialManager.prototype.addShader = function(shader) {
  79. Polycode.MaterialManager_addShader(this.__ptr, shader)
  80. }
  81. MaterialManager.prototype.getNumShaders = function() {
  82. Polycode.MaterialManager_getNumShaders(this.__ptr)
  83. }
  84. MaterialManager.prototype.getShaderByIndex = function(index) {
  85. Polycode.MaterialManager_getShaderByIndex(this.__ptr, index)
  86. }