Browse Source

Mention background color better;

bjorn 4 years ago
parent
commit
e6e7bed33d
3 changed files with 58 additions and 52 deletions
  1. 50 50
      api/init.lua
  2. 5 2
      api/lovr/callbacks/draw.lua
  3. 3 0
      api/lovr/headset/renderTo.lua

File diff suppressed because it is too large
+ 50 - 50
api/init.lua


+ 5 - 2
api/lovr/callbacks/draw.lua

@@ -3,11 +3,14 @@ return {
   summary = 'Called continuously to render frames to the display.',
   description = [[
     This callback is called every frame.  Use it to render the scene.  If a VR headset is connected,
-    anything rendered by this function will appear in the headset display.
+    anything rendered by this function will appear in the headset display.  The display is cleared
+    to the background color before this function is called.
   ]],
   arguments = {},
   returns = {},
   related = {
-    'lovr.headset.renderTo'
+    'lovr.mirror',
+    'lovr.headset.renderTo',
+    'lovr.graphics.setBackgroundColor'
   }
 }

+ 3 - 0
api/lovr/headset/renderTo.lua

@@ -28,6 +28,9 @@ return {
     When using the `pico` headset driver, headset rendering is asynchronous and the callback passed
     to `lovr.headset.renderTo` will not be called immediately.
 
+    At the beginning of the callback, the display is cleared to the background color.  The
+    background color can be changed using `lovr.graphics.setBackgroundColor`.
+
     If the callback is `nil`, an empty frame cleared to current graphics background color will be
     submitted to the headset.
   ]]

Some files were not shown because too many files changed in this diff