Commit Graph

2032 Commits

Author SHA1 Message Date
bjorn aa56cbc7b0 Fix crash on repeated calls to Channel:peek; 2019-01-12 20:51:50 -08:00
bjorn 5382bc3379 Fix some batching edge cases;
- Reduce size of vertex buffer by one to account for primitive restart.
- Always write to the draw ID buffer to prevent it from going out of sync with the vertex buffer and prevent a potential problem with geometry reuse.
2019-01-12 18:25:38 -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 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 c85fd69079 Optimize uniform parsing;
By only parsing the first uniform in an array.
2019-01-11 12:27:40 -08:00
bjorn 305acb89a9 Fix quaternion multiplication signs; 2019-01-11 05:35:08 -08:00
bjorn fa79420cbf Year; 2019-01-10 14:13:13 -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 49b0aaa986 Pool allocation failures throw an error;
For now.
2019-01-05 00:11:23 -08:00
bjorn cc88a0b919 Expose option to flip TextureData on load; 2019-01-04 23:32:25 -08:00
bjorn ed71485fcc Fix header vs. implementation pool function names; 2019-01-04 23:32:25 -08:00
bjorn e1c656c288 Primitive restart is automatic in WebGL; 2019-01-04 18:01:01 -08:00
bjorn 83a56efd5e Ugh; 2019-01-04 18:01:01 -08:00
bjorn fc08b479dc Fix sign issue; 2019-01-04 18:01:01 -08:00
bjorn dac6b0fdbb Cache geometry; 2019-01-04 18:01:01 -08:00
bjorn ea13e638c2 Fix viewports; 2019-01-04 18:01:01 -08:00
bjorn 379dc74cd5 Mesh fixes; 2019-01-04 18:01:01 -08:00
bjorn 6f96ee65da Finish primitive restart; 2019-01-04 18:01:01 -08:00
bjorn 67727b092b Start primitive restart; 2019-01-04 18:01:01 -08:00
bjorn 6382c1f71c Cleanup; 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 fae7786c8d Simplify Pipeline; 2019-01-04 18:01:01 -08:00
bjorn 1c5d73e3da Make more GPU functions static; 2019-01-04 18:01:01 -08:00
bjorn ffd7a1202c rm lovrCanvasIsDirty; 2019-01-04 18:01:01 -08:00
bjorn 709a91ac56 rm Shader.dirty; 2019-01-04 18:01:01 -08:00
bjorn 09832dab8f rm Mesh.dirty; 2019-01-04 18:01:01 -08:00
bjorn 111cfafaf2 rm lovrMeshDraw; 2019-01-04 18:01:01 -08:00
bjorn c87645e8ef Put non-opengl-specific stuff in their own files; 2019-01-04 18:01:01 -08:00
bjorn fbcee9ac9c rm lovrTextureGetId; 2019-01-04 18:01:01 -08:00
bjorn 55e889824f lovrGpuSubmit; 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 561805450d rm Pipeline.dirty; 2019-01-04 18:01:01 -08:00
bjorn 498c25a544 Move Shader out of Pipeline; 2019-01-04 18:01:01 -08:00
bjorn c99527ec2e Move pointSize out of Pipeline; 2019-01-04 18:01:01 -08:00
bjorn 9f79dd95f4 Move font out of Pipeline; 2019-01-04 18:01:01 -08:00
bjorn 29748dc0db Move color out of Pipeline; 2019-01-04 18:01:01 -08:00
bjorn dffcc8c295 Move Canvas out of Pipeline; 2019-01-04 18:01:01 -08:00
bjorn 030c765c6b Move backgroundColor out of Pipeline; 2019-01-04 18:01:01 -08:00
bjorn 2ceb474b04 DrawCommand -> DrawRequest; 2019-01-04 18:01:01 -08:00