1
0
Fork 0
mirror of https://github.com/bjornbytes/lovr.git synced 2024-07-04 13:33:34 +00:00
Commit graph

1336 commits

Author SHA1 Message Date
bjorn 1911d5b90e Make depth test more flexible; 2018-03-24 12:50:09 -07:00
bjorn fe47104869 More memory stuff; 2018-03-24 01:17:36 -07:00
bjorn 426b907294 Release sources when audio module is destroyed; 2018-03-24 00:29:58 -07:00
bjorn bdc9b63b8a Fix lots of memory leaks;
Especially when restarting or using threads.
2018-03-23 19:31:45 -07:00
bjorn f94f0cd6c8 Add validation for texture creation; 2018-03-22 11:34:27 -07:00
bjorn f9ce6d3425 Mesh:setVertexMap accepts a Blob for fast updates; 2018-03-22 11:22:06 -07:00
bjorn 471540433c Add Canvas:newTextureData; 2018-03-22 11:15:17 -07:00
bjorn 1ad00328c1 Add a flag for autogenerating Canvas mipmaps; 2018-03-22 10:58:53 -07:00
bjorn 5fd20cc955 Fix lovr.filesystem.setRequirePath; 2018-03-22 10:39:31 -07:00
bjorn adee0a3012 Replace dots with slashes instead of question marks;
In filesystem loader.
2018-03-22 10:07:19 -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 c0ea3240c3 Organize drawing code; 2018-03-22 09:57:44 -07:00
bjorn 8e5061f918 Disable depth test in lovr.graphics.fill; 2018-03-22 09:57:44 -07:00
bjorn be699aa132 Normal matrix is an array; 2018-03-22 09:57:44 -07:00
bjorn 334e218e4c Diff render target state better; 2018-03-22 09:57:44 -07:00
bjorn 988d8c7d23 Rename blit to fill; 2018-03-22 09:57:44 -07:00
bjorn db756f347f Add comment; 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
bjorn 8a408cd45b Ignore uniform blocks when inspecting shader uniforms; 2018-03-22 09:57:44 -07:00
bjorn 20983c860b Send lovrEye to fragment shaders; 2018-03-22 09:57:44 -07:00
bjorn 5feb47c5b7 Remove eye argument from lovr.draw; 2018-03-22 09:57:44 -07:00
bjorn b266d0316c Update camera UBO when popping a layer; 2018-03-22 09:57:44 -07:00
bjorn 8b201838b6 Add lovr.graphics.blit for fullscreen quads; 2018-03-22 09:57:44 -07:00
bjorn 8bcaacd63c Resolve MSAA properly; 2018-03-22 09:57:44 -07:00
bjorn 2cbd565522 Fix texture submit bounds; Fix layer canvas bug; 2018-03-22 09:57:44 -07:00
bjorn 4915ca41cc Make skyboxes really cool; 2018-03-22 09:57:44 -07:00
bjorn 8e0519058d Use quad for cube skyboxes; 2018-03-22 09:57:44 -07:00
bjorn e6a76e2a61 rm MatrixType; 2018-03-22 09:57:44 -07:00
bjorn d317502ffd Small UBO cleanup; 2018-03-22 09:57:44 -07:00
bjorn 2def650abd Refactor layers/displays; 2018-03-22 09:57:44 -07:00
bjorn 221015677f Nogame screen align; 2018-03-22 09:57:44 -07:00
bjorn ddb22aef0e Refactor headset offset; 2018-03-22 09:57:44 -07:00
bjorn 1f1232505e Uniform buffer objects for matrices;
Still hacky.
2018-03-22 09:57:44 -07:00
bjorn 3064eff017 Hack everything but it mostly works; 2018-03-22 09:57:44 -07:00
bjorn 5a74b8765b Change default window size; 2018-03-22 09:57:44 -07:00
bjorn 1cd1b5e11d Use a Mesh for primitives; 2018-03-22 09:46:26 -07:00
bjorn 4c2cd458ad calloc is cool; 2018-03-21 15:36:02 -07:00
bjorn 87d5cb6456 Cache shader attribute IDs; 2018-03-21 15:36:02 -07:00
bjorn d77b139d21 Make Mesh more lightweight; 2018-03-21 15:36:00 -07:00
bjorn d2e0642b59 Use calloc in lovrAlloc; 2018-03-21 12:56:16 -07:00
bjorn 4b82a12b15 Add lovr.filesystem.getWorkingDirectory; 2018-03-19 16:52:17 -07:00
bjorn fdb3a29a05 Add separate x/y scale to lovr.graphics.plane; 2018-03-19 13:09:03 -07:00
bjorn f6a9f8ee19 lovr.headset.setMirrored works with fake driver; 2018-03-19 12:05:04 -07:00
bjorn 05413adf74 Make detaching attributes more flexible; 2018-03-13 17:53:09 -07:00
bjorn 6fb977b5bb Improve Mesh VAO state diffing;
Also permit empty tables for vertex formats.
2018-03-13 16:12:12 -07:00
bjorn dd3644bafd Add bounds checking to Shader:send with Blobs; 2018-03-12 13:27:14 -07:00
bjorn d8c18f1535 Shader:send supports Blobs; 2018-03-12 11:25:28 -07:00
bjorn 8be201c040 Add default lovr.threaderror callback; 2018-03-12 10:37:45 -07:00
bjorn a8545f75dc Rename getShapeList to getShapes; Fix getJoints; 2018-03-12 10:10:10 -07:00
bjorn a83ecff838 Fix warning; 2018-03-11 16:28:39 -07:00
bjorn 399544cf9d lovr.filesystem.getRequirePath; setRequirePath; 2018-03-11 16:25:21 -07:00
bjorn c0ebb8f873 Mesh:setVertices accepts VertexData; 2018-03-11 11:43:01 -07:00
bjorn 491fbcd2d8 Mapping the whole buffer doesn't mean we can invalidate it; 2018-03-11 11:24:50 -07:00
bjorn c0d4d33d47 lovr.graphics.newMesh accepts VertexData; 2018-03-11 11:24:11 -07:00
bjorn 10bed31ecf Fix VertexData allocation in Meshes; 2018-03-11 11:09:12 -07:00
Bjorn Swenson 9eeca62b78
Merge pull request #41 from mcclure/attach-mesh
Implementation of mesh:attachAttributes(), with instance divisor
2018-03-11 11:05:19 -07:00
bjorn 86ce6bc44a lovr.data.newBlob accepts Blobs to clone them; 2018-03-10 21:37:05 -08:00
bjorn 6916137dc6 VertexData and TextureData properly extend Blob;
...He hates it!
2018-03-10 21:28:22 -08:00
bjorn 22cda40163 Fix Collider:getJointList; 2018-03-10 21:02:43 -08:00
bjorn e4618add55 Gamma correct background color correctly; 2018-03-10 20:59:36 -08:00
mcc 1732384262 Implementation of mesh:attachAttributes(), with optional instance divisor
Some features remain to be implemented, these are marked with TODOs.

Currently it is not allowed to attach a mesh which itself has attachments.
2018-03-04 17:07:54 -05:00
bjorn 7e58e265d6 Fix cube winding; 2018-03-03 17:19:12 -08:00
bjorn 66836b4d3a Fix AABB; 2018-03-01 20:51:57 -08:00
bjorn 2a861b484d Fix edge case in quaternion slerp; 2018-02-28 20:32:28 -08:00
bjorn 4463bd00c8 Load tangents from models; 2018-02-26 02:54:35 -08:00
bjorn cb7b99f9a6 Optimize skybox rendering;
- Fix winding order of skybox cubemaps.
- Fix skybox image ordering in lovr.graphics.newTexture.
- Change skybox shader to allow rendering cubemap skyboxes last for
  early z rejection.
- Remove overriding of depth write and depth test state for cubemap
  skyboxes.
2018-02-26 02:10:53 -08:00
bjorn 4df836727c Simplify refcounting; 2018-02-26 00:59:03 -08:00
bjorn f54d1c1e03 rm containerof; 2018-02-25 23:19:39 -08:00
bjorn ac582890fc Resurrect lovr.audio.getDopplerEffect and setDopplerEffect; 2018-02-25 22:07:14 -08:00
bjorn 272cce65a2 Weird compile fixes; 2018-02-25 21:41:02 -08:00
bjorn 3a36bcceae lovr.mount; lovr.headset.isMounted; isPresent changes;
Remove lovr.headset.isPresent.
Replace Controller:isPresent with Controller:isConnected.
Add lovr.headset.isMounted and lovr.mount callback.
2018-02-25 16:42:31 -08:00
bjorn 33c529dcd8 Update WebVR; 2018-02-24 00:59:11 -08:00
bjorn 8de0af397b Clean up headset WIP; 2018-02-23 20:01:13 -08:00
bjorn 9ca743dc1a Headset module can be restarted; 2018-02-23 18:38:53 -08:00
bjorn 8fb3421658 Fix everything on windows; 2018-02-23 18:38:53 -08:00
bjorn f5fa9a4e5c Make modules more restartable;
Except headset.  Screw you, headset.
2018-02-23 18:38:53 -08:00
bjorn 9d42d7737a Finish Channel API; 2018-02-23 18:38:53 -08:00
bjorn b5534c37b7 Release Channels in thread.getChannel; 2018-02-23 18:38:53 -08:00
bjorn bf88ddb575 Release thread lua state; 2018-02-23 18:38:53 -08:00
bjorn c92604859a Start Channel; 2018-02-23 18:38:53 -08:00
bjorn 4cca193fcb lovr.threaderror callback; 2018-02-23 18:38:52 -08:00
bjorn 640c4e715c rm extra lovr.h includes; 2018-02-23 18:38:34 -08:00
bjorn 583afc9f16 Reorganize main/lovr separation; 2018-02-23 18:38:34 -08:00
bjorn 72f718c241 Make vertex attribute sizes constant; 2018-02-23 18:38:34 -08:00
bjorn 109b40bcb4 Thread:wait; Thread:getError; Thread:isRunning; 2018-02-23 18:38:34 -08:00
bjorn 5c9f234075 Basic working threads; 2018-02-23 18:38:34 -08:00
bjorn f010a0ffc2 Basic module setup; 2018-02-23 18:38:33 -08:00
bjorn 530667716c Add tinycthread; 2018-02-23 18:37:24 -08:00
bjorn d4b8274879 Push nil instead of 'unknown' for unknown buttons; 2018-02-21 22:12:38 -08:00
bjorn f3ac875ceb Don't generate mipmaps for Canvases; 2018-02-21 02:07:19 -08:00
bjorn 329f7d25c0 Fix texture stuff; 2018-02-20 23:09:36 -08:00
bjorn 67d3c49a76 Add support for 3d textures; 2018-02-20 17:57:47 -08:00
bjorn dcef23640a Fix texture allocation I think; 2018-02-20 17:47:06 -08:00
bjorn 07af705e37 Texture:getType; 2018-02-20 17:27:35 -08:00
bjorn f75530b9e1 Add support for 2d array textures; Improve mipmaps;
lovr.graphics.newTexture has been changed.
2018-02-20 17:15:47 -08:00
bjorn 5493a980ff Move Blob to lovr.data;
Keep lovr.filesystem.newBlob though...
2018-02-19 21:04:53 -08:00
bjorn 17c81a3502 Clear HMD canvas properly; 2018-02-18 16:15:12 -08:00
bjorn de0ab5402c Fix type issue; 2018-02-15 19:59:31 -08:00
bjorn 7cecc1489e getCanvas; setCanvas; MRT; MULTICANVAS define; 2018-02-15 19:58:35 -08:00
bjorn 3287b0acb6 Fix OpenVR controller model materials; 2018-02-13 21:24:18 -08:00
bjorn cca1f32d10 PBR material properties; 2018-02-11 19:16:40 -08:00
bjorn d5a1928b3d Rename a bunch of files; 2018-02-11 15:22:04 -08:00
bjorn ece5bf2f9c Node and material accessors for ModelData; 2018-02-11 13:03:52 -08:00
bjorn d7bf96f952 ModelData:getVertexData; 2018-02-10 17:33:45 -08:00
bjorn 8ad882e7a4 Add VertexData object; 2018-02-10 17:27:29 -08:00
bjorn 18be34a903 Expose depth write setting; 2018-02-08 21:50:47 -08:00
bjorn 3fd6f27768 Allow custom values when clearing color, depth, and stencil buffers; 2018-02-08 21:26:53 -08:00
bjorn c538474339 TextureData:encode; 2018-02-08 20:17:50 -08:00
bjorn 9205663d69 Texture:replacePixels; 2018-02-08 19:46:24 -08:00
bjorn 04faa5bb1c getPixel and setPixel bound checks; 2018-02-08 19:24:02 -08:00
bjorn 964614c3fd Move TextureData assertions into constructors; 2018-02-08 19:22:30 -08:00
bjorn eab8b8a354 lovr.data.newTextureData can create empty textures; 2018-02-08 19:21:33 -08:00
bjorn c8e1e3ffd9 TextureData:getPixel; TextureData:setPixel; 2018-02-07 09:08:16 -08:00
Bjorn Swenson 55ba402fd2
Merge pull request #35 from mcclure/audio-crash
Error message instead of crash on invalid audio.newSource call
2018-02-03 07:24:46 -08:00
mcc b1cbb4bb1e Error message instead of crash on audio.newSource with non-understood file 2018-02-03 09:34:30 -05:00
mcc 1f46dd5053 Switch trigger to right-click when using fake headset
Currently left-click is used for both mouselook and trigger, which means it's impossible to mouselook without triggering
2018-02-03 09:20:12 -05:00
bjorn a7edc2be2b Rewind AudioStreams when Sources stop; 2018-01-31 22:45:44 -08:00
bjorn ef9c4b782d Add missing include to vertex.h; 2018-01-31 22:31:43 -08:00
bjorn 14a54fa7b0 rm MaterialData; 2018-01-29 21:44:32 -08:00
bjorn 4a68067e28 rm AnimationData; 2018-01-29 20:30:13 -08:00
bjorn e859350e25 TextureData:getDimensions; 2018-01-29 19:15:58 -08:00
bjorn 78774d65be Actually hold off on node APIs for now; 2018-01-29 19:09:43 -08:00
bjorn b5b58f9d56 Start node API; 2018-01-27 17:26:11 -08:00
bjorn 3ed5419005 ModelData vertex accessors; 2018-01-27 13:43:20 -08:00
bjorn 032788003a VertexData; IndexData; 2018-01-27 12:51:41 -08:00
bjorn 84de048fa3 Fix warnings; 2018-01-26 19:11:42 -08:00
bjorn 66d0e42908 Refactor VertexFormat; 2018-01-26 19:11:40 -08:00
bjorn dc801d8590 luax_pushvertex; 2018-01-26 19:01:41 -08:00
bjorn ea7f3d48a2 Refactor MeshFormat; 2018-01-26 19:01:41 -08:00
crito ba85abaa0d remove webvrGetBoundsGeometry reference from webvr.c
getBoundsGeometry implementation was dropped with 11586e8
but not in HeadsetInterface.
2018-01-27 00:13:42 +01:00
Bjorn Swenson 1f3deae6ec
Merge pull request #32 from mcclure/reload-support-2
Restart-without-quit support: lovr.event.quit("restart")
2018-01-25 19:08:30 -08:00
mcc 8052896b33 Restart-without-quit support: lovr.event.quit("restart") and return-from-run() both support the string "restart" in place of an exit code. When this happens, the program reruns itself in a new, isolated environment. In Emscripten, no reboot occurs and the program only quits. 2018-01-25 21:32:16 -05:00
bjorn b549688c44 Add a bunch of Rasterizer functions; 2018-01-22 18:49:45 -08:00
bjorn 3cce5fd991 ModelData; 2018-01-22 18:24:39 -08:00
bjorn ed72de1109 Make sure objects retain their underlying data; 2018-01-22 09:13:03 -08:00
bjorn a2e0f592a3 Create Fonts from Rasterizers; 2018-01-22 08:46:09 -08:00
bjorn 99a302ff38 Rasterizer; 2018-01-22 08:40:47 -08:00
bjorn a22740084c Rename FontData to Rasterizer; 2018-01-22 08:28:33 -08:00
bjorn 89891811b7 Create Sources from AudioStreams; 2018-01-22 08:14:24 -08:00
bjorn e5a17a4160 Create Textures from TextureData; 2018-01-22 08:14:18 -08:00
bjorn 1b9f81b57f Fix refcounting in lovr.data; 2018-01-22 08:08:47 -08:00
bjorn f0cac8fa69 Add luax_totype; 2018-01-22 08:08:26 -08:00
bjorn 56625b4dc2 Organize api.h; 2018-01-21 14:20:06 -08:00
bjorn 0cad6271dd AudioStream; 2018-01-21 13:26:00 -08:00
bjorn fa630b6414 AudioStream bufferSize is configurable; 2018-01-21 13:10:16 -08:00
bjorn aa5f51acb3 AudioStream is refcounted; 2018-01-21 13:08:06 -08:00
bjorn 9cd47faf05 Rename SourceData to AudioStream; 2018-01-21 12:54:16 -08:00
bjorn 82ca82862d Source:getChannels -> Source:getChannelCount; 2018-01-21 12:23:49 -08:00
bjorn b7a21d1f90 Fix projection matrix for 3d canvases; 2018-01-20 21:44:44 -08:00
bjorn 1e97c716de TextureData; 2018-01-20 21:33:09 -08:00
bjorn a14f5734d5 Add lovr.data module; 2018-01-15 23:13:26 -08:00
bjorn 9ece4a3b09 Release font blob after telling freetype we're done with it; 2018-01-14 15:16:27 -08:00
bjorn 28512bd2ea rm unused ModelData function; 2018-01-14 13:56:54 -08:00
bjorn 83b85ec47d Fix alphabetization; 2018-01-14 13:35:57 -08:00
bjorn 255c001717 Simplify mipmaps; 2018-01-14 13:21:34 -08:00
bjorn 3d0e761198 Fix problem passing flags to lovr.graphics.newTexture; 2018-01-14 13:05:14 -08:00
bjorn f634e17e5c Avoid resetting clock after boot.lua;
Fixes an issue where the initial dt was negative.
2018-01-13 16:00:47 -08:00
bjorn 82cd9d0414 Fix Texture:setFilter for cubemap textures; 2018-01-12 20:25:41 -08:00
bjorn 8d49e05772 Don't cast floats to ints in Shader:send; 2018-01-09 20:55:14 -08:00
bjorn d67ec24884 Fix Joint:getType returning nil for DistanceJoints; 2018-01-09 19:42:09 -08:00
bjorn 7f73dfeb24 Pass arguments through to Canvas:renderTo callback; 2018-01-08 21:54:34 -08:00
bjorn f9e49f5afa Error if Canvas:renderTo does not receive a function; 2018-01-08 21:52:43 -08:00
bjorn 444abcb1c3 Improve lovr.graphics.newCanvas error messages;
Returns better error messages when width or height is not positive.
2018-01-08 21:22:42 -08:00
bjorn 511598f605 Fix lovr.headset.getDisplayDimensions when called in lovr.load; 2018-01-08 21:16:34 -08:00
bjorn e2c27fb74c Fix lovr.draw arguments; 2018-01-08 18:33:51 -08:00
bjorn 11586e8248 rm lovr.headset.getBoundsGeometry; 2018-01-06 15:49:19 -08:00
bjorn aef6345606 Prevent loading of conf.lua outside project directory; 2018-01-05 23:04:47 -08:00
bjorn f857f4e94d Average FPS over 90 ticks instead of 60; 2018-01-05 22:43:35 -08:00
bjorn 832a470c90 Make controller models more safe; 2018-01-05 21:09:32 -08:00
bjorn 2727544408 Copy strings in loader; 2018-01-04 18:49:14 -08:00
bjorn 881a515687 Fix model transform initialization; 2018-01-04 08:49:58 -08:00
bjorn 7b58012854 Flip sphere uvs; 2018-01-01 20:39:50 -08:00
bjorn 31f6401fdd Fix webvr; 2018-01-01 20:37:31 -08:00
bjorn 70ca4e3875 v0.9.1; 2017-12-31 20:26:42 -08:00
bjorn abee677d38 Give OpenVR canvas a stencil buffer; 2017-12-31 20:25:51 -08:00
bjorn de320be1cd Improve error messages in the filesystem loader;
Also fix a memory leak in lovr.filesystem.load.
2017-12-31 13:20:42 -08:00
bjorn aa4ceafbf2 Add headset type for Windows MR headsets; 2017-12-30 12:21:51 -08:00
bjorn 08cda7bad6 Fix glBindFramebuffer call; 2017-12-18 22:15:24 -08:00
bjorn 5b77d42fa0 Use proper number of MSAA samples for headset canvas; 2017-12-18 20:00:53 -08:00
bjorn 77d8b96cfd lovr.graphics.stencil; 2017-12-18 19:48:28 -08:00
bjorn 8acd7444af lovr.graphics.getStencilTest; lovr.graphics.setStencilTest; 2017-12-18 18:37:03 -08:00
bjorn 662572c4e0 Add boot.lua back; 2017-12-18 16:01:12 -08:00
bjorn f43272adc3 lovr.headset.getPose; Controller:getPose;
Remove lovr.headset.getEyePosition.  It is now an optional first
argument to the other lovr.headset functions.
2017-12-17 22:20:29 -08:00
bjorn 5401c2f3c6 Fix OpenVR render model loading; 2017-12-17 22:20:29 -08:00
bjorn 0028bbd51e Throw an error if a texture is too big; 2017-12-17 19:19:09 -08:00
bjorn 386ab78ae9 Throw an error if font texture overflows; 2017-12-17 19:13:04 -08:00
bjorn 5f38153cf1 Initialize animation track alphas properly; 2017-12-17 18:24:43 -08:00
bjorn 1d20e49829 Move api header; 2017-12-10 12:41:43 -08:00
bjorn 72aa7e858a Rename loaders to data; 2017-12-10 12:41:43 -08:00
bjorn 4a2cc56fef Move shaders into resources; 2017-12-10 12:41:43 -08:00
bjorn 2d2a4cf038 Rename data to resources; 2017-12-10 12:41:43 -08:00
bjorn c3fc7b61fd Fix crash with lovr.graphics.newMaterial; 2017-12-10 12:41:43 -08:00
bjorn 3b9db7fd42 Give OpenVR its depth buffer back; 2017-12-09 22:51:37 -08:00
bjorn 6f58b758e3 Fix texture coordinates; 2017-12-09 20:09:27 -08:00
bjorn 6df8dfe456 Canvas:getFormat; 2017-12-09 20:09:27 -08:00
bjorn ee36b47864 Depth/stencil buffers; More work on Canvas API; 2017-12-09 20:09:27 -08:00
bjorn 928ee06655 Floating point texture formats; 2017-12-09 20:09:27 -08:00
bjorn fa8af65073 Refactor texture formats; 2017-12-09 20:09:27 -08:00
bjorn c6a395fa21 Switch to table variant of newCanvas API; 2017-12-09 20:09:27 -08:00
bjorn 2243fe10ae Flip canvas perspective projection; 2017-12-09 20:09:27 -08:00
bjorn 0eebea28a9 Canvas:getMSAA; 2017-12-09 20:09:27 -08:00
bjorn 6577133635 Canvases can be used anywhere Textures are; 2017-12-09 20:09:27 -08:00
bjorn d261e4b00d Start Canvas objects; 2017-12-09 20:09:27 -08:00
bjorn 8eec247adb lovr.graphics.getStats; 2017-12-09 20:07:42 -08:00
bjorn 650f100b15 Fix bug where Shader:send uses incorrect number of values; 2017-12-08 13:04:43 -08:00
bjorn c6b7d9729d rm lovrGraphicsGetWindow; 2017-12-03 15:23:38 -08:00
bjorn b9b1238968 v0.9.0; 2017-12-01 20:11:34 -08:00
bjorn da0afb487c Small fixes for WebVR; 2017-12-01 19:59:55 -08:00
bjorn 8e686bba92 Only enable mouselook on press;
For better WebVR experience.
2017-12-01 19:36:05 -08:00
bjorn a698edc475 Bugfixes; 2017-11-30 21:17:54 -08:00
bjorn b48ceb7526 Fix bug with model IO; 2017-11-29 19:06:04 -08:00
bjorn 2869bac3cd Fix animation alpha; 2017-11-29 00:00:13 -08:00
bjorn 3756c06ec7 More flexible shorthands for texture and material args; 2017-11-28 20:42:36 -08:00
bjorn 17565ab201 Fix seeking animations to negative values; 2017-11-28 16:52:01 -08:00
bjorn c51731f869 Fix animations with negative speeds; 2017-11-28 16:50:43 -08:00
bjorn 251132d106 Fix bug with Animator:reset; 2017-11-28 14:38:47 -08:00
bjorn 2a43269222 Add OVR_multiview extension; 2017-11-27 20:53:46 -08:00
bjorn 097a88302e Add lines and linestrip MeshDrawModes; 2017-11-25 19:49:22 -08:00
bjorn ddd905627b Mesh:drawInstanced; Model:drawInstanced;
No attribute divisors yet.
2017-11-25 19:45:44 -08:00
bjorn cb2265e547 Remove material from graphics state;
It is now local state to models and meshes and can be passed as
an optional first argument to most primitives.
2017-11-25 19:02:28 -08:00
bjorn 093ef37bf3 Gamma correct colors correctly; 2017-11-25 17:57:59 -08:00
bjorn 7c64bac1c6 Fix windows path normalizing for referenced textures; 2017-11-25 13:42:55 -08:00
bjorn a9c53372ad Ensure animator is NULL on model creation; 2017-11-25 13:30:02 -08:00
bjorn c6d29f5de3 Add the ability to select headset drivers at runtime;
Messy.
2017-11-25 13:02:09 -08:00
bjorn bb90c8d378 Reduce max bones per mesh to 48; 2017-11-25 12:29:40 -08:00
bjorn f63c3c9261 Formatting; 2017-11-25 12:14:00 -08:00
bjorn 1695cc6be1 Subdivide meshes with high bone counts; 2017-11-25 12:03:59 -08:00
bjorn 5e2c2e0092 Use readBytes and writeBytes intead of read and write; 2017-11-25 12:03:59 -08:00
bjorn b2a05612db Fix assimp file IO type signatures; 2017-11-25 02:26:45 -08:00
bjorn eecc675043 Make textures immutable and fix font atlas resizing; 2017-11-24 14:13:07 -08:00
bjorn ef0ba9124d lovr.math.gammaToLinear; lovr.math.linearToGamma; 2017-11-24 00:53:08 -08:00
bjorn fd9c714d0f Ask glfw for an srgb capable window; 2017-11-24 00:17:52 -08:00
bjorn f34d3536cf Gamma correction for OpenVR; 2017-11-23 23:40:20 -08:00
bjorn 76f690e813 Guard against empty textures; 2017-11-23 23:29:45 -08:00
bjorn 066046b408 Use proper sized texture formats; 2017-11-23 15:21:59 -08:00
bjorn 2b88d51ff8 Add texture/color variants to lovr.graphics.newMaterial; 2017-11-23 14:41:22 -08:00
bjorn 4fb72d8cb9 rm printf; 2017-11-23 14:24:50 -08:00
bjorn 1662e79f0e Use srgb formats for textures; 2017-11-23 14:19:20 -08:00
bjorn f7d7098098 Add GL_EXT_texture_sRGB extension; 2017-11-23 13:09:40 -08:00
bjorn 7b5eb71ade Regen boot.lua; 2017-11-22 20:28:06 -08:00
bjorn 3c6437fb20 lovr.graphics.isGammaCorrect; conf.lua t.gammacorrect; 2017-11-22 20:26:01 -08:00
bjorn 8bda7a9ed8 Minor cleanup of previous change; 2017-11-22 20:13:36 -08:00
bjorn ad779820a7 Refactor lovr.conf to be exposed to C;
This simplifies boot.lua and means we don't need private functions
all over the place for the stuff configured by conf.lua.
2017-11-22 20:11:51 -08:00
bjorn 5c45282d9b lovr.graphics.arc; 2017-11-22 11:32:30 -08:00
bjorn b540fdbfdb Forgot line draw mode for circle; 2017-11-21 20:56:47 -08:00
bjorn 81c29176ab lovr.graphics.circle; 2017-11-21 20:53:45 -08:00
bjorn 602e0ced7d Floating point colors;
This is a breaking change.
2017-11-20 21:47:36 -08:00
bjorn 65418da1ec Use nodeMap to avoid node index lookup; 2017-11-20 21:19:46 -08:00
bjorn 652c31f8d4 Optional pose; 2017-11-20 21:16:16 -08:00
bjorn 659a2899e6 Allow partial uniform updates; 2017-11-20 21:13:06 -08:00
bjorn 27b24e4de3 Use correct origin type for fake headset; 2017-11-20 19:33:51 -08:00
bjorn c1b95c2bd6 More multidimensional arrays; 2017-11-20 18:50:06 -08:00
bjorn 5edd616da8 Cleanup; 2017-11-20 18:42:29 -08:00
bjorn 803cdaa8a5 Early return for renderNode; 2017-11-20 18:19:39 -08:00
bjorn 17ffebd6ae Use computed global transforms instead of local; 2017-11-20 18:17:06 -08:00
bjorn 2f0aab03be Model:getAnimationCount; 2017-11-20 18:15:10 -08:00
bjorn 4a07d56091 rm inverseRootTransform; 2017-11-20 18:13:34 -08:00
bjorn 9d83684c9c rm unused variable; 2017-11-20 18:12:32 -08:00
bjorn 1a73fcb3cc Use pose instead of boneTransform; 2017-11-20 18:12:08 -08:00
bjorn 54259f816c Animation track priority; 2017-11-20 17:57:21 -08:00
bjorn b9b9a42a05 Everything works but is gross; 2017-11-19 16:45:00 -08:00
bjorn 49ab151b53 WIP; 2017-11-13 17:47:56 -08:00
bjorn 69b5569f9e Model computes bone transforms from Animator; 2017-11-06 20:25:08 -08:00
bjorn 33ff7f2b9c Add lovrAnimatorEvaluate; 2017-11-06 20:22:30 -08:00
bjorn 855ffb9e34 Add vec3_lerp; 2017-11-06 17:11:40 -08:00
bjorn f5275934b6 Add quat_slerp; 2017-11-05 13:57:52 -08:00
bjorn c3749eb9bd Model:getAnimator; Model:setAnimator; 2017-11-05 13:41:47 -08:00
bjorn 03d3a9f77d Animator:getPriority; Animator:setPriority; 2017-11-04 15:55:33 -07:00
bjorn 5809a39a12 Animator:getAlpha; Animator:setAlpha; 2017-11-04 15:51:44 -07:00
bjorn c469d1ca19 Animator:isPlaying; Looping fixes; 2017-11-04 15:48:52 -07:00
bjorn 4f4d95ddec Animator:isLooping; Animator:setLooping; 2017-11-04 15:31:47 -07:00
bjorn 93c6597f09 Animator:reset; 2017-11-04 15:21:46 -07:00
bjorn 3cc02497f6 Animator:getAnimationNames; Animator:getDuration; 2017-11-04 15:11:42 -07:00
bjorn c87ed6aec3 Load animation duration; 2017-11-03 18:38:43 -07:00
bjorn 34ddfbaed3 Animator:getSpeed; Animator:setSpeed; 2017-11-03 18:38:43 -07:00
bjorn 748c467b1c Animator:seek; Animator:tell; 2017-11-03 18:36:37 -07:00
bjorn 23b4750e9c Animator:play; Animator:stop; Animator:pause; Animator:resume; 2017-11-03 18:28:54 -07:00
bjorn 4249cb4cc6 Animator:update; 2017-11-03 18:27:02 -07:00
bjorn ff0d007afe Start Animator; 2017-11-02 23:47:25 -07:00
bjorn 1f4404a695 Update to support special characters in Windows; 2017-11-02 19:01:31 -07:00
bjorn 051663eff6 Fix null dereference with setting mesh vertex maps; 2017-11-01 23:29:20 -07:00
bjorn d57d943618 Fix bug when loading certain material textures from models; 2017-11-01 23:25:46 -07:00
bjorn 2c6cb28224 Use references when dealing with model materials; 2017-11-01 23:11:35 -07:00
bjorn 6a6c322eaa Load animations in model loader; 2017-11-01 23:10:21 -07:00
bjorn 28dec31e18 Add AnimationData; 2017-11-01 22:54:15 -07:00
Bjorn Swenson be087fd108
Merge pull request #26 from bcampbell/fake-headset
Fake headset - controller button event
2017-11-01 19:30:15 -07:00
bjorn 194382643b Add back Model:getAABB; 2017-11-01 19:27:58 -07:00
bjorn 60d25b2e11 Materials refcount their Textures properly; 2017-10-31 01:49:45 -07:00
bjorn cc019e5783 Improve Shader error messages; 2017-10-31 01:44:39 -07:00
bjorn 227dd67c00 Set default shader properly to avoid crash; 2017-10-31 01:33:16 -07:00
bjorn ecde864ec4 Use spooky BOOleans everywhere; 2017-10-31 01:14:09 -07:00
Ben Campbell 9d75de96a2 fake controller: apply offset 2017-10-29 10:42:20 +13:00
Ben Campbell 1127abeaf0 fake controller events (left mouse for trigger) 2017-10-29 09:33:54 +13:00
bjorn 1ebc527c74 Load vertex colors for models; 2017-10-23 19:24:29 -07:00
bjorn 8db7290ed3 Add vertex color attribute; 2017-10-23 19:24:29 -07:00
Bjorn Swenson 618be7b51d Merge pull request #24 from bcampbell/fake-headset
Fake headset
2017-10-23 11:24:03 -07:00
Ben Campbell b2c0d2e4e5 Doh. Move headset.update() outside audio-only oath
Also ditched the IsPresent check - makes no difference at the moment, but
I think a headset driver should get an update even if there's no
actual headset currently there...
2017-10-23 20:50:04 +13:00
bjorn a2a90f5c85 Add support for HRTF under emscripten; 2017-10-22 21:55:23 -07:00
Ben Campbell a5fe871605 switch up/down keys to Q/E
There was concern that SPACE/LEFTSHIFT might invoke the windows
stickykeys behaviours when held down.
2017-10-23 12:48:18 +13:00
Ben Campbell aaf2840e64 rename HeadsetImpl -> HeadsetInterface 2017-10-23 12:44:26 +13:00