RenderThread.js 1.9 KB

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