Commit Graph

157 Commits

Author SHA1 Message Date
bjorn 6f24da9f7f Rework Tupfiles;
- One toplevel Tupfile that makes it more clear what happens.
- Add config flags for -Werror, -fsanitize, and separate debug/optimize flags.
- Automatically integrate with libs built by CMake (build folder, rpath, libs folder).
- Disabling modules actually works, only the stuff that's needed is built.
2019-12-13 06:52:57 -08:00
bjorn 5957d07448 Fix warnings; 2019-12-13 03:41:35 -08:00
bjorn 1ebe68b934 tup: make CONFIG_ENET=n work; 2019-12-10 15:21:34 -08:00
bjorn 488c125c5f Draw the rest of the owl; 2019-12-10 12:19:50 -08:00
bjorn d21911d010 Add core/map hash table; rm lib/map; 2019-10-30 00:07:05 -07:00
bjorn cd09e1e695 rm sds; 2019-08-21 16:30:20 -07:00
bjorn 8d4760167f luax is now api; 2019-08-21 15:27:26 -07:00
mcc 38886f0dc4 Patch sds.h so that it can be #included from C++
Empty arrays aren't allowed in C++, so a single dummy element has to be added. sds works by scary cast magic so this dummy element is never actually allocated. A #define is used in this patch so in C this compiles exactly the same as before.
2019-07-10 14:58:55 -07:00
bjorn eb1e257209 Add new array implementation; Upgrade filesystem;
Filesystem:

- Uses streaming file IO.
- Uses less memory when requiring files.
- Simplifies its require path implementation.
2019-06-16 13:30:30 -07:00
bjorn 79083c7df1 Fix warnings on newer versions of gcc; 2019-06-11 19:57:20 -07:00
bjorn f3d31cf4ef Add multiview and timer query extensions; 2019-05-28 03:14:08 -07:00
bjorn 5b1e281d4c Switch to a fork of LuaJIT that supports android; 2019-05-21 00:26:21 -07:00
bjorn 7645f4c014 Add core folder; 2019-05-20 02:47:33 -07:00
bjorn b8ed63fcc4 Fix double/float conversions; 2019-05-13 04:28:57 -07:00
bjorn 9a1579a773 Ensure maf symbols are exported on unix; 2019-05-12 22:23:28 -07:00
bjorn 26c1859531 Update WebVR; 2019-05-12 22:23:28 -07:00
bjorn c2fc7daf2d Split mat4_getTransform; 2019-05-12 22:22:29 -07:00
bjorn 801f997b0a Use vectors for headset pose accessors; 2019-05-12 22:22:29 -07:00
bjorn ed725927c3 OpenXR headset backend; 2019-05-12 22:22:29 -07:00
bjorn 965f39f834 Do less work in lovr.headset.getPosition/getOrientation; 2019-05-12 22:22:29 -07:00
bjorn b95c97ff57 rm unused mat4_setTransform function; 2019-04-20 14:15:43 -07:00
bjorn f268810d2a Minor cleanup; Fix some undefined behavior; 2019-04-20 13:11:11 -07:00
bjorn ec7b2c0b68 Formatting; 2019-04-20 12:07:26 -07:00
bjorn 196b4ed010 Rename math to maf;
It's funnier and more compatible with some compiler setups,
since it won't get confused with the system <math.h>.
2019-04-20 11:39:20 -07:00
bjorn 14cab6cd3c Move utf helper into lib; 2019-04-05 04:04:52 -07:00
bjorn 793dca03d1 Fix resulting clang warnings; 2019-03-17 01:01:54 -07:00
bjorn 85c51399a6 Fix MSVC warnings; 2019-03-17 00:58:13 -07:00
bjorn e24a80685b Update stb_image_write;
And disable stdio support for it, since it isn't needed.
2019-03-07 00:02:11 -08:00
bjorn 6857b01ac0 Start OBJ parser; Optimize glTF parsing; 2019-02-13 15:10:52 -08:00
bjorn b1b6ec0f6d Parsing improvements; 2019-02-13 15:10:52 -08:00
bjorn 6b323e3476 Start parsing glTF; 2019-02-13 15:10:52 -08:00
bjorn 50e86579c2 vec3:min; vec3:max; 2019-02-08 12:39:10 -08:00
bjorn b78e7a15bb Add OpenGL ES support to glad header; 2019-01-29 22:04:15 -08:00
bjorn 5770b63108 Revert "Add stb_sprintf;"
This reverts commit da565296fd.
2019-01-24 17:40:22 -08:00
bjorn bda248b86e Be more intentional about doubles vs. floats; 2019-01-24 16:48:06 -08:00
bjorn da565296fd Add stb_sprintf; 2019-01-18 08:55:29 -08:00
mcc d8147dd67d Small portability compile fixes in headers 2019-01-14 13:17:40 -08:00
bjorn 538f5f8aa1 Trim stbtt;
Removes functionality from stb_truetype that isn't being used.
This makes it compile 25% faster (~.5s).
2019-01-11 14:01:55 -08:00
bjorn 305acb89a9 Fix quaternion multiplication signs; 2019-01-11 05:35:08 -08:00
bjorn 40c7deaefe Vector API improvements; 2019-01-06 03:25:00 -08:00
bjorn 4f716499b0 Fix declspec for math functions;
LuaJIT can't find math functions on windows unless they are exported.
2019-01-04 02:18:21 -08:00
bjorn 0a6de472ae Add ARB_buffer_storage; 2018-12-05 10:19:24 -08:00
bjorn ba192374dc Start math types; 2018-12-02 12:08:07 -08:00
mcc ca75cb37c1 Awkward hotfix to tinycthread.h
Becuase of https://github.com/tinycthread/tinycthread/issues/47 . Only needed on Android. Not needed in the glfw tinycthread because we don't use glfw on Android.
2018-11-30 13:00:28 -08:00
bjorn ca0034e0aa rm lib/glfw; 2018-11-16 04:44:36 -08:00
bjorn 005d4b93f2 Move math helpers into lib;
They aren't really part of the math module since they are shared
across several modules, more "util"-y.
2018-11-15 08:03:51 -08:00
mcc 64b187ef3f Manual merge args-and-physfs PR branch with master 2018-11-13 22:09:47 -05:00
mcc 2213b3bcfd Allow the mountpoint to be set "inside" a zip file, using an --inside parameter.
This is used in the oculus mobile driver, allowing replacement of the (dubious) recursive-copy-from-zip code.

In order for this to work, the argument parsing must be beefed up a bit and also PhysFS must be updated to the newest master in order to get a new PHYSFS_setRoot. The github submodule source has been changed to one which updates more frequently to get this.
2018-11-13 15:20:04 -05:00
bjorn 8b2f0eb0ba Add newline to glfw.h; 2018-11-08 14:13:39 -08:00
mcc b01a349275 Merge Windows build fixes for SDS library, from https://github.com/LynnKirby/sds fork commit 1ea0479693a8fd85351b75a6d41cef40a8e3e67c 2018-11-07 17:03:31 -05:00
mcc b146ad422f Add SDS string library from commit 8dc8d6fb373bdc08eb82a72904841998d30b7cf2 2018-11-06 18:39:12 -05:00
mcc 8301bd7dd8 Remerge oculus-mobile branch with master 2018-11-02 18:10:08 -04:00
mcc 428995b54b Controller support (orientation wrong currently) and time/dt support 2018-11-02 17:35:24 -04:00
mcc dd440b2ada Code cleanup after all these changes, fix build 2018-10-28 15:31:27 -04:00
bjorn f6d5bf325a Move lib/dds.h into data/textureData.h; 2018-10-26 16:56:16 -07:00
mcc b892d0143f Remerge oculus mobile and master branches (to get lovrCanvasCreateFromHandle) 2018-10-25 00:06:39 -04:00
mcc 5ad8fdd3e3 Fixes as far as running without crashes, no display yet 2018-10-24 23:40:11 -04:00
bjorn 0f54190a9f rm weird include in dds.h; 2018-10-24 09:42:32 -07:00
mcc 56f8f1e26b Untested merge of Oculus Mobile branch and Oct 2018 lovr master 2018-10-22 10:44:04 -04:00
mcc 1b7942e02f First pass oculus mobile support
First of several commits, this is the state of hg:6b437880cc01 in my private repo. A version of shakesoda's Oculus-desktop support is tied up in this commit.

The oculus mobile version builds lovr as a library. To run it, you need to use a separate repo which includes this one and which builds an Android app.
2018-10-20 15:22:24 -04:00
bjorn a5256aaa27 Happy little graphics refactors; 2018-08-31 06:03:35 -07:00
bjorn 6058fbc5cd Modify GL extensions;
- rm NV_stereo_view_rendering
- rm NV_viewport_array2
- add AMD_vertex_shader_viewport_index
2018-08-30 00:26:10 -07:00
bjorn 3d691ed087 Use defines to shrink stb_image footprint; 2018-08-16 14:21:24 -07:00
bjorn c3823a6f9a ARB_shader_image_load_store; rm opengl es from glad;
This means we had to remove rgb565 and FRAMEBUFFER_INCOMPLETE_DIMENSIONS.
2018-08-11 00:08:34 -07:00
Bjorn Swenson 06379f33ee
Merge pull request #49 from bjornbytes/shader-block
ShaderBlock
2018-08-07 15:17:06 -07:00
bjorn 085ee71d86 ARB_compute_shader; ARB_program_interface_query; ARB_shader_storage_buffer_object; 2018-08-02 15:34:58 -07:00
bjorn 8405bff070 Use stb_truetype instead of FreeType; 2018-08-02 03:41:21 -07:00
bjorn 7d5f2ba75a Add ARB_viewport_array; 2018-07-21 05:29:43 -07:00
bjorn 86c64e73c1 Add GL_NV_stereo_view_rendering; Add GL_NV_viewport_array2; 2018-07-21 03:03:52 -07:00
bjorn bdde8ac4b9 rm OVR_multiview extension; 2018-07-20 18:12:51 -07:00
bjorn 6933914650 Shift around glfw includes; 2018-07-17 17:21:14 -07:00
bjorn 3c623bdc2e Move around texture helpers; 2018-07-17 17:21:14 -07:00
bjorn 89c8ee3d06 Begin OpenGL quarantine; 2018-07-17 17:21:14 -07:00
bjorn 9208474203 Add noise1234; 2018-07-06 18:27:40 -07:00
bjorn 8217cb4abd Disable stb_vorbis stdio functions; 2018-06-17 02:15:36 -07:00
bjorn f976b47b2d Omit stb_vorbis pushdata API; 2018-06-17 02:10:26 -07:00
bjorn 530667716c Add tinycthread; 2018-02-23 18:37:24 -08:00
bjorn 8ad882e7a4 Add VertexData object; 2018-02-10 17:27:29 -08:00
bjorn c538474339 TextureData:encode; 2018-02-08 20:17:50 -08:00
bjorn ef9c4b782d Add missing include to vertex.h; 2018-01-31 22:31:43 -08:00
bjorn 032788003a VertexData; IndexData; 2018-01-27 12:51:41 -08:00
bjorn 66d0e42908 Refactor VertexFormat; 2018-01-26 19:11:40 -08:00
bjorn ea7f3d48a2 Refactor MeshFormat; 2018-01-26 19:01:41 -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 2a43269222 Add OVR_multiview extension; 2017-11-27 20:53:46 -08:00
bjorn f7d7098098 Add GL_EXT_texture_sRGB extension; 2017-11-23 13:09:40 -08:00
bjorn c69d6a72d8 Mention ddsparse; 2017-08-09 01:57:18 -07:00
bjorn 4e81bc6cd9 Fix Linux glad include; 2017-08-03 00:57:47 -07:00
bjorn 48733f87c4 Just use EMCSRIPTEN instead of LOVR_WEB; 2017-08-01 12:16:09 -07:00
bjorn 6a13ac5ee1 Don't include glad on web; 2017-07-31 02:41:44 -07:00
bjorn 8bf2048cf2 Use header files for lua libraries; 2017-07-23 23:03:13 -07:00
bjorn cb7ac8e656 Add enet; 2017-07-23 23:03:13 -07:00
bjorn d3ac98e248 rm unused code; 2017-07-23 16:24:43 -07:00
bjorn f1141664b6 Mipmap generation; 2017-07-23 16:24:43 -07:00
bjorn 344320a19d Parse DDS; 2017-07-23 16:24:43 -07:00
bjorn b25d345e72 Add compressed texture formats; 2017-07-23 16:24:43 -07:00
bjorn b76480f9f2 Add texture compression and filter extensions; 2017-07-23 16:24:43 -07:00
bjorn e485f7d628 Fix glad in windows; 2017-06-23 19:42:58 -07:00
bjorn e5a311af09 Add glad for windows; 2017-06-23 19:35:49 -07:00
bjorn 52b203240d Fix mapped buffers for WebGL 2; 2017-06-18 16:19:26 -07:00