RenderThread.js 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. function RenderThread() {
  2. if(arguments[0] != "__skip_ptr__") {
  3. this.__ptr = Polycode.RenderThread()
  4. }
  5. }
  6. Duktape.fin(RenderThread.prototype, function (x) {
  7. if (x === RenderThread.prototype) {
  8. return;
  9. }
  10. Polycode.RenderThread__delete(x.__ptr)
  11. })
  12. RenderThread.prototype.setGraphicsInterface = function(core,graphicsInterface) {
  13. Polycode.RenderThread_setGraphicsInterface(this.__ptr, core.__ptr, graphicsInterface.__ptr)
  14. }
  15. RenderThread.prototype.runThread = function() {
  16. Polycode.RenderThread_runThread(this.__ptr)
  17. }
  18. RenderThread.prototype.updateRenderThread = function() {
  19. Polycode.RenderThread_updateRenderThread(this.__ptr)
  20. }
  21. RenderThread.prototype.enqueueFrame = function(frame) {
  22. Polycode.RenderThread_enqueueFrame(this.__ptr, frame.__ptr)
  23. }
  24. RenderThread.prototype.enqueueJob = function(jobType,data,data2) {
  25. Polycode.RenderThread_enqueueJob(this.__ptr, jobType, data.__ptr, data2.__ptr)
  26. }
  27. RenderThread.prototype.processJob = function(job) {
  28. Polycode.RenderThread_processJob(this.__ptr, job)
  29. }
  30. RenderThread.prototype.clearFrameQueue = function() {
  31. Polycode.RenderThread_clearFrameQueue(this.__ptr)
  32. }
  33. RenderThread.prototype.getShaderBinding = function() {
  34. var retVal = new ShaderBinding()
  35. retVal.__ptr = Polycode.RenderThread_getShaderBinding(this.__ptr)
  36. return retVal
  37. }
  38. RenderThread.prototype.processDrawBufferLights = function(buffer) {
  39. Polycode.RenderThread_processDrawBufferLights(this.__ptr, buffer.__ptr)
  40. }
  41. RenderThread.prototype.processDrawBuffer = function(buffer) {
  42. Polycode.RenderThread_processDrawBuffer(this.__ptr, buffer.__ptr)
  43. }
  44. RenderThread.prototype.getFrameInfo = function() {
  45. var retVal = new RenderThreadDebugInfo()
  46. retVal.__ptr = Polycode.RenderThread_getFrameInfo(this.__ptr)
  47. return retVal
  48. }
  49. RenderThread.prototype.initGlobals = function() {
  50. Polycode.RenderThread_initGlobals(this.__ptr)
  51. }
  52. RenderThread.prototype.lockRenderMutex = function() {
  53. Polycode.RenderThread_lockRenderMutex(this.__ptr)
  54. }
  55. RenderThread.prototype.unlockRenderMutex = function() {
  56. Polycode.RenderThread_unlockRenderMutex(this.__ptr)
  57. }