Преглед изворни кода

ShaderBlock has 2 offset parameters now;

bjorn пре 3 година
родитељ
комит
34648f8dba
1 измењених фајлова са 8 додато и 3 уклоњено
  1. 8 3
      api/lovr/graphics/ShaderBlock/send.lua

+ 8 - 3
api/lovr/graphics/ShaderBlock/send.lua

@@ -14,10 +14,15 @@ return {
       type = 'Blob',
       description = 'A Blob to replace the block data with.'
     },
-    offset = {
+    srcOffset = {
       type = 'number',
       default = '0',
-      description = 'A byte offset into the Blob to start writing from.'
+      description = 'A byte offset into the Blob to start reading from.'
+    },
+    dstOffset = {
+      type = 'number',
+      default = '0',
+      description = 'A byte offset into the ShaderBlock to start writing to.'
     },
     extent = {
       type = 'number',
@@ -37,7 +42,7 @@ return {
       returns = {}
     },
     {
-      arguments = { 'blob', 'offset', 'extent' },
+      arguments = { 'blob', 'srcOffset', 'dstOffset', 'extent' },
       returns = { 'bytes' }
     }
   },