Commit Graph

1010 Commits

Author SHA1 Message Date
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
Ben Campbell 6a5d4f98ea Add _USE_MATH_DEFINES, required for sane visual c 2017-10-23 12:37:19 +13:00
Ben Campbell dcc3d970a6 trim out some dead/commented code 2017-10-23 12:32:08 +13:00
Ben Campbell e218345e1f remove redundant text editor modelines 2017-10-23 12:27:26 +13:00
bjorn 00726fe89e Fix pointsize limit for WebGL; 2017-10-22 16:26:48 -07:00
bjorn cc651e7b4e Set point size in vertex shader for WebGL compatibility; 2017-10-22 16:14:53 -07:00
bjorn 2efe619317 Add Shader:hasUniform; 2017-10-22 15:58:56 -07:00
bjorn 076b378b80 Report correct line numbers for shader errors; 2017-10-22 15:39:21 -07:00
Ben Campbell 2de844ab66 back out hack to defer headset initialisation
fake headset code is now tolerant of being initialised before
the window is open.
2017-10-23 09:43:33 +13:00
Ben Campbell 54a0077356 oops - re-enable icon setting
(I was using GLFW 3.1 and had to disable the icon-setting code)
2017-10-23 09:38:24 +13:00
Ben Campbell a22a9ed1f4 Merge branch 'master' into fake-headset 2017-10-23 09:32:32 +13:00
bjorn 51ceb2a199 Rename shape data to stream data; 2017-10-22 07:37:31 -07:00
bjorn 65c26e47f2 Remove some weird Mesh return codes; 2017-10-22 07:20:40 -07:00
bjorn 2c0d85a84a Use UNSIGNED_SHORT for indices when possible; 2017-10-22 07:04:52 -07:00
bjorn e8e09c425e Reset material in lovr.graphics.reset; 2017-10-22 04:11:39 -07:00
bjorn d5b3a2243e Rename internal canvas to view; 2017-10-22 03:34:45 -07:00
bjorn 5498a4e13e Fix fullscreen textures; 2017-10-22 03:23:58 -07:00
bjorn 9b3723145b Changes for physfs 3; rm lovr.filesystem.exists; 2017-10-22 01:37:06 -07:00
bjorn d3f6110d73 Fix windows build; 2017-10-21 21:52:05 -07:00
bjorn c8a226fc78 Fix lovrFilesystemRead error handling; 2017-10-21 20:23:29 -07:00
bjorn 231056e7e0 Fix issues with model IO; 2017-10-21 20:19:33 -07:00
bjorn bbae209623 Controller render models work with Material system; 2017-10-21 15:30:35 -07:00
bjorn 40c2121108 Fix nogame screen; 2017-10-21 15:24:00 -07:00
bjorn 9e9b0b7b94 Material support for Models; 2017-10-21 15:20:16 -07:00
bjorn dece1d896f Update skybox and font rendering; 2017-10-21 14:59:34 -07:00
bjorn 16915e4fa2 Material graphics state; 2017-10-21 14:32:41 -07:00
bjorn d658c80e57 Add Material API; 2017-10-21 14:05:58 -07:00