1
0
Fork 0
mirror of https://github.com/bjornbytes/lovr.git synced 2024-07-03 04:53:35 +00:00
Commit graph

375 commits

Author SHA1 Message Date
bjorn 03e3e14718 Font:setFlipEnabled; Font:isFlipEnabled; 2019-01-29 21:49:49 -08:00
bjorn 30acdd1347 Add semantic GL defines; 2019-01-29 16:05:27 -08:00
bjorn bf19fd5c15 Avoid more implicit float-double conversions; 2019-01-24 17:00:41 -08:00
bjorn bda248b86e Be more intentional about doubles vs. floats; 2019-01-24 16:48:06 -08:00
bjorn bec98004ff Fix vertical text align;
Off-by-one error with counting lines.
2019-01-24 14:07:02 -08:00
bjorn c473bf50e8 Buffers individually keep track of their flush range;
Fixes bugs with attached Mesh attributes, where flushing wasn't
happening when it should have.
2019-01-22 12:11:01 -08:00
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 3d2488a577 I forgot DRAW_ID and VERTEX need the same counts; 2019-01-15 19:43:11 -08:00
bjorn 5ac3c51607 Fix shifting precedence; 2019-01-14 12:29:25 -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 83a56efd5e Ugh; 2019-01-04 18:01:01 -08:00
bjorn dac6b0fdbb Cache geometry; 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 c87645e8ef Put non-opengl-specific stuff in their own files; 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
bjorn 4c9b02a6ff Release builtin ShaderBlock; 2018-12-19 01:32:54 -08:00
bjorn e6b7c41860 Improve lovrDrawData uniform names; 2018-12-14 16:02:25 -08:00
bjorn 68a69eec2b Fix sphere and cylinder; 2018-12-13 23:05:56 -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 28ab5377c8 Fix Mesh batching stuff; 2018-12-11 22:23:38 -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 c531852932 Refactor rendering; 2018-12-10 23:05:02 -08:00
bjorn 40454d1380 Use ShaderBlock for transforms/colors; 2018-12-07 18:19:03 -08:00
bjorn e2886d3bb5 Mesh uses Buffer; 2018-12-07 15:57:45 -08:00
bjorn b586bc2cce lovrFontRender uses raw float* instead of VertexPointer; 2018-12-05 10:23:26 -08:00
bjorn a8361677f5 Move pose from Mesh to DrawCommand; 2018-12-05 10:22:12 -08:00
bjorn c7934b3b13 Update API to work with vectors; 2018-12-02 12:08:07 -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