Commit Graph

377 Commits

Author SHA1 Message Date
bjorn 00412e2e79 Add a conf.lua flag for making the window resizable; 2019-08-28 00:59:03 -07:00
bjorn a073206c20 Standard shader: Fix some precision issues in GLES; 2019-08-22 21:57:59 -07:00
bjorn f91eed3834 Rebuild boot.lua.h; 2019-08-20 00:54:36 -07:00
bjorn e6c9fd1a6e rm error screen buttons; 2019-08-19 14:52:56 -07:00
bjorn 2f7743583f Rebuild actions.json.h; 2019-08-19 14:16:37 -07:00
bjorn 584261e21f rm ffi vectors; 2019-08-19 14:13:36 -07:00
bjorn e6bedba0bc Fix OpenVR head pose; 2019-08-17 22:50:35 -07:00
bjorn d3bf51daef Add alphaCutoff shader flag; 2019-08-12 17:38:03 -07:00
bjorn c3af8c14c1 Add uniformScale shader flag;
Used to switch to a faster version of lovrNormalMatrix, can be used
with all shader types.
2019-08-12 17:33:32 -07:00
bjorn 8821ecd340 Standard shader: Tonemap by default; 2019-08-12 02:36:23 -07:00
bjorn 4eb768b13b Fix GLSL type cast; 2019-08-11 18:47:12 -07:00
bjorn 265931e474 Standard shader: Multiply with graphics color;
I guess.
2019-08-11 18:34:16 -07:00
bjorn 51b4064801 Standard shader: Refactoring; 2019-08-11 18:15:43 -07:00
bjorn 3d8313a7f1 Add analytical approximation for specular BRDF lookup; 2019-08-11 17:22:09 -07:00
bjorn 93f076acc9 Fix default uniform values;
Not supported in GLES.
2019-08-09 17:36:14 -07:00
bjorn b8cb53e021 Standard shader: Refactoring; 2019-08-09 17:31:30 -07:00
bjorn 83b2f8d745 Add uniform for controlling light color and intensity; 2019-08-09 00:27:17 -07:00
bjorn 851f5f27ec Add more default headset drivers; 2019-08-09 00:00:42 -07:00
bjorn 30ea8995d2 Fix view vector; 2019-08-07 17:53:38 -07:00
bjorn 2c115ce66e Automatically detect mipmap count for IBL; 2019-08-07 15:56:52 -07:00
bjorn fe939213be Initial standard shader flags;
- normalTexture = true
- indirectLighting = true (requires uniform setup!)
- occlusion = true (only affects indirect lighting)
- emissive = true
- tonemap = true
2019-08-06 14:39:14 -07:00
bjorn b08d9d0b30 Standard shader: Add tonemapping;
ACES.
2019-08-05 15:34:21 -07:00
bjorn 96c47d590c rm lovrEnvironmentTexture from Material; 2019-08-05 15:20:17 -07:00
bjorn e4ab5aa85a Standard shader: Add image-based lighting;
Very WIP, still need to add the BRDF lookup table.
2019-08-05 14:49:09 -07:00
bjorn bff9399308 Rename skinned flag to animated; 2019-08-04 15:08:21 -07:00
bjorn 06fb8b2503 Simplify fill;
lovr.graphics.fill renders a fullscreen quad, it's convenient because
you don't need to set up a mesh and toggle all the pipeline states.

However, if you are dealing with copying/rendering between stereo
textures, you have to write your own shader for that.  For now.
2019-08-03 16:03:13 -07:00
bjorn db57592646 Attempt to display SOME relevant message for 'error occurred while displaying another error' in the luajit-only nonstandard crash path 2019-08-02 20:29:28 -07:00
bjorn e9fd052fc6 Start fixing lovr.graphics.fill; 2019-08-02 15:48:35 -07:00
bjorn aab987dbef Fix WebGL gamma correction;
Ugh, WebGL doesn't have sRGB backbuffers.
2019-08-01 13:26:45 -07:00
bjorn 15cdc78c6b Rebuild xxd files;
xxd on windows is different or something.
2019-08-01 13:01:47 -07:00
bjorn ecac39c08b Add experimental buttons to default error screen; 2019-08-01 00:14:37 -07:00
bjorn 9e8fcc01af Knuckles: Use force sensor as grip axis; 2019-07-31 16:54:56 -07:00
bjorn 78f2060405 rm lovr.headset.getAcceleration, getAngularAcceleration;
Because OpenXR did...
2019-07-30 20:22:08 -07:00
bjorn 9712f4765c lovr.headset.hands is CURSED; 2019-07-30 20:17:38 -07:00
bjorn 4b9e6849c8 Better boolean shader flags; Multicanvas flag;
Instead of boolean shader flags turning into actual booleans defines
in the shader source, for GLSL they turn into defines.  This lets you
use ifdef, which is the more common intended usage.

Also MULTICANVAS is now a boolean shader flag.  The old MULTICANVAS
define is deprecated.
2019-07-28 18:08:23 -07:00
bjorn f564444641 Fix some WebGL issues; 2019-07-28 17:28:18 -07:00
mcc d391a4750f Use base diffuse color from materials in Standard shader 2019-07-25 15:08:53 -07:00
bjorn 2b19c64aca rm primary DeviceButton and DeviceAxis;
It is confusing and doesn't really solve the intended problem very well.

For now we will all just suffer with our tedious device-specific Lua code.
2019-07-17 17:33:21 -07:00
bjorn a5326d530a LuaJIT: Fix quaternion __newindex; 2019-07-16 22:52:34 -07:00
bjorn db519f7f53 mat4:scale: Allow for a single argument in LuaJIT; 2019-07-16 22:02:18 -07:00
bjorn 122143b13a vec4; 2019-07-16 20:30:51 -07:00
bjorn 9156fa2cbf Vector rework; 2019-07-16 20:30:51 -07:00
bjorn 348798b86c Make shader in nogame screen more correct; 2019-07-02 20:12:24 -07:00
mcc dc98846169 Fix error screen on Android
As discussed in slack, lovr.errhand appears to predate lovr.graphics.hasWindow() and does not use it. This resulted in a crash on Oculus Go
2019-07-02 18:45:08 -07:00
bjorn d3f08fd1f0 rm logo.png; 2019-06-29 18:28:20 -07:00
bjorn b2df3e9816 Update nogame screen;
- Slightly dim background color (may change).
- Use a shader for the logo (it's centered now, not quite 100% like the image).
- Adjust text optical weight (I hate it).
2019-06-29 18:27:55 -07:00
bjorn e82ba030a6 lovr.headset.getDisplayTime;
Returns the predicted display time, which is the estimated time at which
the photons of the next frame will hit the eyeballs of a person in the HMD.

This should be used instead of lovr.timer.getTime when used for rendering
something that is time-dependent.  Updating simulations, logic, or access
to high frequency times should still use lovr.timer.getTime.
2019-06-29 17:36:36 -07:00
bjorn 8faff22f38 Regenerate math.lua.h; 2019-06-28 22:07:31 -07:00
mcc c604149428 Y-flip mirror texture on Oculus
Oculus gives us the mirror texture "upside down" compared to every other driver, so flip it rightside up before drawing in boot.lua.
2019-06-28 22:46:23 -04:00
bjorn d87fc56b63 lovr.headset.getDisplayMask; 2019-06-28 00:13:45 -07:00
bjorn 4222be88b5 Use UBO for Camera matrices;
Ugh I don't like the "Camera" concept anymore, but I can't figure
out how to easily get rid of it.  Maybe wait till displays are a thing.
2019-06-27 22:17:50 -07:00
bjorn 928ccee5f1 Multiview; 2019-06-25 01:21:59 -07:00
bjorn 807c519397 Fix typo; 2019-06-20 21:36:07 -07:00
bjorn b6d65922af Standard shader: spherical harmonics irradiance; 2019-06-20 21:17:32 -07:00
bjorn 286cb711e4 Standard shader: emissive; 2019-06-20 18:22:49 -07:00
bjorn a9241e781b Standard shader: emissive; 2019-06-20 18:20:07 -07:00
bjorn 179071023f Standard shader: diffuse, specular, normal mapping;
No shader flags yet.  Still need occlusion, emissive, configurable
lighting, IBL.
2019-06-20 17:46:22 -07:00
bjorn 4611b1c9a3 Add no-op standard shader; 2019-06-20 14:21:35 -07:00
bjorn 612f699aa4 Rename default shader to unlit; 2019-06-20 14:09:55 -07:00
bjorn f8f6d98df4 Use better default for identity quat; 2019-06-14 15:04:17 -07:00
bjorn 9e42fe295a math.lua: Fix vec3:sub; 2019-06-14 13:30:07 -07:00
bjorn de6d3dab5b Add tup build system;
It's still a rough draft and likely only works on my machine, but can be
improved over time.

Rough explanation:

- tup.config contains high-level build configuration defaults.
- Tuprules.tup contains mostly compiler flags (generated from the
  tup.config) and declares some macros used to compile code.
- Tupfile takes all generated object files and links them into the
  lovr executable.
- src/Tupdefault defines the default build steps for src and all
  subdirectories, which is to compile all .c files to .o files and put
  them in the <objects> bucket for linking by the toplevel Tupfile.

It's possible to have multiple configs active at once for different
platforms, projects, etc.  To do this, create a folder for each build
variant you want, and place a tup.config in each folder (it can be a
symlink, which is helpful).  Then, invoking `tup` will build all your
variants, or you can build a specific one by doing `tup <foldername>`.
2019-06-10 04:06:22 -07:00
bjorn e9853ed3c7 t.math.ffi conf flag; 2019-06-10 00:11:20 -07:00
bjorn 0b5c609264 Add OpenVR touch bindings;
Untested.
2019-06-06 01:10:50 -07:00
bjorn 06c6b172de vec3 has 4 elements; 2019-06-03 07:20:03 -07:00
bjorn 31e086edaf Inline all the maf functions; 2019-06-03 07:19:25 -07:00
Bjorn Swenson 68c1b6a201
Merge pull request #122 from bjornbytes/hand-updates
Hand updates
2019-06-03 00:14:45 -07:00
bjorn 575552a147 Restart hotkey works on default error screen; 2019-06-02 03:29:34 -07:00
bjorn 374492c586 Add experimental hotkeys flag;
- Add t.hotkeys flag to conf.lua, which defaults to true.
- If t.hotkeys is truthy, the following hotkeys will be enabled:
  - Escape: Quit the experience
  - F5: Restart the experience
2019-06-02 03:00:12 -07:00
bjorn 84bd50379d Add primary button/axis;
It's called "primary".
2019-05-31 12:00:15 -07:00
bjorn af0678f9e9 rm DEVICE_HAND;
If we expose both unhanded hands and handed hands, people need to
deal with handling (haha) both cases in their apps.  It's simpler
to always deal with left and right hands, even though it is a bit
less general.  Still, this is congruent with the current state of
OpenVR and OpenXR, and I think there are still open questions about
the more uncommon cases where there are more than two hands.
2019-05-31 10:41:40 -07:00
bjorn 06e3ef702c Add built-in ShaderFlag for skinning vertices;
Now you can pass in the { skinned = true } flag when creating a Shader
to get skinning behavior without needing to write it yourself.  The
default is still false.

Need to profile to make sure the if is getting optimized out.
2019-05-28 03:43:54 -07:00
bjorn b26e29cb7b Fix more LuaJIT math casts; 2019-05-24 20:54:38 -07:00
bjorn 831ebda303 Fix LuaJIT Pool integration; 2019-05-24 20:39:05 -07:00
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
mcc 684fd77316 Various changes around error reporting to support Oculus Mobile
General changes:

- Amended the boot.lua error handling so when an error occurs in the error handler, the inner error is printed before quitting
- Silent quit instead of crash if a user implements lovr.errhand but it doesn't return a function

Oculus Mobile changes:

- The lovr.errhand screen is now correctly invoked for errors that occur inside lovr.draw. Multiple changes were needed to make this work:
    - Instead of calling renderHelper, which uses lua_call (unsafe as Oculus Mobile does not call renderHelper) the oculus driver gets hold of the Lua ref and lua_pcalls itself. A new lovrHeadsetExtractRenderFn is added to make this possible.
    - A mechanism is added where if the coroutine resume in boot.lua returns a value, boot.lua treats this as the string returned from luax_getstack and invokes lovr.errhand.
- Added a custom atpanic that routes through lovrThrow (since stderr gets eaten). With the draw() changes this should never be encountered, but it's good just in case. In current testing the tracebacks this prints don't seem to be right.
- Fix major bug in android_vthrow that meant % codes didn't work in lovrThrow on Android
- Nothing to do with errors, but fix getAxis("trigger")
2018-11-13 16:50:31 -08:00
bjorn a06734ae97 Use alpha to coverage and alpha test for text; 2018-11-08 11:58:43 -08:00
mcc 8301bd7dd8 Remerge oculus-mobile branch with master 2018-11-02 18:10:08 -04:00
bjorn 5f990d8c9f Attempt to fix state.offset;
The goal is to ensure that (for 3DOF devices) all poses are reported
to include the state.offset vertical transform applied to them.  Previously,
only rendering was using state.offset.

This is important to fix spatial audio.

Is doing this in every driver problematic?  What if we did it in the
Lua bindings?  That way it could be handled in one place.
2018-10-29 10:36:58 -07:00
mcc 5ad8fdd3e3 Fixes as far as running without crashes, no display yet 2018-10-24 23:40:11 -04:00
bjorn 4f542902a1 mv lovr.js webvr.js;
To allow for webxr.js and lovr.js to be used for...other things.
2018-10-21 08:56:57 -07:00
bjorn 518d26aad8 getDisplayDimensions: Use unsigned ints;
Fixes a warning.
2018-10-21 08:40:57 -07:00
bjorn e1d980a2d6 Re-add lovr.headset.getBoundsGeometry;
Looks like more runtimes are starting to support it.
2018-10-09 17:51:05 -07:00
bjorn a1d365fc25 Plumb new mirror settings through WebVR; 2018-09-30 18:58:51 -07:00
bjorn 816fda2177 Fix everything and merge; 2018-09-27 18:38:44 -07:00
bjorn 92e6ad93cb Dynamically load modules; 2018-09-27 18:38:44 -07:00
bjorn 5a9cd5187c Make CMakeLists more modular;
- Enable/disable individual modules, including enet/json
- Enable/disable different "backends" (audio/headset)
- Choose to use system vs. source versions of different libraries
2018-09-21 19:25:48 -07:00
bjorn 72158f103a Update for stereo rendering and new headset API; 2018-09-11 15:30:31 -07:00
bjorn 8b7bfec9d3 Add emscripten shell file;
To make it easier to build and test WebVR.
2018-09-06 16:05:39 -07:00
bjorn 1b3e8c9766 Flip cubemap x texture coordinate; 2018-09-04 06:42:04 -07:00
bjorn 4e1757210e Load cubemap images better; 2018-09-03 20:59:12 -07:00
bjorn b959c30424 lovrPoseMatrix; 2018-09-01 02:52:02 -07:00
bjorn c584354c92 lovrInstanceID; 2018-09-01 02:09:59 -07:00
bjorn 8b9e9eba9e Use GLSL 430 when available; 2018-09-01 01:57:38 -07:00
bjorn 4e61d2ea3b Really icky conditional shader compilation;
But I can't think of another way to do it.
2018-08-31 19:52:03 -07:00
bjorn 7b9a0ba048 Organize uniforms better; 2018-08-31 16:45:05 -07:00
bjorn a5256aaa27 Happy little graphics refactors; 2018-08-31 06:03:35 -07:00
bjorn 0ce6e046a6 lovrViewportCount; Multiply vertex divisors; 2018-08-31 02:41:50 -07:00
bjorn b7faeb8c44 Add precision for ints; 2018-08-30 21:37:45 -07:00
bjorn 04e119e413 Reduce size of default font;
It only supports the ISO8859-1 character set now.
2018-08-30 18:13:47 -07:00
bjorn 7c21d77a6e rm singlepass conf flag; Viewports; getSupported.singlepass; 2018-08-30 04:02:58 -07:00
bjorn 5ab15e36a8 Declare extension before in; 2018-08-30 03:43:41 -07:00
bjorn 4631d2dacc Test shader extension fallback; 2018-08-30 03:38:31 -07:00
bjorn e6a7a4f922 Redo singlepass; 2018-08-30 00:52:38 -07:00
bjorn a97c8e2266 Fix skybox texture mapping; 2018-08-30 00:06:29 -07:00
bjorn 26f411f43f Other headset drivers use stereo display dimensions; 2018-08-29 21:20:01 -07:00
bjorn 87c1429778 Rebuild boot.lua.h; 2018-08-23 12:53:05 -07:00
bjorn 7569b7934f conf flag for singlepass; Shader fixes; 2018-08-23 12:52:18 -07:00
bjorn c03ca73fba Use ifdefs for nvidia glsl extensions;
I think they still work if I do this.
2018-08-13 17:03:39 -07:00
bjorn a1f200cb61 Use GLSL version 430 for compute shaders; 2018-08-11 00:08:34 -07:00
bjorn 94b15c40c2 line 0 in compute prefix; 2018-08-11 00:08:34 -07:00
bjorn b891a930bf shaders.c: consistent ordering in header and implementation; 2018-08-11 00:08:34 -07:00
bjorn e371359193 Compute shader glsl prefix; 2018-08-11 00:08:33 -07:00
bjorn 2cb6de47f2 Compute shader creation; 2018-08-11 00:08:33 -07:00
bjorn 8f529d3a37 Fix potential infinite loop in error handler; 2018-08-06 13:26:17 -07:00
bjorn a713a3d14f Use 4 for default msaa instead of max;
Turns out msaa of 32 is really really slow
2018-08-04 18:44:36 -07:00
bjorn 87ff99108d Update boot.lua; 2018-07-28 18:41:51 -07:00
bjorn 785913fd45 Add conf.headset.msaa config;
For separate window/headset msaa settings.  Currently only applies
to OpenVR since the other drivers render directly to the window.
2018-07-28 18:12:57 -07:00
bjorn d79afb44d2 Make gl_ViewportIndex work in fragment shaders; 2018-07-25 00:01:22 -07:00
bjorn 2dc79a48a8 Use single pass stereo rendering when supported; 2018-07-21 05:30:13 -07:00
bjorn c6a97a9a23 Fix issue where nogame's conf was ignored; 2018-07-19 01:08:50 -07:00
bjorn 8cc795aa9d Material:getTransform; Material:setTransform; 2018-07-18 01:17:16 -07:00
bjorn 889144cc45 Add VERTEX and PIXEL/FRAGMENT defines to shader header; 2018-07-06 01:38:15 -07:00
bjorn fb3eed5518 Fix skybox shaders for WebGL; 2018-06-09 23:18:02 -07:00
bjorn 183f6003e9 rm mapped buffers mostly; 2018-06-03 19:00:31 -07:00
bjorn 6ff7292333 Mostly remove instanced stereo rendering; 2018-06-03 17:18:42 -07:00
bjornbytes c68d65441c Draw the rest of the fucking owl; 2018-05-27 19:05:10 -07:00
bjorn df876bf3b2 Static display; 2018-05-27 19:05:10 -07:00
bjorn 8bc7802246 Controller events; 2018-05-27 19:05:10 -07:00
bjorn b51e8694ac Add lovrQuit; 2018-05-27 19:05:10 -07:00
bjorn 8c2e9df1b4 Fix error handler when graphics module is disabled; 2018-05-27 19:05:10 -07:00
bjorn f4ecdb074b WebVR isMounted I guess; 2018-05-27 19:05:10 -07:00
bjorn a3a59f01a3 WebVR controller input;
No events yet.
2018-05-27 19:05:10 -07:00
bjornbytes 389a95c9ce WebVR; 2018-05-27 19:05:10 -07:00
bjorn be217a9b63 Some basic WebVR Controller functions; 2018-05-27 19:05:10 -07:00
bjorn 1b0f1acaf1 Simplify C defines; 2018-05-27 19:05:10 -07:00
bjorn 7ffd3fc25d Use more primitive getControllers signature; 2018-05-27 19:05:10 -07:00
bjorn 32668fc231 Fix C defines; 2018-05-27 19:05:10 -07:00
bjorn fd5ae4d124 webvrGetEyePose; 2018-05-27 19:05:10 -07:00
bjorn ab2594b204 WebVR velocity functions; 2018-05-27 19:05:10 -07:00
bjorn 065a5aa0dd Finish webvrGetPose; 2018-05-27 19:05:10 -07:00
bjorn 498a1843ad Work on WebVR pose input; 2018-05-27 19:05:10 -07:00
bjorn 859251d020 Start WebVR rewrite; 2018-05-27 19:05:10 -07:00
bjorn 93e082c8cc WebVR;
- Add FORCE_FILESYSTEM
- Handle THREAD_ERROR event with noop case
- Remove hopefully redundant lovr.graphics.clear in errhand
- Finally use correct type signature for assimpFileTell
2018-05-27 19:05:10 -07:00
bjorn 8702d7422f Rewrite boot.lua, main.c, and exception handling;
There are breaking changes:

- lovr.step is removed.
- lovr.run is expected to return a main loop wrapped in a function.  The
  returned function is run as a coroutine to facilitate a cooperative
  main loop.
- lovr.errhand should return a loop function instead of while true-ing.
2018-05-27 19:05:10 -07:00
bjorn 7e5be11f74 Fix default shader; 2018-05-27 19:05:10 -07:00
bjorn a3a50e5ca7 Ensure arg gets passed to lovr.load; 2018-03-30 18:48:20 -07:00
bjorn 95da07d165 Stereo canvases;
Canvases can be created with the "stereo" flag to make it a stereo
Canvas.  If a Canvas is stereo, everything rendered to it will be
rendered to the left and right halves of it, using left/right
view and projection matrices.  Headset drivers will use stereo
Canvases to improve performance.
2018-03-22 09:57:44 -07:00
bjorn be699aa132 Normal matrix is an array; 2018-03-22 09:57:44 -07:00
bjorn 988d8c7d23 Rename blit to fill; 2018-03-22 09:57:44 -07:00
bjorn 3ed16a0a68 Work around driver bug to fix error screen; 2018-03-22 09:57:44 -07:00