Browse Source

Misc graphics;

bjorn 7 years ago
parent
commit
93eff6b92c

+ 6 - 0
api/lovr/callbacks/conf.lua

@@ -34,6 +34,11 @@ return {
                 Whether the desktop window should display a mirror of what's in the headset.
               ]]
             },
+            {
+              name = 'msaa',
+              type = 'number',
+              description = 'The amount of antialiasing to use when rendering to the headset.'
+            },
             {
               name = 'offset',
               type = 'number',
@@ -170,6 +175,7 @@ return {
           -- Headset settings
           t.headset.drivers = { 'openvr', 'webvr', 'fake' }
           t.headset.mirror = true
+          t.headset.msaa = 4
           t.headset.offset = 1.7
 
           -- Enable or disable different modules

+ 30 - 0
api/lovr/graphics/getSupported.lua

@@ -0,0 +1,30 @@
+return {
+  tag = 'window',
+  summary = 'Check if certain features are supported.',
+  description = [[
+    Returns whether certain features are supported by the system\'s graphics card.
+  ]],
+  arguments = {},
+  returns = {
+    {
+      name = 'features',
+      type = 'table',
+      description = 'A table of features and whether or not they are supported.',
+      table = {
+        {
+          name = 'writableblocks',
+          type = 'boolean',
+          description = 'Whether ShaderBlock objects can be created with the \'writable\' flag.'
+        },
+        {
+          name = 'computeshaders',
+          type = 'boolean',
+          description = 'Whether compute shaders are available.'
+        }
+      }
+    }
+  },
+  related = {
+    'lovr.graphics.getSystemLimits'
+  }
+}

+ 4 - 1
api/lovr/graphics/getSystemLimits.lua

@@ -1,5 +1,5 @@
 return {
-  tag = 'graphicsState',
+  tag = 'window',
   summary = 'Get capabilities of the graphics card.',
   description = [[
     Returns information about the capabilities of the graphics card, such as the maximum texture
@@ -29,5 +29,8 @@ return {
         }
       }
     }
+  },
+  related = {
+    'lovr.graphics.getSupported'
   }
 }