Nevyn Bengtsson
0bdb7c7c80
More has-a-ification of texturedata
...
I forgot to stage this yesterday??
2020-01-20 08:48:59 +01:00
Nevyn Bengtsson
95edb43654
TextureData: holds Blob instead of being Blob, just like SoundData
...
also replaces TextureData:getPointer with TextureData;getBlob
2020-01-19 22:59:44 +01:00
Nevyn Bengtsson
91cc385340
Remove redundant SoundData:getPointer()
2020-01-19 22:43:13 +01:00
Nevyn Bengtsson
9127dd823c
Fix bugs in sounddata-has-blob
2020-01-19 21:22:23 +01:00
Nevyn Bengtsson
7107ecd235
SoundData:getBlob()
2020-01-19 17:50:04 +01:00
Nevyn Bengtsson
790629bc3e
SoundData: has-a blob instead of is-a blob
2020-01-19 17:50:04 +01:00
Nevyn Bengtsson
8515cd98fe
Add destination buffer size to microphone:getData()
...
So that we can use OpenAL's internal ring buffer and only dequeue
exactly the amount we need at the moment.
2020-01-19 17:03:35 +01:00
Bjorn
c5edc6dedb
Merge pull request #190 from bjornbytes/android-canvas
...
Android Canvas
2020-01-17 12:19:49 -08:00
bjorn
b1eeda96cb
Small safety fix;
2020-01-16 09:32:12 -08:00
bjorn
0ecd8f6b49
Fix lovr.filesystem.getExecutablePath on macOS;
2020-01-16 09:21:21 -08:00
Bjorn
3a5c3ca97c
Merge pull request #189 from bjornbytes/channel-mutex
...
Channel ownership stuff
2020-01-15 17:54:00 -08:00
bjorn
2a52796c6f
Commenting;
2020-01-15 17:56:09 -08:00
bjorn
c0d1e28deb
Fix ifdef for glTexStorage;
...
It's always present on GLES.
2020-01-14 19:39:10 -08:00
bjorn
da88766e5a
oculus_mobile: Discard depth/stencil buffers after rendering;
...
This was present in lovr-oculus-mobile.
2020-01-14 18:46:00 -08:00
bjorn
541400e0fe
oculus_mobile: Create framebuffers from bridged swapchain textures;
...
This is a change that shifts the responsibility regarding the creation
of OpenGL framebuffers from vrapi-provided swapchain texture handles.
Previously, the LovrApp component of lovr-oculus-mobile was creating
framebuffers and passing native framebuffer IDs to lovr. With this
change, lovr-oculus-mobile passes vrapi's swapchain textures to lovr
unmodified. This allows lovr to create canvases using its conventional
method and also means that the properties of the canvases are no longer
hardcoded, so things like resolution and multisampling can be
customized.
There were also some issues with multiview canvases in LÖVR due to some
misconceptions about how multisampled multiview rendering works. These
issues have also been fixed in this commit.
2020-01-14 18:26:01 -08:00
bjorn
afa5523773
Curve:render always returns 2 points if it's a line;
2020-01-14 01:08:57 -08:00
bjorn
f728496608
Make math module work better in threads;
...
conf doesn't work in threads. While this seems problematic, it can
kinda be considered the right thing. Right now the math module can't
be required at all in threads which seems bad, so we'll make it work
and just ignore the "globals" flag for now.
2020-01-14 00:39:38 -08:00
bjorn
0841268d45
Fix garbled text when printing out spaces;
...
Apparently requesting/rendering zero vertices was clogging stuff
somewhere. It seems good enough to just explicitly not render
anything if we weren't gonna do it anyway.
2020-01-14 00:37:09 -08:00
bjorn
3b8d485fe9
Mesh:setVertices(Blob);
2020-01-14 00:22:35 -08:00
bjorn
bd6d45cd30
Add comment;
2020-01-13 23:51:59 -08:00
bjorn
056c1e7fe4
Simplify Channel cleanup;
2020-01-13 23:49:52 -08:00
bjorn
46c685bd27
Make channel creation threadsafe;
2020-01-13 23:49:52 -08:00
bjorn
48b887f7ee
Always pass identity matrix for animated shader;
...
So at least something shows up if you have an unskinned mesh with
a skinned shader.
2020-01-13 20:47:47 -08:00
bjorn
3c68e9e97a
Fix some compile warnings/style;
...
Also I am little unsure about the _unused part. It seems like we
were passing it ALuint** when the spec says it takes ALuint*.
2020-01-13 20:45:36 -08:00
bjorn
bb7bcb9b3d
Fix lovr.data.newBlob(blob);
2020-01-13 20:39:43 -08:00
Bjorn
5dd35edcb3
Merge pull request #188 from mcclure/newthread-crash
...
Fix segfault on lovr.thread.newThread(nil)
2020-01-13 19:50:35 -08:00
Bjorn
180a3adb8f
Merge pull request #180 from alloverse/raw-audiostream
...
Real-time raw AudioStreams
2020-01-13 19:49:57 -08:00
mcc
2a3b4694f5
Fix crash on lovr.thread.newThread(nil)
2020-01-11 14:56:26 -05:00
Nevyn Bengtsson
972eb108c0
NULL is not valid for buffers in UnqueueBuffers
2020-01-11 16:31:06 +01:00
bjorn
dc1c011380
Fix bug with std140 offset logic;
2020-01-09 21:57:25 -08:00
bjorn
dd6d737a43
CMake: compile binary resources earlier;
2020-01-09 21:57:13 -08:00
Nevyn Bengtsson
3279c0d3f0
Document buffer unqueueing in source play
2020-01-09 16:37:28 +01:00
bjorn
42c85c39fb
rm 1ms sleep from main loop;
...
It's causing massive problems on windows, and sleeping for zero ms
is good enough to relinquish CPU time to the OS. VR APIs also do
their own sleeping.
2020-01-08 23:58:11 -08:00
Bjorn
14e197414c
Merge pull request #185 from mcclure/hash-pragma-once
...
core/hash.h is missing #pragma once
2020-01-08 16:02:19 -08:00
Bjorn
9eaa970bc9
Merge pull request #186 from alloverse/fix/184
...
Bump msdfgen + add move_dll for it
2020-01-08 16:02:06 -08:00
Nevyn Bengtsson
ab3e7a52fa
AudioStream: fix broken GetDurationInSeconds
...
d'oh
2020-01-09 00:01:18 +01:00
Nevyn Bengtsson
86ba2feeeb
RawAudioStream: Use cursor instead of realloc-remainder
...
Previous code would wastefully reallocate memory for every time a buffer is too big to fit. New code just uses an index into the next buffer at which to start reading, requiring no extra allocation.
2020-01-08 23:52:08 +01:00
Nevyn Bengtsson
1ca57a073c
style fixes after review
2020-01-08 23:44:28 +01:00
Nevyn Bengtsson
edbfbf9bdc
audiostream: make getDuration consistent between raw and buffer-based
...
queueLength was in samples, samples was samples/channelCount. Now samples is always samples, and the division by channels occurrs in the new getter
2020-01-08 17:58:25 +01:00
Nevyn Bengtsson
af6b3515ef
audiostream: use samples
instead of queueLength
...
Instead of having a bogus samples ivar in AudioStream when it's raw, use it to denote the amount of audio data enqueued.
This means `stream:getDuration()` gets the same meaning as `stream:getQueueLength()` (except in seconds instead of samples), so we can remove the latter.
2020-01-08 17:55:04 +01:00
Nevyn Bengtsson
3cb7649996
audiostream: what the heck is memory.h
...
fixes review comment
2020-01-08 17:49:13 +01:00
Nevyn Bengtsson
d987dd0dc3
Bump msdfgen + add move_dll for it
...
Fixes #184
2020-01-06 20:19:52 +01:00
mcc
dac50c4687
Pragma once in core/hash.h
2020-01-06 13:55:39 -05:00
Nevyn Bengtsson
ae5877a299
Rewind raw sources on explicit stop
...
I missed this one in dbe2edd8
2020-01-05 21:26:41 +01:00
Nevyn Bengtsson
1db932d856
Source: Stop, then unqueue buffers
...
Doing it the other way around is illegal; you may not unqueue unprocessed buffers, so we need to stop first.
2020-01-05 21:26:14 +01:00
Nevyn Bengtsson
b3fb31f5a4
Destructor for raw audio stream
2020-01-05 21:19:08 +01:00
Nevyn Bengtsson
dbe2edd89d
Source: Do rewind on stop like before, and clear buffers
...
I changed my mind. Let's use rewind to clear buffers on a raw stream like Bjorn suggested, and put rewind at stop like it was before.
2020-01-05 21:08:30 +01:00
Nevyn Bengtsson
a8b4dc673d
Accessor for RawAudioStream:getQueueLength
...
Useful for determining current amount of latency.
2020-01-05 00:05:29 +01:00
Nevyn Bengtsson
5232aa2ff2
RawAudioStream: Add a limit to amount of queued data
...
This is useful for making sure the audio subsystem doesn't go haywire with too much generated data
2020-01-04 23:49:58 +01:00
Nevyn Bengtsson
2d681260e5
RawAudioStream: Fix byte/sample confusion
...
dequeue_raw thought that size was in bytes, but it's in samples.
2020-01-04 23:22:58 +01:00