Renderer.js 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. function Renderer() {
  2. }
  3. Duktape.fin(Renderer.prototype, function (x) {
  4. if (x === Renderer.prototype) {
  5. return;
  6. }
  7. Polycode.Renderer__delete(x.__ptr)
  8. })
  9. Renderer.prototype.setGraphicsInterface = function(core,graphicsInterface) {
  10. Polycode.Renderer_setGraphicsInterface(this.__ptr, core,graphicsInterface)
  11. }
  12. Renderer.prototype.getRenderThread = function() {
  13. var retVal = new RenderThread()
  14. retVal.__ptr = Polycode.Renderer_getRenderThread(this.__ptr)
  15. return retVal
  16. }
  17. Renderer.prototype.processDrawBuffer = function(buffer) {
  18. Polycode.Renderer_processDrawBuffer(this.__ptr, buffer)
  19. }
  20. Renderer.prototype.setBackingResolutionScale = function(xScale,yScale) {
  21. Polycode.Renderer_setBackingResolutionScale(this.__ptr, xScale,yScale)
  22. }
  23. Renderer.prototype.getBackingResolutionScaleX = function() {
  24. return Polycode.Renderer_getBackingResolutionScaleX(this.__ptr)
  25. }
  26. Renderer.prototype.getBackingResolutionScaleY = function() {
  27. return Polycode.Renderer_getBackingResolutionScaleY(this.__ptr)
  28. }
  29. Renderer.prototype.enqueueFrameJob = function(jobType,data) {
  30. Polycode.Renderer_enqueueFrameJob(this.__ptr, jobType,data)
  31. }
  32. Renderer.prototype.destroyRenderBufferPlatformData = function(platformData) {
  33. Polycode.Renderer_destroyRenderBufferPlatformData(this.__ptr, platformData)
  34. }
  35. Renderer.prototype.destroyTexturePlatformData = function(platformData) {
  36. Polycode.Renderer_destroyTexturePlatformData(this.__ptr, platformData)
  37. }
  38. Renderer.prototype.destroyProgramPlatformData = function(platformData) {
  39. Polycode.Renderer_destroyProgramPlatformData(this.__ptr, platformData)
  40. }
  41. Renderer.prototype.destroyShaderPlatformData = function(platformData) {
  42. Polycode.Renderer_destroyShaderPlatformData(this.__ptr, platformData)
  43. }
  44. Renderer.prototype.destroySubmeshPlatformData = function(platformData) {
  45. Polycode.Renderer_destroySubmeshPlatformData(this.__ptr, platformData)
  46. }
  47. Renderer.prototype.setTextureParam = function(param,texture) {
  48. Polycode.Renderer_setTextureParam(this.__ptr, param,texture)
  49. }
  50. Renderer.prototype.setAnisotropyAmount = function(amount) {
  51. Polycode.Renderer_setAnisotropyAmount(this.__ptr, amount)
  52. }
  53. Renderer.prototype.getAnisotropyAmount = function() {
  54. return Polycode.Renderer_getAnisotropyAmount(this.__ptr)
  55. }
  56. Renderer.prototype.beginFrame = function() {
  57. Polycode.Renderer_beginFrame(this.__ptr)
  58. }
  59. Renderer.prototype.endFrame = function() {
  60. Polycode.Renderer_endFrame(this.__ptr)
  61. }