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

721 commits

Author SHA1 Message Date
bjorn 5deae0a103 Rename setWindow back to createWindow;
I'm not sure why this was changed.  It doesn't make very much sense
because setWindow can't be called multiple times, and it can't be
called with nil/NULL.
2019-01-20 20:06:40 -08:00
bjorn 8f9d24c51f Replace sprintf with stb version; 2019-01-18 08:55:29 -08:00
bjorn e6d9b82bba Adjust BlockType; getValue -> read; 2019-01-16 10:02:44 -08:00
bjorn ee7544eba8 ShaderBlock:getValue; Shader:send vector fixes;
Allows you to read back values from a ShaderBlock.

- This is also probably useful for Shaders.
- This creates SO MANY tables.  It feels so bad to expose this.  But
  also it's the only way to read values back from a compute operation,
  so it's pretty indispensable.  In the future there could be a Blob
  variant.
2019-01-16 10:02:44 -08:00
bjorn 27000d2238 Rebuild math.lua.h; 2019-01-14 12:30:47 -08:00
bjorn aa56cbc7b0 Fix crash on repeated calls to Channel:peek; 2019-01-12 20:51:50 -08:00
bjorn bb9d354ac9 Fix missing LuaJIT return; 2019-01-12 05:06:57 -08:00
bjorn 6bfc6623ac More consistent matrix out args; 2019-01-12 04:58:05 -08:00
bjorn 577ed57b2d oops, access the two types of Pools properly; 2019-01-12 04:22:11 -08:00
bjorn c41a5c4e3c Math copy functions allow you to specify a Pool; 2019-01-12 03:46:14 -08:00
bjorn 990544d3f4 Fix quat:save in LuaJIT; 2019-01-12 03:06:40 -08:00
bjorn 90cacd03ca Handle numbers more consistently in Lua API;
I still don't know if I should cast or not, but at least now things
will be consistently right or wrong.
2019-01-11 22:37:54 -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 f709a6849b Fix crashes with :save'd vectors in LuaJIT; 2019-01-08 02:37:50 -08:00
bjorn dee53f953c Fix vector save functions in LuaJIT; 2019-01-08 00:54:07 -08:00
bjorn 40c7deaefe Vector API improvements; 2019-01-06 03:25:00 -08:00
bjorn c7fa8f8497 Fix vec3:set; 2019-01-05 00:21:56 -08:00
bjorn cc88a0b919 Expose option to flip TextureData on load; 2019-01-04 23:32:25 -08:00
bjorn 379dc74cd5 Mesh fixes; 2019-01-04 18:01:01 -08:00
bjorn 1068dd1081 Rework cylinder; 2019-01-04 18:01:01 -08:00
bjorn ea3a77a73a Many batching improvements; Refactoring; 2019-01-04 18:01:01 -08:00
bjorn d66057ee70 Avoid redundant strlen in font printing; 2019-01-04 18:01:01 -08:00
bjorn 62645cde28 Pipeline -> 4 bytes; lineWidth -> uint8_t; 2019-01-04 18:01:01 -08:00
bjorn 2ceb474b04 DrawCommand -> DrawRequest; 2019-01-04 18:01:01 -08:00
bjorn 779e28353d Rebuild math.lua.h; 2019-01-04 02:19:10 -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 60a12a6b7e Rename thread module init/destroy; 2018-12-19 01:04:42 -08:00
bjorn ab8e86b9a5 Fix vec3() in LuaJIT; 2018-12-17 20:14:10 -08:00
bjorn 68a0bf4a10 mat4:transformPoint; 2018-12-17 20:07:19 -08:00
bjorn b0a146919f Add vec3:length; 2018-12-17 19:32:43 -08:00
bjorn 1fb2d6be02 Always use pushliteral when possible; 2018-12-15 21:45:32 -08:00
bjorn ad10f3bc37 Fix rgb10a2 constant; 2018-12-15 17:35:57 -08:00
bjorn ff581d2e07 Fix Mesh:draw; 2018-12-12 19:39:01 -08:00
bjorn a67f59000f DrawMode -> DrawStyle; MeshDrawMode -> DrawMode;
Renaming enums doesn't really have an impact on the API usage, just
the docs and internal naming of things.
2018-12-12 18:43:04 -08:00
bjorn 2540953422 lovr.graphics.setAlphaSampling for alpha to coverage; 2018-12-11 22:52:58 -08:00
bjorn 2435108d4d rm drawInstanced (last argument of draw instead);
Willing to revert this, but I think this is the cleaner API to use.
2018-12-11 22:16:40 -08:00
bjorn 259dbd5758 completely rm lovrGraphics from opengl.c; 2018-12-11 22:12:19 -08:00
bjorn b02eae30b4 Autoinstancing; 2018-12-11 22:10:29 -08:00
bjorn 18fdd0c062 Autobatching; 2018-12-11 13:27:59 -08:00
bjorn 387a91d5e4 lovr.graphics.flush; 2018-12-11 11:13:46 -08:00
bjorn 2e5c927b92 Expose max UBO size in lovr.graphics.getSystemLimits; 2018-12-11 11:13:02 -08:00
bjorn 7f333ce956 Refactor Mesh attributes; 2018-12-07 19:11:14 -08:00
bjorn e2886d3bb5 Mesh uses Buffer; 2018-12-07 15:57:45 -08:00
bjorn 9a0f7c919a ShaderBlocks use Buffers; 2018-12-06 16:34:14 -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 9a3ba5fb52 LuaJIT: mat4:scale accepts single number; 2018-12-02 13:03:29 -08:00
bjorn 9d965e1d7a LuaJIT: mat4:translate, rotate, scale support chaining; 2018-12-02 13:02:10 -08:00
bjorn 0054c771b2 Properly release Curves on creation; 2018-12-02 12:51:20 -08:00
bjorn fb455a671c LuaJIT: dereference vector pointers before use;
That way __sub doesn't break due to built-in pointer operator.
2018-12-02 12:48:44 -08:00
bjorn 4e6bf41e67 mat4 fixes; 2018-12-02 12:08:07 -08:00
bjorn ecabec9bf2 Finish LuaJIT API; 2018-12-02 12:08:07 -08:00
bjorn 43567e561a Update lovr.graphics.points/lines to work with vectors; 2018-12-02 12:08:07 -08:00
bjorn 2aadc9bde1 rm Transform; 2018-12-02 12:08:07 -08:00
bjorn c7934b3b13 Update API to work with vectors; 2018-12-02 12:08:07 -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 adabf4c6ef Fix broken android lua module
The LOVR_ENABLE_ANDROID flag wasn't getting passed to C, and the getApplicationId code had bugs
2018-11-27 15:02:25 -08:00
mcc 99026af5ca Fix Android compile 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
bjorn 0e99d47394 Fix module destruction;
There is a problem when a Thread stops: it destroys all of the modules
that it required.  This is because we unconditionally call luax_atexit
when modules are required, and when the thread lua_State dies it takes
all of the modules with it.  To fix this, lovr<Module>Init will return
whether or not initialization successfully happened, which provides us
with enough info to know if we should place the luax_atexit destructor
2018-11-19 09:24:28 -08:00
bjorn 465e5c2010 Controller:getVelocity; Controller:getAngularVelocity; 2018-11-19 09:24:10 -08:00
bjorn ba60e99890 lovrPlatform: Window creation; 2018-11-16 02:26:56 -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
bjorn 784d61ef4a Modify module loading;
Dynamically loading things was cool but is causing more pain than
pleasure because it just barely doesn't work everywhere.  Instead,
find a better way to load modules.  Use a data driven luaL_Reg array
to define the module mapping and luaL_register to smoosh it into
package.preload at boot time.  Benefits:

- LOVR_ENABLE_<x> defines are respected and only require a single #if
- Module list is data driven and defined in one place
- It's faster (luax_preloadmodule did a global lookup every invocation)
- It works everywhere

Oh also threads were totally broken and this (mostly) fixes them.
2018-11-15 07:51:21 -08:00
mcc 64b187ef3f Manual merge args-and-physfs PR branch with master 2018-11-13 22:09:47 -05:00
mcc 91daeae634 Style/functional fixes to args for PR. --inside is now --root 2018-11-13 22:07:19 -05:00
mcc 96eed2786c Amend oculus_mobile error handling so headset.c renderHelper drives
Back out lovrHeadsetExtractRenderFn, don't let oculus_mobile.c pcall the render function, instead fit the render error saving inside renderHelper (emscripten/oculusmobile path). The render error is now saved in the environment at _lovrHeadsetRenderError. For this to work, luax now keeps track of a global variable for the current "main" environment.

This does means the render error path now works on emscripten (this has not been tested).
2018-11-13 16:50:31 -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
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
mcc 26af794e3c Adjust the lovr command line construction to follow the lua/love standards. This is a BC-breaking change.
Source for lua standard: https://en.wikibooks.org/wiki/Lua_Programming/command_line_parameter
2018-11-13 16:28:56 -05:00
bjorn a1237029de lovr.graphics.translate: Arguments default to 0; 2018-11-12 19:28:41 -08:00
bjorn 112d775635 Font:hasGlyphs; 2018-11-11 17:29:41 -08:00
bjorn 76c2dc757a Curve:getTangent; 2018-11-08 12:56:45 -08:00
bjorn 2703192f1d Make a constructor; 2018-11-08 12:56:45 -08:00
bjorn 2acf49fb34 Curve; 2018-11-08 12:56:45 -08:00
bjorn bfeb3d2d51 lovr.graphics.discard; 2018-11-08 11:58:31 -08:00
mcc a46b4afbb8 Split out the "oculus mobile" headset type into GEAR and GO. 2018-11-07 14:34:51 -05:00
mcc 8301bd7dd8 Remerge oculus-mobile branch with master 2018-11-02 18:10:08 -04:00
mcc 79b0c19254 Oculus mobile: First round of fixes requested in PR review
Formatting, back out bad change to Win32 build, support getOs()
2018-10-28 22:55:37 -04:00
mcc dd440b2ada Code cleanup after all these changes, fix build 2018-10-28 15:31:27 -04:00
bjorn 654b894ded Add lovr.graphics.setProjection;
It's not very good.  It only takes Transforms and sets the projection
for both eyes.  And the projection gets reset at the beginning and
end of lovr.headset.renderTo.  It's meant to be a backdoor.
2018-10-26 17:17:18 -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 5f8f8a540e lovr.filesystem no longer relies on arg global; 2018-10-23 11:12:13 -07:00
bjorn 43309efc57 Fix problems with variants; 2018-10-23 11:11:47 -07:00
bjorn cf3b060fe5 Fix MSVC issues with variables named near/far; 2018-10-22 16:40:12 -07:00
bjorn 485f65b013 Transform:setOrthographic; Transform:setPerspective; 2018-10-21 09:06:37 -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 086a0030b1 Shader:send/ShaderBlock:send fills in nils with 0's; 2018-10-06 16:15:38 -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 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 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 148a2bdb45 Error system no longer relies on Lua; 2018-09-26 10:39:17 -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 924eb5fa0a Shader:send: Add a missing break;
opps
2018-09-05 10:13:04 -07:00
bjorn 7a8abc80a2 Copy Transform objects more safely in Shader[Block]:send; 2018-09-05 04:22:12 -07:00
bjorn a5b9d267d0 Ensure int attributes are signed; 2018-09-05 03:25:13 -07:00
bjorn 7e1687ce6b Fix Shader:sendImage; 2018-09-04 06:58:54 -07:00
bjorn 4e1757210e Load cubemap images better; 2018-09-03 20:59:12 -07:00
bjorn fbd294f76d Empty textures default to linear instead of sRGB; 2018-09-02 21:15:59 -07:00
bjorn 3cc1b60fd8 Better default for anonymous texture depth; 2018-09-02 21:11:48 -07:00
bjorn 064adef0bb Transform:getMatrix accepts target table; 2018-09-01 02:52:16 -07:00
bjorn ea331a12be Fix bugs; 2018-08-31 23:24:59 -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 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 7e889a564a Emscripten fixes; 2018-08-30 20:56:08 -07:00
bjorn 7c21d77a6e rm singlepass conf flag; Viewports; getSupported.singlepass; 2018-08-30 04:02:58 -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 4215ea2e24 Canvas getters; 2018-08-29 21:22:13 -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 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 590668a8d6 lovrGraphicsBlit; 2018-08-29 21:21:38 -07:00
bjorn 671f0835c0 Fix lovr.headset.getDisplayWidth/Height; 2018-08-29 21:19:07 -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 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 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 7a866552e9 Fix remaining physics leaks; 2018-08-22 09:29:34 -07: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 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 96cfeedc94 Add rg16f and rg32f texture formats; 2018-08-16 14:54:37 -07:00
bjorn a30fdc9749 Texture:getFormat; 2018-08-16 14:27:45 -07:00
bjorn 7f158a3473 Tiny fix for headset msaa default; 2018-08-15 17:57:05 -07:00
bjorn a18540a934 Proper validation of uniform texture types; 2018-08-13 17:03:39 -07:00
bjorn cc440c9784 Support format parameter in newTextureData; 2018-08-11 00:09:47 -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 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 5c65fc811f Change "drawing" to "rendering" in comments; 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 78d9cc0031 Actually set shader uniforms; 2018-08-06 13:44:46 -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 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 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 7d9b728669 Remove 32 uniform limit; 2018-08-02 16:13:27 -07:00
bjorn b8faff6986 Add writable and usage flags to ShaderBlock; 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 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 85ff844d24 lovrShaderBlockCreate; 2018-08-02 05:03:28 -07:00
bjorn 823886f03f Start newShaderBlock; 2018-08-02 05:03:28 -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 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 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 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 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 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 c19d69cfdd Fix dll/so loading; Respect hyphens; 2018-07-18 17:09:47 -07:00