RenderThread.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. function RenderThread() {
  2. }
  3. RenderThread.prototype.setGraphicsInterface = function(core,graphicsInterface) {
  4. Polycode.RenderThread_setGraphicsInterface(this.__ptr, core,graphicsInterface)
  5. }
  6. RenderThread.prototype.runThread = function() {
  7. Polycode.RenderThread_runThread(this.__ptr)
  8. }
  9. RenderThread.prototype.enqueueFrame = function(frame) {
  10. Polycode.RenderThread_enqueueFrame(this.__ptr, frame)
  11. }
  12. RenderThread.prototype.enqueueJob = function(jobType,data,data2) {
  13. Polycode.RenderThread_enqueueJob(this.__ptr, jobType,data,data2)
  14. }
  15. RenderThread.prototype.processJob = function(job) {
  16. Polycode.RenderThread_processJob(this.__ptr, job)
  17. }
  18. RenderThread.prototype.getShaderBinding = function() {
  19. var retVal = new ShaderBinding()
  20. retVal.__ptr = Polycode.RenderThread_getShaderBinding(this.__ptr)
  21. return retVal
  22. }
  23. RenderThread.prototype.processDrawBuffer = function(buffer) {
  24. Polycode.RenderThread_processDrawBuffer(this.__ptr, buffer)
  25. }
  26. RenderThread.prototype.getFrameInfo = function() {
  27. var retVal = new RenderThreadDebugInfo()
  28. retVal.__ptr = Polycode.RenderThread_getFrameInfo(this.__ptr)
  29. return retVal
  30. }
  31. RenderThread.prototype.clearFrameQueue = function() {
  32. Polycode.RenderThread_clearFrameQueue(this.__ptr)
  33. }
  34. RenderThread.prototype.initGlobals = function() {
  35. Polycode.RenderThread_initGlobals(this.__ptr)
  36. }
  37. RenderThread.prototype.lockRenderMutex = function() {
  38. Polycode.RenderThread_lockRenderMutex(this.__ptr)
  39. }
  40. RenderThread.prototype.unlockRenderMutex = function() {
  41. Polycode.RenderThread_unlockRenderMutex(this.__ptr)
  42. }