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

1779 commits

Author SHA1 Message Date
bjorn da3bb42db4 Fix WebVR prototype; 2018-10-09 18:03:53 -07:00
bjorn 01405e113a Ensure Microphones properly stop recording; 2018-10-09 17:56:26 -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 28c56f959d Use MAT4_IDENTITY macro; 2018-10-06 21:58:40 -07:00
bjorn 7829f3f75f mat4_multiply: SSE
~2.5x
2018-10-06 21:42:52 -07:00
bjorn 0b2a39fb03 Return original matrix in mat4_invertPose; 2018-10-06 21:26:17 -07:00
bjorn 4279cf086f mat4_invertPose;
~3.9x
2018-10-06 21:21:25 -07:00
bjorn 11e6580717 mat4_transpose: Use SSE intrinsics;
~1.6x
2018-10-06 20:04:39 -07:00
bjorn 7354465e12 Add LOVR_USE_SSE; 2018-10-06 20:03:48 -07:00
bjorn 5e65ac019e OpenVR organization; 2018-10-06 18:15:32 -07:00
bjorn ba68c0c127 Add mat4_getPose helper; 2018-10-06 16:54:41 -07:00
bjorn e36d3d8352 openvr: Use WaitGetPoses in update; 2018-10-06 16:54:25 -07:00
bjorn 086a0030b1 Shader:send/ShaderBlock:send fills in nils with 0's; 2018-10-06 16:15:38 -07:00
bjorn 0d72922f77 Add lua_modules and deps to default C require path; 2018-10-05 00:43:41 -07:00
bjorn 70e473adb2 Add deps to default require path; 2018-10-05 00:43:41 -07:00
bjorn 6019de19d6 Add missing modelData include; 2018-10-01 21:07:29 -07:00
bjorn a1d365fc25 Plumb new mirror settings through WebVR; 2018-09-30 18:58:51 -07:00
bjorn 7976805415 openvr/oculus support individual eye mirroring; 2018-09-30 18:58:51 -07:00
bjorn 8d076f31c1 Fill accepts UV subrect to use; 2018-09-30 18:58:51 -07:00
bjorn a9e92b5185 Add ability to mirror specific eyes;
Doesn't work yet for OpenVR/Oculus.
2018-09-30 18:58:51 -07:00
bjorn cd5df6b148 Add __declspec; 2018-09-27 21:29:28 -07:00
bjorn 2398e592a9 Darn USE_MATH_DEFINES; 2018-09-27 20:32:45 -07:00
bjorn 816fda2177 Fix everything and merge; 2018-09-27 18:38:44 -07:00
bjorn 238af0064f Add missing lovr.filesystem.unmount function; 2018-09-27 18:38:44 -07:00
bjorn eb40c1980b Merge lovr.c into main.c; 2018-09-27 18:38:44 -07:00
bjorn 3e2259fc99 version/os refactor; 2018-09-27 18:38:44 -07:00
bjorn cee3c28f4e luax_atexit; rm lovrDestroy;
Modules register themselves in the registry for destruction at
lua_close instead of having a hardcoded list in lovrDestroy.
2018-09-27 18:38:44 -07:00
bjorn 92e6ad93cb Dynamically load modules; 2018-09-27 18:38:44 -07:00
bjorn e02d22365f api: refactor; 2018-09-27 18:38:44 -07:00
bjorn 792834623c api: more modular helper functions; 2018-09-27 18:38:44 -07:00
bjorn 1f12717357 Canvas creates Textures with clamp filter; 2018-09-27 18:37:13 -07:00
bjorn cfac548e7b Add flag to make Canvas depth texture readable;
- DepthFormat is now just TextureFormat.
- Canvas:getDepthTexture instead of Canvas:getDepthFormat.
2018-09-27 18:34:43 -07:00
bjorn 56fa853b09 Fix possible overflow in modelData texture path; 2018-09-26 23:16:18 -07:00
bjorn 05802f3e90 util: rm vec_uint; 2018-09-26 10:49:33 -07:00
bjorn 148a2bdb45 Error system no longer relies on Lua; 2018-09-26 10:39:17 -07:00
bjorn 737f0b6dc3 Fix edge case in lovrMeshResize;
Also make BufferUsage usage more consistent.
2018-09-23 19:13:32 -07:00
bjorn 2ec5c42f87 Fix compile warnings; 2018-09-21 23:34:15 -07:00
bjorn 2a17f6e4bb Add LOVR_USE_ASSIMP;
lovr.graphics.newModel and lovr.data.newModelData will return nil
if assimp is disabled.
2018-09-21 19:25:48 -07:00
bjorn 2d788e2f41 rm USE_OPENAL; 2018-09-21 19:25:48 -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
mcclure e2ace89b83 Fix controller:isDown() for 'grip' and 'trigger' on Oculus (#60)
Previously, controller:isDown('grip') returned always true, and for 'trigger' false was always returned. This adjusts oculusControllerIsDown() to use an axis threshold rather than the Shoulder bit for 'trigger', and to use a more demanding threshold for 'grip'.
2018-09-21 19:23:00 -07:00
bjorn 48dcb5067a Fix lovrTextureCreateFromHandle prototype; 2018-09-11 15:56:06 -07:00
bjorn 09a67949ed Improve CMake and build for LibOVR; 2018-09-11 15:47:03 -07:00
bjorn 72158f103a Update for stereo rendering and new headset API; 2018-09-11 15:30:31 -07:00
bjorn 75ca4b0cba lovrTextureCreateFromHandle; 2018-09-11 15:30:31 -07:00
bjorn 5b5e9fbc00 WIP; 2018-09-11 15:30:31 -07:00
bjorn 6b0806d04a Don't treat lighthouses as Controllers; 2018-09-11 15:28:31 -07:00
bjorn 7309ac8ce8 Treat trackers and lighthouses as Controllers; 2018-09-11 15:23:46 -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 40e6f6a81c Handle window resizes properly;
Fix for the web where the window actually resizes.
2018-09-05 11:11:57 -07:00
bjorn 924eb5fa0a Shader:send: Add a missing break;
opps
2018-09-05 10:13:04 -07:00
bjorn 8a7054e793 v0.11.0; 2018-09-05 08:02:50 -07:00
bjorn 9fa18495f2 Fix fake controller positioning; 2018-09-05 06:31:18 -07:00
bjorn ca6bd29501 bindBlockBuffer: fix buffer target for emscripten; 2018-09-05 04:44:19 -07:00
bjorn a13849b525 ShaderBlock:getShaderCode: Fix string length calculation; 2018-09-05 04:40:22 -07:00
bjorn 7a8abc80a2 Copy Transform objects more safely in Shader[Block]:send; 2018-09-05 04:22:12 -07:00
bjorn 1e351255f1 Fix UBO usage enum; 2018-09-05 04:10:12 -07:00
bjorn ddba19efad Work around glGenerateMipmap on macOS; 2018-09-05 03:54:43 -07:00
bjorn a5b9d267d0 Ensure int attributes are signed; 2018-09-05 03:25:13 -07:00
bjorn f47dccaaa3 Ensure GL state is tracked properly between restarts; 2018-09-04 15:02:55 -07:00
bjorn 5ebea9db71 Destroy Lua objects before destroying lovr;
This fixes a bug where physics Worlds are destroyed after
ODE is deinitialized, which can cause a segfault.  Instead we
collect Lua objects first and then destroy each module.  This
makes more sense and doesn't seem to have any consequences...
2018-09-04 14:45:01 -07:00
bjorn 7e1687ce6b Fix Shader:sendImage; 2018-09-04 06:58:54 -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 f17d57e987 Fix up problems with tracking incoherent resources; 2018-09-02 22:20:32 -07:00
bjorn fbd294f76d Empty textures default to linear instead of sRGB; 2018-09-02 21:15:59 -07:00
bjorn 2e881cbda0 Fix bad assert for image uniforms; 2018-09-02 21:15:43 -07:00
bjorn 3cc1b60fd8 Better default for anonymous texture depth; 2018-09-02 21:11:48 -07:00
bjorn b29a2d0471 Rework fake headset driver inertia; 2018-09-01 20:29:17 -07:00
bjorn 7aedff1278 Fix srgb settings for model import; 2018-09-01 06:27:24 -07:00
bjorn 59280c4e9d Fixes for compressed textures; 2018-09-01 05:40:45 -07:00
bjorn 064adef0bb Transform:getMatrix accepts target table; 2018-09-01 02:52:16 -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 ea331a12be Fix bugs; 2018-08-31 23:24:59 -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 d5c884b1d8 Fix emscripten warning; 2018-08-31 18:10:51 -07:00
bjorn 7b9a0ba048 Organize uniforms better; 2018-08-31 16:45:05 -07:00
bjorn dca52ee967 Improve newCanvas API; 2018-08-31 16:37:30 -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 f872a5f094 Re-enable threads for emscripten;
They don't appear to work very well but this simplifies code a lot.
2018-08-30 22:09:54 -07:00
bjorn 017066d45e More emscripten stuff;
SwapInterval was removed to ensure RAF timing is used.
2018-08-30 21:58:00 -07:00
bjorn 7222d1fa26 Use same window hints for webgl and desktop;
It doesn't seem like this causes any problems anymore.
2018-08-30 21:43:30 -07:00
bjorn 7055875cfa rm unnecessary emscripten ifdef for glfw context;
Now that the bug is fixed!
2018-08-30 21:40:31 -07:00
bjorn b7faeb8c44 Add precision for ints; 2018-08-30 21:37:45 -07:00
bjorn 7e889a564a Emscripten fixes; 2018-08-30 20:56:08 -07:00
bjorn ab1651a1a0 Diff active texture; 2018-08-30 19:42:01 -07:00
bjorn a8f9b899e0 Cleanup; 2018-08-30 19:40:31 -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 20faaf7479 ShaderBlock buffer bind fix; 2018-08-30 03:41:10 -07:00
bjorn 4631d2dacc Test shader extension fallback; 2018-08-30 03:38:31 -07:00
bjorn dd889a1c4a Diff viewport state; 2018-08-30 03:25:16 -07:00
bjorn e6a7a4f922 Redo singlepass; 2018-08-30 00:52:38 -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 a97c8e2266 Fix skybox texture mapping; 2018-08-30 00:06:29 -07:00
bjorn 1f4fee9b28 Fix newTexture flags; 2018-08-29 21:45:08 -07:00
bjorn 58747d6673 Rebase; 2018-08-29 21:31:07 -07:00
bjorn 56821b3aba lovrCanvasBlit works with MSAA; 2018-08-29 21:22:13 -07:00
bjorn ce2dfb523e Make window mono by default;
The window is now mono by default to make the error screen better and better enable non-stereo uses.  The Camera can now request that the window be treated as stereo.
2018-08-29 21:22:13 -07:00
bjorn e2d7310914 Fix sneaky MSAA bug; 2018-08-29 21:22:13 -07:00
bjorn 0dbdc78c87 Fix fake driver projection; 2018-08-29 21:22:13 -07:00
bjorn 4215ea2e24 Canvas getters; 2018-08-29 21:22:13 -07:00
bjorn 3c78eae42b Fix interaction between mipmaps/msaa resolution; 2018-08-29 21:22:12 -07:00
bjorn e287cee1c9 Canvas:newTextureData; 2018-08-29 21:22:12 -07:00
bjorn 74fec01e60 Canvas mipmaps flag; 2018-08-29 21:22:12 -07:00
bjorn 06fa846680 Resolve supports multiple color attachments; 2018-08-29 21:22:12 -07:00
bjorn 6104d3362e OpenVR MSAA flags; 2018-08-29 21:22:12 -07:00
bjorn a4912ce96e Only resolve if MSAA; 2018-08-29 21:22:12 -07:00
bjorn a5f6ff506b MSAA resolve; 2018-08-29 21:22:12 -07:00
bjorn c244cc02c1 rm AttachmentTypes; DepthFormats; 2018-08-29 21:22:12 -07:00
bjorn 3fb1b49549 MSAA canvases/textures but no resolving yet; 2018-08-29 21:22:12 -07:00
bjorn 6b87a71261 Allow Canvases to be used as Textures sometimes; 2018-08-29 21:22:11 -07:00
bjorn 36ec69e244 Fix pointer cast; 2018-08-29 21:21:38 -07:00
bjorn 590668a8d6 lovrGraphicsBlit; 2018-08-29 21:21:38 -07:00
bjorn 8bb45f4de4 Clean up viewports; 2018-08-29 21:21:07 -07:00
bjorn 26f411f43f Other headset drivers use stereo display dimensions; 2018-08-29 21:20:01 -07:00
bjorn 0af2704e5c openvr canvas changes; 2018-08-29 21:20:01 -07:00
bjorn f0806bb270 Pointers; 2018-08-29 21:19:41 -07:00
bjorn 21a869cc8b Clean up; 2018-08-29 21:19:41 -07:00
bjorn 671f0835c0 Fix lovr.headset.getDisplayWidth/Height; 2018-08-29 21:19:07 -07:00
bjorn 1ea3c84be9 Ugly viewport stuff; 2018-08-29 21:19:07 -07:00
bjorn 251f197c68 Free renderbuffer; 2018-08-29 21:18:33 -07:00
bjorn ee0f75484d newCanvas stereo flag; 2018-08-29 21:18:33 -07:00
bjorn 329668eb39 Additional Canvas validation; 2018-08-29 21:18:33 -07:00
bjorn 68d66f3f98 Canvas:renderTo; 2018-08-29 21:18:33 -07:00
bjorn 4cc8bd7582 Canvas depth buffer; 2018-08-29 21:18:33 -07:00
bjorn 3bf76e3497 Fix clear and canvas texture refcounts; 2018-08-29 21:18:33 -07:00
bjorn e8ec73657d lovrCanvasBind; 2018-08-29 21:18:33 -07:00
bjorn 7e74441afd getCanvas; setCanvas; Canvas attachments; 2018-08-29 21:18:33 -07:00
bjorn d39e9f1687 Depth texture formats;
I hope I don't hate myself for calling them d16, d32, etc.
2018-08-29 21:18:32 -07:00
bjorn f09f0d9424 newTexture takes w/h/format; 2018-08-29 21:18:32 -07:00
bjorn e9ebdc2d58 Rework TextureData creation functions; 2018-08-29 21:18:32 -07:00
bjorn 7795bb9276 I came in like a wrecking ball; 2018-08-29 21:18:32 -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 b50c2d018a Texture is optional in lovr.graphics.fill; 2018-08-23 11:44:00 -07:00
bjorn 6f72166f59 Only use 1 texture for skybox; 2018-08-22 12:09:51 -07:00
bjorn 3cc263454b rm CONTROLLER_BUTTON_JOYSTICK; 2018-08-22 11:27:36 -07:00
bjorn 7a866552e9 Fix remaining physics leaks; 2018-08-22 09:29:34 -07:00
bjorn c3b79b7274 Use updateWindow in fake headset getDisplayDimensions; 2018-08-20 15:09:08 -07:00
bjorn 5a55e56d9c Add sleep back to main loop;
To avoid pegging the CPU.
2018-08-20 14:48:06 -07:00
Bjorn Swenson 72b2dca38d
Merge pull request #52 from mcclure/no_openal_pr
Introduce -DUSE_OPENAL=0 CMake option which prevents inclusion of OpenAL
2018-08-20 13:42:49 -07:00
mcc 883883f0fa Introduce -DUSE_OPENAL=0 CMake option which prevents inclusion of OpenAL 2018-08-20 16:33:16 -04:00
mcc f69f6169fe Fix ControllerButton ordering, which broke isDown
The first item in ControllerButtons was NULL, which meant luaL_checkoption could not work.
2018-08-20 13:29:45 -04:00
bjorn 1f00948da0 Fix world/collider memory leaks; 2018-08-18 21:16:19 -07:00
bjorn d2b6def5c2 Shader:sendImage;
Can be used to bind images with specific slices, mipmap levels,
and access hints.
2018-08-17 19:53:54 -07:00
bjorn cab12ba945 Shader:setBlock accepts access hint; 2018-08-17 19:53:54 -07:00
bjorn a32b53b2cc UniformAccess for read/write block/image hints; 2018-08-17 19:53:54 -07:00
bjorn 198400828d Source:getType; 2018-08-17 19:53:54 -07:00
bjorn b5d7c0742f Fix Texture:setFilter; 2018-08-17 19:53:54 -07:00
bjorn 3eca158025 ty compiler; 2018-08-16 17:54:48 -07:00
bjorn 255bf4cb62 Load modules from lua_modules to support luarocks; 2018-08-16 14:57:31 -07:00
bjorn 96cfeedc94 Add rg16f and rg32f texture formats; 2018-08-16 14:54:37 -07:00
bjorn bd1bb5850e Load HDR files in floating point format; 2018-08-16 14:28:10 -07:00
bjorn a30fdc9749 Texture:getFormat; 2018-08-16 14:27:45 -07:00
bjorn 3d691ed087 Use defines to shrink stb_image footprint; 2018-08-16 14:21:24 -07:00
bjorn 7f158a3473 Tiny fix for headset msaa default; 2018-08-15 17:57:05 -07:00
bjorn 29e733503f Canvas works with new texture allocation method; 2018-08-15 17:56:19 -07:00
bjorn d036388209 Fix GL_IMAGE_2d constant; 2018-08-15 16:55:50 -07:00
bjorn a18540a934 Proper validation of uniform texture types; 2018-08-13 17:03:39 -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 0e0ac05c6f Attempt towards more comprehensive barriers; 2018-08-11 21:17:22 -07:00
bjorn 246e9b13b9 Better shader compilation error messages; 2018-08-11 00:09:47 -07:00
bjorn 1295481dc0 Better error message; 2018-08-11 00:09:47 -07:00
bjorn cc440c9784 Support format parameter in newTextureData; 2018-08-11 00:09:47 -07:00
bjorn 58dc34ec64 Proper format support for image uniforms; 2018-08-11 00:08:34 -07:00
bjorn 7528ac2db8 Fix texture format for image uniforms; 2018-08-11 00:08:34 -07:00
bjorn a1f200cb61 Use GLSL version 430 for compute shaders; 2018-08-11 00:08:34 -07:00
bjorn 6d10f5c7d0 Post-merge fixes; 2018-08-11 00:08:34 -07:00
bjorn 9ce462a67f Image uniforms; 2018-08-11 00:08:34 -07:00
bjorn d961614184 Attempt automatic glMemoryBarrier; 2018-08-11 00:08:34 -07:00
bjorn 9e111071e8 webgl stuff;
I shouldn't need to do this but will fix it later.
2018-08-11 00:08:34 -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 902239c017 lovr.graphics.wait; Barrier; 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 5c65fc811f Change "drawing" to "rendering" in comments; 2018-08-11 00:08:33 -07:00
bjorn 3dabe0cf34 setShader errors on compute shaders; 2018-08-11 00:08:33 -07:00
bjorn e371359193 Compute shader glsl prefix; 2018-08-11 00:08:33 -07:00
bjorn 98e518683a Add computeshaders to lovr.graphics.getSupported; 2018-08-11 00:08:33 -07:00
bjorn 3b51056870 lovr.graphics.compute; 2018-08-11 00:08:33 -07:00
bjorn 2cb6de47f2 Compute shader creation; 2018-08-11 00:08:33 -07:00
bjorn b1079f5ce8 Separate initialization for graphics/compute shaders; 2018-08-11 00:08:33 -07:00
bjorn bf3ed3ed1f Texture improvements;
Textures no longer keep references to their TextureData.
lovrTextureAllocate can now be used to allocate texture storage,
and isn't weirdly coupled to lovrTextureReplacePixels.
Better error messages for textures.
2018-08-09 16:12:57 -07:00
Bjorn Swenson 06379f33ee
Merge pull request #49 from bjornbytes/shader-block
ShaderBlock
2018-08-07 15:17:06 -07:00
bjorn ae70728ae1 Ok is this a driver bug or what; 2018-08-07 13:26:28 -07:00
bjorn 78d9cc0031 Actually set shader uniforms; 2018-08-06 13:44:46 -07:00
bjorn 8f529d3a37 Fix potential infinite loop in error handler; 2018-08-06 13:26:17 -07:00
bjorn 175de8924f Ensure uniform count is always positive; 2018-08-06 13:25:04 -07:00
bjorn bdf130800e ShaderBlock:getShaderCode; 2018-08-06 11:46:42 -07:00
bjorn f95685ba80 ShaderBlock:send(blob); 2018-08-06 10:42:23 -07:00
bjorn 86380e7694 ShaderBlock:getOffset; 2018-08-06 10:42:19 -07:00
bjorn e3e17bc84c ShaderBlock:isWritable; 2018-08-06 10:41:57 -07:00
bjorn 70b27bd846 Use new table shorthand for newShaderBlock formats;
Also luax_checkuniformtype and error message improvements.
2018-08-06 10:34:12 -07:00
bjorn 08b113f755 opps; 2018-08-06 09:12:59 -07:00
bjorn 22b674b737 emscripten guards; 2018-08-06 08:51:06 -07:00
bjorn 5cefe023d1 Fix issue where binding msaa canvas could fail; 2018-08-04 18:46:04 -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 c770ec6226 Fix undefined variable; 2018-08-03 19:21:15 -07:00
bjorn b33e0e33c5 Improve error messages slightly; 2018-08-03 13:19:28 -07:00
bjorn 66c1f373d3 Fix (i)vec3 std140; 2018-08-03 12:36:25 -07:00
bjorn 75159a7823 Error if you try to create an SSBO but it's not supported; 2018-08-03 12:30:01 -07:00
bjorn 96a1d96798 Shader refcounts its blocks; 2018-08-03 12:28:25 -07:00
bjorn 1d4992a1ff Enforce limits on UBO/SSBO count in Shaders; 2018-08-03 12:24:41 -07:00
bjorn 5e9ef9a757 rm writable from UniformBlock; 2018-08-03 12:22:28 -07:00
bjorn 1b7261de5c lovr.graphics.getSupported; 2018-08-03 11:46:21 -07:00
bjorn f6f322fc7f Treat UBOs and SSBOs more similarly to reduce duplication; 2018-08-03 11:34:11 -07:00
bjorn 76fb1681fa Storage buffer variable introspection; 2018-08-03 11:19:40 -07:00
bjorn da3356bb2f Shader introspection for storage blocks; 2018-08-02 17:18:03 -07:00
bjorn 7d9b728669 Remove 32 uniform limit; 2018-08-02 16:13:27 -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 1946f860f8 More storage block stuff; 2018-08-02 05:04:40 -07:00
bjorn b8faff6986 Add writable and usage flags to ShaderBlock; 2018-08-02 05:04:40 -07:00
bjorn ee213c8b5a Yeah yeah whatever std140; 2018-08-02 05:04:40 -07:00
bjorn d1923ce711 Put back apple instancing fix; 2018-08-02 05:04:40 -07:00
bjorn 73b50c22cd Fix some typos; 2018-08-02 05:04:40 -07:00
bjorn 5e8f4bb69c Shader:setBlock validation; 2018-08-02 05:04:40 -07:00
bjorn 7e3f256ba2 Spacing; 2018-08-02 05:04:40 -07:00
bjorn ce19599fec Improve uniform error messages; 2018-08-02 05:04:40 -07:00
bjorn 4589ce66d0 luax_checkuniform supports samplers; 2018-08-02 05:04:40 -07:00
bjorn 2b093b5828 ShaderBlock:send; Helper function for reading uniforms; 2018-08-02 05:04:40 -07:00
bjorn 18ee139341 rm shaderblock header; 2018-08-02 05:04:40 -07:00
bjorn a4052430a4 Shader:getBlock; Shader:setBlock; 2018-08-02 05:04:40 -07:00
bjorn 854431c9ea Rebase; 2018-08-02 05:04:40 -07:00
bjorn a372abb810 Reorganize uniform/block data structures; 2018-08-02 05:04:40 -07:00
bjorn e8afcb9b71 Shaders introspect their blocks; 2018-08-02 05:03:28 -07:00
bjorn 85ff844d24 lovrShaderBlockCreate; 2018-08-02 05:03:28 -07:00
bjorn 823886f03f Start newShaderBlock; 2018-08-02 05:03:28 -07:00
bjorn 23bfc4b5aa Fix bug with texture atlas expansion; 2018-08-02 03:41:21 -07:00
bjorn d0381cbf9d Don't forget to retain the blob; 2018-08-02 03:41:21 -07:00
bjorn 8405bff070 Use stb_truetype instead of FreeType; 2018-08-02 03:41:21 -07:00
bjorn 0b70285e30 Fix WebGL memcpys; 2018-08-02 03:40:47 -07:00
bjorn b6afc59b33 rm gpu.h 2018-08-02 03:31:45 -07:00
bjorn 76023b4b6c Fix Shader uniform leak; 2018-08-02 03:27:16 -07:00
bjorn abd1c75140 Properly release glyph TextureData; 2018-08-02 03:27:16 -07:00
bjorn ae4f0e1e6c Fix potential ModelData leaks; 2018-08-02 03:27:16 -07:00
bjorn 61e545c7e6 Fix Texture:encode leak; 2018-08-02 03:27:16 -07:00
bjorn e5fd9c7412 Fix SoundData leaks; 2018-08-02 03:27:16 -07:00
bjorn 2acc4761b7 Fixes for WebGL; rm sharpness from texture filter; 2018-08-02 01:31:23 -07:00
bjorn d7bb4321d0 Add parentheses around braced initializer lists; 2018-08-01 21:06:16 -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 3c2d644d9f Fake headset doesn't stomp on existing glfw callbacks; 2018-07-27 19:53:40 -07:00
bjorn 9e494cae46 Make custom events work; 2018-07-26 19:38:01 -07:00
bjorn 156c0cde5d Condense event code a bit; 2018-07-26 19:38:01 -07:00
bjorn 693766cf3b Hmm, byte vertex attributes can have more than 1 component; 2018-07-25 00:01:22 -07:00
bjorn d79afb44d2 Make gl_ViewportIndex work in fragment shaders; 2018-07-25 00:01:22 -07:00
bjorn 0b922a9703 rm Variant type name tracking; 2018-07-24 21:21:37 -07:00
bjorn d6daa885c8 Simplify luax_checktype and inheritance; 2018-07-24 21:15:07 -07:00
bjorn 83ddb82162 Simplify Lua object management; 2018-07-24 20:13:54 -07:00
bjorn bc2d638b00 Refs know their type; 2018-07-24 19:14:29 -07:00
bjorn 307d002954 Fix some strictness issues from windows; 2018-07-22 21:02:02 -07:00
bjorn eb45b6f04f Add the ability to set Texture LOD bias; 2018-07-22 20:37:27 -07:00
bjorn 66ca77abd1 Texture:replacePixels supports mipmap; 2018-07-22 20:37:27 -07:00
bjorn 2dc79a48a8 Use single pass stereo rendering when supported; 2018-07-21 05:30:13 -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 98e0522c4f Add more texture formats; 2018-07-20 17:45:25 -07:00
bjorn 5f06ca44c9 Improve error messages for bad vertex formats; 2018-07-20 15:53:53 -07:00
bjorn 686f621928 That error message was such a liar; 2018-07-20 15:51:58 -07:00
bjorn c46cff496e Fix minor issue with texture flag defaults; 2018-07-19 19:30:37 -07:00
bjorn 11a3937a5d Improved mipmap support;
- Texture dimensions functions take an optional mipmap level.
- Add Texture:getMipmapCount.
- Fix issue where textures always allocated mipmap storage.
2018-07-19 19:28:27 -07:00
bjorn 52f679e865 Remove shader length limit; 2018-07-19 02:03:46 -07:00
bjorn c6a97a9a23 Fix issue where nogame's conf was ignored; 2018-07-19 01:08:50 -07:00
bjorn c9c722959f Remove uniform.index; 2018-07-18 21:38:38 -07:00
bjorn b60a3c2f3b Reduce max uniform/attribute name length; 2018-07-18 21:34:34 -07:00
bjorn c19d69cfdd Fix dll/so loading; Respect hyphens; 2018-07-18 17:09:47 -07:00
bjorn d4c28f5770 Texture:replacePixels accepts x/y offset; 2018-07-18 01:36:29 -07:00
bjorn 8cc795aa9d Material:getTransform; Material:setTransform; 2018-07-18 01:17:16 -07:00
bjorn 5641afee13 Remove isDefault flag from Material; 2018-07-18 00:34:21 -07:00
bjorn 39532dc67a oops; 2018-07-18 00:33:56 -07:00
bjorn 317fa98bdd Fix sphere; 2018-07-17 19:20:40 -07:00
bjorn cfd96b2dee Fix Canvas stuff; 2018-07-17 19:20:33 -07:00
bjorn c065bda3f0 Some optimization/profiling of state changes; 2018-07-17 18:49:42 -07:00
bjorn 05b0ea203f WebVR update; 2018-07-17 17:21:15 -07:00
bjorn 132442cb01 Fix something that got messed up in Model; 2018-07-17 17:21:15 -07:00
bjorn b3be4a0b93 rm opengl.h; 2018-07-17 17:21:15 -07:00
bjorn ea551203c0 Refcount pipeline objects properly; 2018-07-17 17:21:15 -07:00
bjorn 65cd5e2eb9 Fix fake headset display dimensions in lovr.load; 2018-07-17 17:21:15 -07:00
bjorn f1f2c7b401 Yay all opengl is in opengl.c; 2018-07-17 17:21:15 -07:00
bjorn 2cf0e15eb0 Morganization; Fix some Canvas issues; 2018-07-17 17:21:15 -07:00
bjorn f57810cd7a Morganization; 2018-07-17 17:21:15 -07:00
bjorn 56bbf1cf56 Organization; 2018-07-17 17:21:15 -07:00
bjorn b4752dd6a1 Yay no GL in graphics.c; 2018-07-17 17:21:15 -07:00
bjorn 5c34406060 Use glfw constants instead of opengl constants for window hints; 2018-07-17 17:21:15 -07:00
bjorn 89fe9fa894 Organize limits; 2018-07-17 17:21:15 -07:00
bjorn 4239bc46ea Refactor graphics stats; 2018-07-17 17:21:14 -07:00
bjorn 0ee5d0b8f2 Anonymous materials for draw calls; 2018-07-17 17:21:14 -07:00
bjorn fe75c666a9 Simplify lovr.graphics.getWidth/Height; 2018-07-17 17:21:14 -07:00
bjorn b64489b020 Pipeline stack for graphics state; Simplify clearing; 2018-07-17 17:21:14 -07:00
bjorn 6933914650 Shift around glfw includes; 2018-07-17 17:21:14 -07:00
bjorn e0063995b3 More data driven primitives; 2018-07-17 17:21:14 -07:00
bjorn e6e8e137c0 Clean up drawing; 2018-07-17 17:21:14 -07:00
bjorn 322c0bdef7 GpuStats; 2018-07-17 17:21:14 -07:00
bjorn 7c7714214e Start gpuDraw; 2018-07-17 17:21:14 -07:00
bjorn c35415ba66 Move over texture binding; 2018-07-17 17:21:14 -07:00
bjorn 3c623bdc2e Move around texture helpers; 2018-07-17 17:21:14 -07:00
bjorn 8bf60b73ec Add opengl header; Migrate relevant object implementations; 2018-07-17 17:21:14 -07:00
bjorn eb456f5b52 rm stdio from graphics; 2018-07-17 17:21:14 -07:00
bjorn c86bb419f1 Use indirection for graphics object access;
This will make it easier to move stuff around.
2018-07-17 17:21:14 -07:00
bjorn 49e0438bd3 Remove unused shader properties; 2018-07-17 17:21:14 -07:00
bjorn 89c8ee3d06 Begin OpenGL quarantine; 2018-07-17 17:21:14 -07:00
bjorn b7a43e1762 Fix build; 2018-07-11 18:24:21 -07:00
bjorn b1b9dc734d Woops make sure to use cross platform dlsym; 2018-07-07 13:57:32 -07:00
bjorn 0214c7605e Support requiring dll/so files;
Still WIP
2018-07-07 13:55:22 -07:00
bjorn 22f6e7831b Support C require paths; 2018-07-06 21:21:07 -07:00
bjorn fedab9e46f lovr.math.noise; 2018-07-06 18:39:34 -07:00
bjorn 9208474203 Add noise1234; 2018-07-06 18:27:40 -07:00
bjorn b650f2b770 Add Microphone objects for audio capture; 2018-07-06 17:57:31 -07:00
bjorn 889144cc45 Add VERTEX and PIXEL/FRAGMENT defines to shader header; 2018-07-06 01:38:15 -07:00
bjorn e3b2a4d974 lovr.graphics.newShader accepts Blobs; 2018-07-06 01:35:00 -07:00
bjorn f444809f0f Assert is the bessstt; 2018-07-06 01:25:08 -07:00
bjorn 371551ca42 Add lineloop constant; 2018-07-05 23:44:45 -07:00
bjorn fdef90b7bc Add AudioStream:decode; 2018-07-05 23:30:37 -07:00
bjorn 4e146197b4 Remove AudioStream:seek; 2018-07-05 22:51:52 -07:00
bjorn ba503cdee7 Static source playback; 2018-07-05 22:46:30 -07:00
bjorn a670435239 Load static and stream Sources; 2018-07-05 22:08:14 -07:00
bjorn bc61e02f84 SoundData:getSample; SoundData:setSample; 2018-07-05 20:45:09 -07:00
bjorn 764f6eb595 Basic SoundData objects; 2018-07-05 20:23:46 -07:00
bjorn f903b6014c Use arrays for enums instead of maps; 2018-07-04 20:11:52 -07:00
bjorn 56ea2d43d0 Bones are ints; 2018-07-04 15:02:25 -07:00
bjorn bcd4d74f13 Use compound literals a bit more; 2018-07-04 14:46:52 -07:00
bjorn 94c432b4b4 rm length parameter from lovrRandomGeneratorSetState; 2018-07-04 14:07:48 -07:00
bjorn 57c8dfe146 Clean up includes; 2018-07-04 13:51:35 -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 6ac3829c62 Change audio velocity to have 3 components; 2018-06-17 01:59:15 -07:00
bjorn 2ebefd07a9 v0.10.0; 2018-06-13 21:20:33 -07:00
bjorn 6cbf4075ec Render OpenVR mirror window in stereo; 2018-06-12 20:14:53 -07:00
bjorn d71eccfd0b Ensure Mesh attachments are unmapped before drawing; 2018-06-12 02:05:19 -07:00
bjorn f4b9552052 Remove msaa check for framebuffer resolve;
Since resolve now does MSAA and mips.
2018-06-11 19:31:58 -07:00
bjorn b47e26e688 Disable GL clipping plane;
It was used for instanced stereo.
2018-06-11 19:31:35 -07:00
bjorn 26bb0ea1ac Reset canvas state in lovr.graphics.reset; 2018-06-11 19:00:43 -07:00
bjorn 54a9a8eb78 Fix lovrGraphicsSetCanvas framebuffer binding; 2018-06-11 19:00:43 -07:00
bjorn 4370b7f0f5 Fake headset cleanup; 2018-06-10 10:18:54 -07:00
bjorn df87eeee31 Inertia tuning; 2018-06-10 09:51:34 -07:00
bjorn ab1e46cab4 Add inertia timeout; 2018-06-10 09:51:34 -07:00
bjorn 8e013877d6 Add inertia to fake headset mouselook; 2018-06-10 09:51:34 -07:00
bjorn fb3eed5518 Fix skybox shaders for WebGL; 2018-06-09 23:18:02 -07:00
bjorn 17bf06b817 Fixes for openvr driver; 2018-06-04 19:49:36 -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
bjorn 7273811120 Some extra graphics state diffing; 2018-06-02 15:30:26 -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