Browse Source

Update isFormatSupported API;

bjorn 1 year ago
parent
commit
e89c753e1c
2 changed files with 20 additions and 5 deletions
  1. 7 2
      api/init.lua
  2. 13 3
      api/lovr/graphics/isFormatSupported.lua

+ 7 - 2
api/init.lua

@@ -11265,9 +11265,14 @@ return {
               },
               returns = {
                 {
-                  name = "supported",
+                  name = "linear",
                   type = "boolean",
-                  description = "Whether the GPU supports these operations for textures with this format."
+                  description = "Whether the GPU supports these operations for textures with this format, when created with the `linear` flag set to `true`."
+                },
+                {
+                  name = "srgb",
+                  type = "boolean",
+                  description = "Whether the GPU supports these operations for textures with this format, when created with the `linear` flag set to `false`."
                 }
               }
             }

+ 13 - 3
api/lovr/graphics/isFormatSupported.lua

@@ -17,15 +17,25 @@ return {
     }
   },
   returns = {
-    supported = {
+    linear = {
       type = 'boolean',
-      description = 'Whether the GPU supports these operations for textures with this format.'
+      description = [[
+        Whether the GPU supports these operations for textures with this format, when created with
+        the `linear` flag set to `true`.
+      ]]
+    },
+    srgb = {
+      type = 'boolean',
+      description = [[
+        Whether the GPU supports these operations for textures with this format, when created with
+        the `linear` flag set to `false`.
+      ]]
     }
   },
   variants = {
     {
       arguments = { 'format', '...features' },
-      returns = { 'supported' }
+      returns = { 'linear', 'srgb' }
     }
   },
   related = {