bjorn 8 mesiacov pred
rodič
commit
b1f1ba8cac

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 1 - 1
api/init.lua


+ 1 - 1
api/lovr/callbacks/conf.lua

@@ -323,7 +323,7 @@ return {
           t.graphics.shadercache = true
 
           -- Headset settings
-          t.headset.drivers = { 'openxr', 'desktop' }
+          t.headset.drivers = { 'openxr', 'simulator' }
           t.headset.supersample = false
           t.headset.seated = false
           t.headset.antialias = true

+ 1 - 1
api/lovr/callbacks/errhand.lua

@@ -79,7 +79,7 @@ return {
             elseif name == 'keypressed' and a == 'escape' then lovr.event.quit() end
           end
 
-          if lovr.headset and lovr.headset.getDriver() ~= 'desktop' then
+          if lovr.headset and lovr.headset.getDriver() ~= 'simulator' then
             lovr.headset.update()
             local pass = lovr.headset.getPass()
             if pass then

+ 3 - 22
api/lovr/graphics/Pass/send.lua

@@ -10,10 +10,6 @@ return {
       type = 'string',
       description = 'The name of the Shader variable.'
     },
-    binding = {
-      type = 'number',
-      description = 'The binding number of the Shader variable.'
-    },
     buffer = {
       type = 'Buffer',
       description = 'The Buffer to assign.'
@@ -40,9 +36,9 @@ return {
       type = 'Sampler',
       description = 'The Sampler to assign.'
     },
-    constant = {
+    data = {
       type = '*',
-      description = 'Numbers, vectors, or tables to assign to the constant or uniform buffer.'
+      description = 'Numbers, booleans, vectors, or tables to assign to the data or uniform buffer.'
     }
   },
   returns = {},
@@ -60,26 +56,11 @@ return {
       returns = {}
     },
     {
-      arguments = { 'name', 'constant' },
-      returns = {}
-    },
-    {
-      arguments = { 'binding', 'buffer', 'offset', 'extent' },
-      returns = {}
-    },
-    {
-      arguments = { 'binding', 'texture' },
-      returns = {}
-    },
-    {
-      arguments = { 'binding', 'sampler' },
+      arguments = { 'name', 'data' },
       returns = {}
     }
   },
   notes = [[
-    Shader variables can be in different "sets".  Variables changed by this function must be in set
-    #2, because LÖVR uses set #0 and set #1 internally.
-
     The new value will persist until a new shader is set that uses a different "type" for the
     binding number of the variable.  See `Pass:setShader` for more details.
   ]],

+ 5 - 1
api/lovr/graphics/Texture/getFormat.lua

@@ -7,12 +7,16 @@ return {
     format = {
       type = 'TextureFormat',
       description = 'The format of the Texture.'
+    },
+    linear = {
+      type = 'boolean',
+      description = 'Whether the format is linear or srgb.'
     }
   },
   variants = {
     {
       arguments = {},
-      returns = { 'format' }
+      returns = { 'format', 'linear' }
     }
   }
 }

+ 8 - 21
api/lovr/graphics/TextureFeature.lua

@@ -9,36 +9,23 @@ return {
     {
       name = 'sample',
       description = [[
-        The Texture can be sampled (e.g. a `texture2D` or `sampler2D` variable in shaders).
+        The Texture can be sampled (e.g. used in a `Material` or sent to a `texture2D` variable in
+        shaders).
       ]]
     },
-    {
-      name = 'filter',
-      description = 'The Texture can be used with a `Sampler` using a `FilterMode` of `linear`.'
-    },
     {
       name = 'render',
-      description = 'The Texture can be rendered to by using it as a target in a render `Pass`.'
-    },
-    {
-      name = 'blend',
-      description = 'Blending can be enabled when rendering to this format in a render pass.'
+      description = 'The Texture can used as a canvas in a `Pass`.'
     },
     {
       name = 'storage',
-      description = 'The Texture can be sent to an image variable in shaders (e.g. `image2D`).'
-    },
-    {
-      name = 'atomic',
-      description = 'Atomic operations can be used on storage textures with this format.'
-    },
-    {
-      name = 'blitsrc',
-      description = 'Source textures in `Pass:blit` can use this format.'
+      description = [[
+        The Texture can be sent to a storage image variable in shaders (e.g. `image2D`).
+      ]]
     },
     {
-      name = 'blitdst',
-      description = 'Destination textures in `Pass:blit` can use this format.'
+      name = 'blit',
+      description = 'The Texture can be used with `Pass:blit` and `Pass:generateMipmaps`.'
     }
   }
 }

+ 1 - 1
api/lovr/headset/HeadsetDriver.lua

@@ -8,7 +8,7 @@ return {
   ]],
   values = {
     {
-      name = 'desktop',
+      name = 'simulator',
       description = 'A VR simulator using keyboard/mouse.'
     },
     {

+ 1 - 1
api/lovr/headset/getName.lua

@@ -18,5 +18,5 @@ return {
       returns = { 'name' }
     }
   },
-  notes = 'The desktop driver name will always be `Simulator`.'
+  notes = 'The simulator driver name will always be `Simulator`.'
 }

+ 1 - 1
examples/Flatscreen/Window_HUD/main.lua

@@ -1,6 +1,6 @@
 -- "Second screen experience" demo
 -- Click grid on desktop screen to build a scene simultaneously visible in VR space
--- NOTE: does not currently work properly with the desktop driver, since lovr.mirror clears the window
+-- NOTE: does not currently work properly with the simluator driver, since lovr.mirror clears the window
 --
 -- Sample contributed by andi mcc
 

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov