RenderThread.js 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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.enqueueFrame = function(frame) {
  16. Polycode.RenderThread_enqueueFrame(this.__ptr, frame)
  17. }
  18. RenderThread.prototype.enqueueJob = function(jobType,data,data2) {
  19. Polycode.RenderThread_enqueueJob(this.__ptr, jobType,data,data2)
  20. }
  21. RenderThread.prototype.processJob = function(job) {
  22. Polycode.RenderThread_processJob(this.__ptr, job)
  23. }
  24. RenderThread.prototype.getShaderBinding = function() {
  25. var retVal = new ShaderBinding()
  26. retVal.__ptr = Polycode.RenderThread_getShaderBinding(this.__ptr)
  27. return retVal
  28. }
  29. RenderThread.prototype.processDrawBufferLights = function(buffer) {
  30. Polycode.RenderThread_processDrawBufferLights(this.__ptr, buffer)
  31. }
  32. RenderThread.prototype.processDrawBuffer = function(buffer) {
  33. Polycode.RenderThread_processDrawBuffer(this.__ptr, buffer)
  34. }
  35. RenderThread.prototype.getFrameInfo = function() {
  36. var retVal = new RenderThreadDebugInfo()
  37. retVal.__ptr = Polycode.RenderThread_getFrameInfo(this.__ptr)
  38. return retVal
  39. }
  40. RenderThread.prototype.clearFrameQueue = function() {
  41. Polycode.RenderThread_clearFrameQueue(this.__ptr)
  42. }
  43. RenderThread.prototype.initGlobals = function() {
  44. Polycode.RenderThread_initGlobals(this.__ptr)
  45. }
  46. RenderThread.prototype.lockRenderMutex = function() {
  47. Polycode.RenderThread_lockRenderMutex(this.__ptr)
  48. }
  49. RenderThread.prototype.unlockRenderMutex = function() {
  50. Polycode.RenderThread_unlockRenderMutex(this.__ptr)
  51. }