Commit Graph

86 Commits

Author SHA1 Message Date
bjorn a17f10e273 Add modules folder; 2019-05-19 00:38:35 -07:00
bjorn 7af5b9816a Stupid float stuff;
I'm sorry.
2019-04-20 17:02:48 -07:00
bjorn 011db5f1e5 Revert "Free objects in their destructors;"
This reverts commit d31dca5520.

We can't unconditionally free because sometimes objects are temporarily
allocated on the stack.
2019-04-05 05:45:05 -07:00
bjorn ee27af1a85 graphics: forward declarations; 2019-04-05 04:59:14 -07:00
bjorn 14cab6cd3c Move utf helper into lib; 2019-04-05 04:04:52 -07:00
bjorn d31dca5520 Free objects in their destructors; 2019-04-05 03:56:10 -07:00
bjorn 6fdeda9e61 Make lovrRelease non-generic;
We know what type we're releasing 99% of the time, we don't need to
play a guessing game in lovrRelease, just have the caller say which
destructor to use.

There is lovrGenericRelease for situations where we need it, which
does the slower lookup of the destructor.
2019-04-05 03:41:03 -07:00
bjorn 03e3e14718 Font:setFlipEnabled; Font:isFlipEnabled; 2019-01-29 21:49:49 -08:00
bjorn 6fd4b9ef4c Header cleanup; 2019-01-24 17:43:25 -08:00
bjorn cb9f166234 Revert "Replace sprintf with stb version;"
This reverts commit 8f9d24c51f.
2019-01-24 17:39:27 -08:00
bjorn bf19fd5c15 Avoid more implicit float-double conversions; 2019-01-24 17:00:41 -08:00
bjorn 8f9d24c51f Replace sprintf with stb version; 2019-01-18 08:55:29 -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 086f7f4e47 lovrRelease frees objects instead of destructor;
That way objects allocated on the stack can be destroyed.
2018-12-19 01:41:01 -08:00
bjorn 155a0c1449 lovr*Create -> lovr*Init; lovr*Create macro; 2018-12-19 01:04:42 -08:00
bjorn b586bc2cce lovrFontRender uses raw float* instead of VertexPointer; 2018-12-05 10:23:26 -08:00
bjorn 4188fd53ec Handle tabs in fonts; 2018-11-11 18:28:51 -08:00
bjorn 112d775635 Font:hasGlyphs; 2018-11-11 17:29:41 -08:00
bjorn 816fda2177 Fix everything and merge; 2018-09-27 18:38:44 -07:00
bjorn 3fb1b49549 MSAA canvases/textures but no resolving yet; 2018-08-29 21:22:12 -07:00
bjorn e9ebdc2d58 Rework TextureData creation functions; 2018-08-29 21:18:32 -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 23bfc4b5aa Fix bug with texture atlas expansion; 2018-08-02 03:41:21 -07:00
bjorn abd1c75140 Properly release glyph TextureData; 2018-08-02 03:27:16 -07:00
bjorn bc2d638b00 Refs know their type; 2018-07-24 19:14:29 -07:00
bjorn 66ca77abd1 Texture:replacePixels supports mipmap; 2018-07-22 20:37:27 -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 6933914650 Shift around glfw includes; 2018-07-17 17:21:14 -07:00
bjorn c35415ba66 Move over texture binding; 2018-07-17 17:21:14 -07:00
bjorn f903b6014c Use arrays for enums instead of maps; 2018-07-04 20:11:52 -07:00
bjorn 57c8dfe146 Clean up includes; 2018-07-04 13:51:35 -07:00
bjorn 1cd1b5e11d Use a Mesh for primitives; 2018-03-22 09:46:26 -07:00
bjorn d2e0642b59 Use calloc in lovrAlloc; 2018-03-21 12:56:16 -07:00
bjorn 4df836727c Simplify refcounting; 2018-02-26 00:59:03 -08:00
bjorn f54d1c1e03 rm containerof; 2018-02-25 23:19:39 -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 d5a1928b3d Rename a bunch of files; 2018-02-11 15:22:04 -08:00
bjorn ed72de1109 Make sure objects retain their underlying data; 2018-01-22 09:13:03 -08:00
bjorn a22740084c Rename FontData to Rasterizer; 2018-01-22 08:28:33 -08:00
bjorn 386ab78ae9 Throw an error if font texture overflows; 2017-12-17 19:13:04 -08:00
bjorn 72aa7e858a Rename loaders to data; 2017-12-10 12:41:43 -08:00
bjorn fa8af65073 Refactor texture formats; 2017-12-09 20:09:27 -08:00
bjorn eecc675043 Make textures immutable and fix font atlas resizing; 2017-11-24 14:13:07 -08:00
bjorn 1662e79f0e Use srgb formats for textures; 2017-11-23 14:19:20 -08:00
bjorn 32b05cb15d Support multiple texture slots; 2017-10-21 13:21:28 -07:00
bjorn a2860361e9 Consolidate Texture and Skybox; 2017-10-21 13:00:13 -07:00
bjorn c6c29e3895 Fix strange font cast issue; 2017-08-26 17:15:53 -07:00