Material.js 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. function Material() {
  2. }
  3. Material.prototype.addShaderPass = function(pass) {
  4. Polycode.Material_addShaderPass(this.__ptr, pass)
  5. }
  6. Material.prototype.addShaderPassAtIndex = function(pass,shaderIndex) {
  7. Polycode.Material_addShaderPassAtIndex(this.__ptr, pass,shaderIndex)
  8. }
  9. Material.prototype.addShader = function(shader,shaderBinding) {
  10. Polycode.Material_addShader(this.__ptr, shader,shaderBinding)
  11. }
  12. Material.prototype.addShaderAtIndex = function(shader,shaderBinding,shaderIndex) {
  13. Polycode.Material_addShaderAtIndex(this.__ptr, shader,shaderBinding,shaderIndex)
  14. }
  15. Material.prototype.getNumShaderPasses = function() {
  16. Polycode.Material_getNumShaderPasses(this.__ptr)
  17. }
  18. Material.prototype.removeShaderPass = function(shaderIndex) {
  19. Polycode.Material_removeShaderPass(this.__ptr, shaderIndex)
  20. }
  21. Material.prototype.recreateExpectedShaderParams = function() {
  22. Polycode.Material_recreateExpectedShaderParams(this.__ptr)
  23. }
  24. Material.prototype.addShaderRenderTarget = function(newTarget) {
  25. Polycode.Material_addShaderRenderTarget(this.__ptr, newTarget)
  26. }
  27. Material.prototype.getNumShaderRenderTargets = function() {
  28. Polycode.Material_getNumShaderRenderTargets(this.__ptr)
  29. }
  30. Material.prototype.getShaderRenderTarget = function(index) {
  31. Polycode.Material_getShaderRenderTarget(this.__ptr, index)
  32. }
  33. Material.prototype.removeShaderRenderTarget = function(index) {
  34. Polycode.Material_removeShaderRenderTarget(this.__ptr, index)
  35. }
  36. Material.prototype.recreateRenderTarget = function(renderTarget) {
  37. Polycode.Material_recreateRenderTarget(this.__ptr, renderTarget)
  38. }
  39. Material.prototype.recreateRenderTargets = function() {
  40. Polycode.Material_recreateRenderTargets(this.__ptr)
  41. }
  42. Material.prototype.getName = function() {
  43. Polycode.Material_getName(this.__ptr)
  44. }
  45. Material.prototype.getShaderPass = function(index) {
  46. Polycode.Material_getShaderPass(this.__ptr, index)
  47. }
  48. Material.prototype.getShaderBinding = function(index) {
  49. Polycode.Material_getShaderBinding(this.__ptr, index)
  50. }
  51. Material.prototype.getShader = function(index) {
  52. Polycode.Material_getShader(this.__ptr, index)
  53. }
  54. Material.prototype.loadMaterial = function(fileName) {
  55. Polycode.Material_loadMaterial(this.__ptr, fileName)
  56. }
  57. Material.prototype.setName = function(name) {
  58. Polycode.Material_setName(this.__ptr, name)
  59. }
  60. Material.prototype.clearShaders = function() {
  61. Polycode.Material_clearShaders(this.__ptr)
  62. }