Commit Graph

153 Commits

Author SHA1 Message Date
bjorn 1335ab55ae Warnings/cleanup; 2019-05-20 03:41:12 -07:00
bjorn 4a47afca38 Organize api folder; 2019-05-19 00:31:42 -07:00
bjorn 6134abe866 Handle vsync better;
- Add vsync flag to t.window and lovr.graphics.createWindow.
- vsync is 1 by default.
- Some headset drivers override vsync if they have special timing requirements.
2019-05-14 00:18:22 -07:00
bjorn 51ce0c1418 rm compat; 2019-05-12 22:28:02 -07:00
bjorn 7c2a119324 SteamVR Input 2019-05-12 22:23:28 -07:00
bjorn 6ff35420bd More leap fixes;
Also reduce branching in headset accessors.
2019-05-12 22:23:28 -07:00
bjorn 26c1859531 Update WebVR; 2019-05-12 22:23:28 -07:00
bjorn 9382afb94d Put controller models back on nogame screen; 2019-05-12 22:23:08 -07:00
bjorn 89ccf750ba Start compat system; 2019-05-12 22:23:02 -07:00
bjorn da6fd4d07c Remove Controllers; 2019-05-12 22:22:29 -07:00
bjorn 8208238df7 Support multiple tracking drivers;
Now the lovr.headset module initializes one display driver (the
first one in the list) and multiple tracking drivers.  Only drivers
that implement 'renderTo' will be considered for display driver.

Tracking drivers are stored in a linked list, and retrieving pose
information involves trying all of the tracking drivers until the
pose is found.
2019-05-12 22:21:06 -07:00
bjorn c9775c84ac Remove t.gammacorrect flag;
Gamma correct rendering is core in all supported OpenGL versions,
and it's usually a good idea to enable it.
2019-05-03 17:53:33 -07:00
bjorn ed92c4e6db font:setFlipEnabled(false) in lovr.errhand;
To prevent text from being upside down if you flipped the default font.
2019-04-13 15:40:47 -07:00
bjorn 59e4a5bb8e Oops, re-enable graphics module in boot.lua;
Also change format of message.
2019-04-08 05:18:28 -07:00
bjorn 0f6bcad90b Nogame screen works without the graphics module; 2019-04-08 03:25:45 -07:00
bjorn a28b333899 Split draw data stream into two streams;
Also the max number of draws can be hardcoded to 256 now.
2019-04-05 00:49:50 -07:00
bjorn 94ac64e7f4 Add std140 layout qualifier to DrawData block; 2019-03-13 09:20:33 -07:00
bjorn cf5ad64deb WebVR: Use new dynCall syntax for function pointers; 2019-03-09 03:00:50 -08:00
bjorn d45e56146a Rename fake to desktop; 2019-03-06 23:02:47 -08:00
bjorn 0cba1ba28d lovr.audio.getPose; lovr.audio.setPose; 2019-02-17 18:26:56 -08:00
bjorn 1d3b05a515 Make bone IDs unsigned for WebGL; 2019-02-14 09:49:31 -08:00
bjorn 7c6accf856 Rebuild boot.lua; 2019-02-13 23:48:50 -08:00
bjorn a081ab8aed Update lovr.headset in the error screen; 2019-02-13 20:37:06 -08:00
bjorn 6b323e3476 Start parsing glTF; 2019-02-13 15:10:52 -08:00
bjorn f53f64933c WebGL fixes; 2019-02-08 10:32:05 -08:00
bjorn 4a25a0120f Vector rework; 2019-02-08 08:13:47 -08:00
bjorn 0d81745282 Fix error screen; 2019-02-05 13:15:27 -08:00
bjorn 3aec7f7767 Fix struct definition in UBO;
You can't define a new struct in an interface block.
2019-01-29 19:57:18 -08:00
bjorn 1bd58d6cef Rebuild boot.lua; 2019-01-29 02:07:34 -08:00
bjorn b37fc5dbbe Remove fixed-function mirroring code from headset drivers; 2019-01-28 18:29:50 -08:00
bjorn f2cb7e7e3d Reset color to white after drawing nogame screen; 2019-01-28 18:21:46 -08:00
mcc b09c3adeec Fixes to lovr.mirror() requested in PR 2019-01-28 15:03:58 -08:00
mcc aab1bda92d Implementation of getMirrorTexture() 2019-01-28 15:03:58 -08:00
mcc 95fcc3eb0b Attempt to make a lovr.mirror() for Window purposes as discussed in chat.
Adds lovr.graphics.hasWindow()
2019-01-28 15:03:58 -08:00
bjorn 7338c82d7f Add resizable vector pools;
It seems too dangerous/annoying to have pools error when they run
out of memory.  Instead, we'll make it so you can choose to make
a pool resizable, where it enlarges its memory if it runs out. By
default Pools aren't resizable, but the default math pool is.

Also, reduce the size of the default pool from 640k to 4k.
2019-01-10 14:10:04 -08:00
bjorn ea3a77a73a Many batching improvements; Refactoring; 2019-01-04 18:01:01 -08:00
bjorn e6b7c41860 Improve lovrDrawData uniform names; 2018-12-14 16:02:25 -08:00
bjorn 3972ddc2ad rm Cabin; 2018-12-14 10:58:03 -08:00
bjorn 099cf4cb22 Add VarelaRound; 2018-12-14 10:58:03 -08:00
bjorn c531852932 Refactor rendering; 2018-12-10 23:05:02 -08:00
bjorn 40454d1380 Use ShaderBlock for transforms/colors; 2018-12-07 18:19:03 -08:00
bjorn 3a774354e8 Remove lovrHeadsetGetEyePose;
A lot of drivers didn't bother to support it, it's not used very often,
and there are better ways to expose it that will soon be implemented.
2018-12-02 13:27:55 -08:00
bjorn ba192374dc Start math types; 2018-12-02 12:08:07 -08:00
mcc 778b654f1d Move lovr.android.getApplicationId() to lovr.filesystem.getApplicationId(). Kill Android module
This requires adding an application id function to platform and adding a mini definition to sds into platform.h. All platforms except Android return NULL (no application id)
2018-11-27 15:02:25 -08:00
mcc 961bf859f6 Android lua module
Currently provides only a lovr.android.getApplicationId(). This returns an Android-specific identifier that doesn't cleanly map to anything specific in other OSes.
2018-11-27 15:02:25 -08:00
mcc 8e8091ccbc Fixes to error handling in boot.lua
- The pcalls to run conf were triggering their error very late, and were detecting error based on the second return value of pcall being non-nil. In fact the second return value of pcall is often non-nil in the case of *success*. We should check the first parameter, success/failure, instead.

- It is possible in principle to call error() with a non-string value, so errhand should sanitize its values with tostring.

- There is a check in the main boot.lua loop whether xpcall returned a string, which is the sign luajit hit an error in an error handler. This check was occurring in the wrong place (my fault; merge error when preparing PR) so if lovr.load() hit this case we were falling back to the horrible “could not call a string” error.
2018-11-24 18:48:29 -08:00
bjorn 465e5c2010 Controller:getVelocity; Controller:getAngularVelocity; 2018-11-19 09:24:10 -08:00
bjorn 217a2f6354 Fix problems not caught by MSVC; 2018-11-16 07:19:29 -08:00
bjorn 5c3280ba2a boot.lua: Improve errors when loading modules fails;
Remove hardcoded list of modules as well.
2018-11-16 02:27:34 -08:00
bjorn ab232571d0 Make sure error messages get printed; 2018-11-15 07:51:21 -08:00