Browse Source

t.graphics.debug;

bjorn 4 years ago
parent
commit
4ea9ed3d95
2 changed files with 8 additions and 14 deletions
  1. 2 7
      api/init.lua
  2. 6 7
      api/lovr/callbacks/conf.lua

+ 2 - 7
api/init.lua

@@ -20,11 +20,6 @@ return {
                   type = "string",
                   description = "A unique label for this project."
                 },
-                {
-                  name = "hotkeys",
-                  type = "boolean",
-                  description = "Whether to enable the default hotkeys (F5 to restart, Esc to quit)."
-                },
                 {
                   name = "headset",
                   type = "table",
@@ -175,10 +170,10 @@ return {
       examples = {
         {
           description = "A noop conf.lua that sets all configuration settings to their defaults:",
-          code = "function lovr.conf(t)\n\n  -- Set the project identity\n  t.identity = 'default'\n\n  -- Hotkeys\n  t.hotkeys = true\n\n  -- Headset settings\n  t.headset.drivers = { 'openxr', 'oculus', 'vrapi', 'openvr', 'webxr', 'desktop' }\n  t.headset.msaa = 4\n  t.headset.offset = 1.7\n\n  -- Math settings\n  t.math.globals = true\n\n  -- Enable or disable different modules\n  t.modules.audio = true\n  t.modules.data = true\n  t.modules.event = true\n  t.modules.graphics = true\n  t.modules.headset = true\n  t.modules.math = true\n  t.modules.physics = true\n  t.modules.thread = true\n  t.modules.timer = true\n\n  -- Configure the desktop window\n  t.window.width = 1080\n  t.window.height = 600\n  t.window.fullscreen = false\n  t.window.msaa = 0\n  t.window.vsync = 1\n  t.window.title = 'LÖVR'\n  t.window.icon = nil\nend"
+          code = "function lovr.conf(t)\n\n  -- Set the project identity\n  t.identity = 'default'\n\n  -- Graphics\n  t.graphics.debug = false\n\n  -- Headset settings\n  t.headset.drivers = { 'openxr', 'oculus', 'vrapi', 'openvr', 'webxr', 'desktop' }\n  t.headset.msaa = 4\n  t.headset.offset = 1.7\n\n  -- Math settings\n  t.math.globals = true\n\n  -- Enable or disable different modules\n  t.modules.audio = true\n  t.modules.data = true\n  t.modules.event = true\n  t.modules.graphics = true\n  t.modules.headset = true\n  t.modules.math = true\n  t.modules.physics = true\n  t.modules.thread = true\n  t.modules.timer = true\n\n  -- Configure the desktop window\n  t.window.width = 1080\n  t.window.height = 600\n  t.window.fullscreen = false\n  t.window.msaa = 0\n  t.window.vsync = 1\n  t.window.title = 'LÖVR'\n  t.window.icon = nil\nend"
         }
       },
-      notes = "Disabling the `headset` module can improve startup time a lot if you aren't intending to use `lovr.headset`.\n\nYou can set `t.window` to nil to avoid creating the window. You can do it yourself later by using `lovr.graphics.createWindow`.\n\nIf the `lovr.graphics` module is disabled or the window isn't created, attempting to use any functionality requiring graphics may cause a crash.\n\nThe `headset.offset` field is a vertical offset applied to the scene for headsets that do not center their tracking origin on the floor.  This can be thought of as a \"default user height\". Setting this offset makes it easier to design experiences that work in both seated and standing VR configurations."
+      notes = "Disabling the `headset` module can improve startup time a lot if you aren't intending to use `lovr.headset`.\n\nYou can set `t.window` to nil to avoid creating the window. You can do it yourself later by using `lovr.graphics.createWindow`.\n\nIf the `lovr.graphics` module is disabled or the window isn't created, attempting to use any functionality requiring graphics may cause a crash.\n\nEnabling the `t.graphics.debug` flag will add additional error checks and will send messages from the GPU driver to the `lovr.log` callback.  This will decrease performance but can help provide information on performance problems or other bugs.\n\nThe `headset.offset` field is a vertical offset applied to the scene for headsets that do not center their tracking origin on the floor.  This can be thought of as a \"default user height\". Setting this offset makes it easier to design experiences that work in both seated and standing VR configurations."
     },
     {
       name = "draw",

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

@@ -17,11 +17,6 @@ return {
           type = 'string',
           description = 'A unique label for this project.'
         },
-        {
-          name = 'hotkeys',
-          type = 'boolean',
-          description = 'Whether to enable the default hotkeys (F5 to restart, Esc to quit).'
-        },
         {
           name = 'headset',
           type = 'table',
@@ -174,6 +169,10 @@ return {
     If the `lovr.graphics` module is disabled or the window isn't created, attempting to use any
     functionality requiring graphics may cause a crash.
 
+    Enabling the `t.graphics.debug` flag will add additional error checks and will send messages
+    from the GPU driver to the `lovr.log` callback.  This will decrease performance but can help
+    provide information on performance problems or other bugs.
+
     The `headset.offset` field is a vertical offset applied to the scene for headsets that do not
     center their tracking origin on the floor.  This can be thought of as a "default user height".
     Setting this offset makes it easier to design experiences that work in both seated and standing
@@ -187,8 +186,8 @@ return {
           -- Set the project identity
           t.identity = 'default'
 
-          -- Hotkeys
-          t.hotkeys = true
+          -- Graphics
+          t.graphics.debug = false
 
           -- Headset settings
           t.headset.drivers = { 'openxr', 'oculus', 'vrapi', 'openvr', 'webxr', 'desktop' }