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
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
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
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
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
8bf60b73ec
Add opengl header; Migrate relevant object implementations;
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
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
b650f2b770
Add Microphone objects for audio capture;
2018-07-06 17:57:31 -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
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
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
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
781a5a7688
Rename luax_stubnil to luax_emptymodule;
2018-05-27 19:05:10 -07:00
bjorn
7ffd3fc25d
Use more primitive getControllers signature;
2018-05-27 19:05:10 -07:00
bjorn
a3e4b9b2b3
Change mat4_transform signature;
2018-05-27 19:05:10 -07:00
bjorn
498a1843ad
Work on WebVR pose input;
2018-05-27 19:05:10 -07:00
bjorn
859251d020
Start WebVR rewrite;
2018-05-27 19:05:10 -07:00
bjorn
c767e9c165
Simplify headset structure;
2018-05-27 19:05:10 -07:00
bjorn
93e082c8cc
WebVR;
...
- Add FORCE_FILESYSTEM
- Handle THREAD_ERROR event with noop case
- Remove hopefully redundant lovr.graphics.clear in errhand
- Finally use correct type signature for assimpFileTell
2018-05-27 19:05:10 -07:00
bjorn
8702d7422f
Rewrite boot.lua, main.c, and exception handling;
...
There are breaking changes:
- lovr.step is removed.
- lovr.run is expected to return a main loop wrapped in a function. The
returned function is run as a coroutine to facilitate a cooperative
main loop.
- lovr.errhand should return a loop function instead of while true-ing.
2018-05-27 19:05:10 -07:00
bjorn
275006847d
Prepend @ to loaded Lua chunks for better errors;
2018-05-27 19:05:10 -07:00
bjorn
012ba07063
Disable threads in WebVR;
...
Browser/emscripten support is currently unstable.
2018-05-27 19:05:10 -07:00
bjorn
8783d36183
luax_readvertices returns vertex count correctly;
2018-04-11 00:26:26 -07:00
bjorn
8b3fcc94b8
Event module is thread safe;
2018-04-01 22:43:54 -07:00
bjorn
40c363fff4
lovr.data.newVertexData accepts a vertex table;
2018-04-01 21:57:16 -07:00
bjorn
b180b28037
Mesh:getVertexMap with tables and Blobs;
2018-04-01 21:25:48 -07:00
bjorn
25a267acd1
ModelData:getTriangle;
2018-04-01 21:00:20 -07:00
bjorn
823b7000da
Texture:getDepth; Also change Texture:getDimensions;
2018-04-01 20:54:05 -07:00
bjorn
be67da4c09
Rename Blob:getFilename to Blob:getName;
2018-03-24 13:16:08 -07:00
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
bdc9b63b8a
Fix lots of memory leaks;
...
Especially when restarting or using threads.
2018-03-23 19:31:45 -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
988d8c7d23
Rename blit to fill;
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
8b201838b6
Add lovr.graphics.blit for fullscreen quads;
2018-03-22 09:57:44 -07:00
bjorn
e6a76e2a61
rm MatrixType;
2018-03-22 09:57:44 -07:00
bjorn
ddb22aef0e
Refactor headset offset;
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
d77b139d21
Make Mesh more lightweight;
2018-03-21 15:36:00 -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
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
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
c0d4d33d47
lovr.graphics.newMesh accepts VertexData;
2018-03-11 11:24:11 -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
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
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
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
8fb3421658
Fix everything on windows;
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
583afc9f16
Reorganize main/lovr separation;
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
d4b8274879
Push nil instead of 'unknown' for unknown buttons;
2018-02-21 22:12:38 -08:00
bjorn
67d3c49a76
Add support for 3d textures;
2018-02-20 17:57:47 -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
7cecc1489e
getCanvas; setCanvas; MRT; MULTICANVAS define;
2018-02-15 19:58:35 -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
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
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
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
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
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
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
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
3d0e761198
Fix problem passing flags to lovr.graphics.newTexture;
2018-01-14 13:05:14 -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
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
2727544408
Copy strings in loader;
2018-01-04 18:49:14 -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
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
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
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
c3fc7b61fd
Fix crash with lovr.graphics.newMaterial;
2017-12-10 12:41:43 -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
c6a395fa21
Switch to table variant of newCanvas API;
2017-12-09 20:09:27 -08:00