Commit Graph

439 Commits

Author SHA1 Message Date
bjorn 4249cb4cc6 Animator:update; 2017-11-03 18:27:02 -07:00
bjorn ff0d007afe Start Animator; 2017-11-02 23:47:25 -07:00
bjorn 051663eff6 Fix null dereference with setting mesh vertex maps; 2017-11-01 23:29:20 -07:00
bjorn 2c6cb28224 Use references when dealing with model materials; 2017-11-01 23:11:35 -07:00
bjorn 194382643b Add back Model:getAABB; 2017-11-01 19:27:58 -07:00
bjorn 60d25b2e11 Materials refcount their Textures properly; 2017-10-31 01:49:45 -07:00
bjorn cc019e5783 Improve Shader error messages; 2017-10-31 01:44:39 -07:00
bjorn 227dd67c00 Set default shader properly to avoid crash; 2017-10-31 01:33:16 -07:00
bjorn ecde864ec4 Use spooky BOOleans everywhere; 2017-10-31 01:14:09 -07:00
bjorn 1ebc527c74 Load vertex colors for models; 2017-10-23 19:24:29 -07:00
bjorn 8db7290ed3 Add vertex color attribute; 2017-10-23 19:24:29 -07:00
Bjorn Swenson 618be7b51d Merge pull request #24 from bcampbell/fake-headset
Fake headset
2017-10-23 11:24:03 -07:00
bjorn 00726fe89e Fix pointsize limit for WebGL; 2017-10-22 16:26:48 -07:00
bjorn cc651e7b4e Set point size in vertex shader for WebGL compatibility; 2017-10-22 16:14:53 -07:00
bjorn 076b378b80 Report correct line numbers for shader errors; 2017-10-22 15:39:21 -07:00
Ben Campbell 54a0077356 oops - re-enable icon setting
(I was using GLFW 3.1 and had to disable the icon-setting code)
2017-10-23 09:38:24 +13:00
Ben Campbell a22a9ed1f4 Merge branch 'master' into fake-headset 2017-10-23 09:32:32 +13:00
bjorn 51ceb2a199 Rename shape data to stream data; 2017-10-22 07:37:31 -07:00
bjorn 65c26e47f2 Remove some weird Mesh return codes; 2017-10-22 07:20:40 -07:00
bjorn 2c0d85a84a Use UNSIGNED_SHORT for indices when possible; 2017-10-22 07:04:52 -07:00
bjorn e8e09c425e Reset material in lovr.graphics.reset; 2017-10-22 04:11:39 -07:00
bjorn d5b3a2243e Rename internal canvas to view; 2017-10-22 03:34:45 -07:00
bjorn 5498a4e13e Fix fullscreen textures; 2017-10-22 03:23:58 -07:00
bjorn 9e9b0b7b94 Material support for Models; 2017-10-21 15:20:16 -07:00
bjorn dece1d896f Update skybox and font rendering; 2017-10-21 14:59:34 -07:00
bjorn 16915e4fa2 Material graphics state; 2017-10-21 14:32:41 -07:00
bjorn 3743b9d032 Add Material; 2017-10-21 14:00:33 -07:00
bjorn 4935816457 Remove texturing from primitives; 2017-10-21 13:54:50 -07:00
bjorn 54533351bb Generalize Shader to support more types of uniforms; 2017-10-21 13:39:50 -07:00
bjorn b82ed7fd56 Put shaders in their own file; 2017-10-21 13:21:30 -07: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 e8f2166e00 Remove textures from Models and Meshes; 2017-10-21 12:34:58 -07:00
bjorn b124f7e7c2 Model:getMesh; 2017-10-15 10:26:33 -07:00
bjorn 0d3bc4cfaa Disable depth mask when drawing text; 2017-10-15 09:16:13 -07:00
bjorn f5e8535726 Use internal scene graph for models;
Allows for loading of more complicated models and multiple materials
for a single model.  Also fixes bugs with Mesh draw ranges.  Model:getAABB
is temporarily removed.
2017-10-14 18:01:00 -07:00
Ben Campbell 8f97384951 cheesy hack to module load order to get fake headset running 2017-10-12 23:04:18 +13:00
bjorn 27c914664c Clean up includes; 2017-09-19 23:49:10 -07:00
bjorn 6c3abad9f4 Fix crash in OpenVR mirror texture; 2017-09-18 00:39:47 -07:00
bjorn 6d85f512e3 Shoo tabs; 2017-09-17 17:38:22 -07:00
bjorn 9202b42d8d Try to enable antialiasing in WebVR; 2017-08-27 13:23:21 -07:00
bjorn d6aad1faba Fix RGB texture size; 2017-08-26 19:31:03 -07:00
bjorn 22a8152eb5 Fix normal matrix; 2017-08-26 18:36:30 -07:00
bjorn c6c29e3895 Fix strange font cast issue; 2017-08-26 17:15:53 -07:00
bjorn 773abf26ae Fix bug with mesh mapping; 2017-08-25 21:18:22 -07:00
bjorn 9fd4030f47 Tweak sphere coordinates; 2017-08-15 21:21:49 -07:00
bjorn e4a7c6bb47 Fix WebVR; 2017-08-15 01:05:18 -07:00
bjorn 3f875118a9 Fix shader issues; 2017-08-13 21:03:11 -07:00
bjornbytes 3c3076f8c4 Fix VR rendering; 2017-08-12 20:43:23 -07:00
bjorn 0311232ae1 Add lovrModel and lovrView matrices; 2017-08-10 22:23:19 -07:00
bjorn 74f585ca8d Use lovrAssert and lovrThrow for better errors; 2017-08-10 01:05:04 -07:00
bjorn 3cd245f2b0 Window customization via conf.lua; 2017-08-09 20:02:02 -07:00
bjorn 1d82277173 Fix mesh index buffer binding; 2017-08-09 01:31:25 -07:00
bjorn 3143c87197 Fix issues with framebuffers; 2017-08-09 01:09:19 -07:00
bjorn b94bc558fc Fix fullscreen quads; 2017-08-09 00:59:04 -07:00
bjorn 6c316c7587 Fix Shader bugs; 2017-08-09 00:56:13 -07:00
bjorn 9dd9678077 Fix default font bug; 2017-08-08 23:49:17 -07:00
bjorn 9f6f993903 Fix Mesh; 2017-08-08 22:58:11 -07:00
bjorn c76df39407 Organize lovrGraphicsReset; 2017-08-08 22:39:00 -07:00
bjorn 60867925e4 Move unused header includes; 2017-08-08 22:34:23 -07:00
bjorn d849f2429c Everything is probably broken; 2017-08-08 21:10:56 -07:00
bjorn 76f94e8ade Rename primitive data structures; 2017-08-08 18:57:41 -07:00
bjorn 88a32fd951 Simplify Skybox stuff; 2017-08-08 18:52:28 -07:00
bjorn 45618f819e Fix Skyboxes; 2017-08-08 18:24:29 -07:00
bjorn 58931f01e2 Allow lovr.graphics.setFont(nil); 2017-08-08 18:01:39 -07:00
bjorn abbe5e36d0 Canvas state is internal; 2017-08-08 02:20:55 -07:00
bjorn c89301c284 Texture is internal state; 2017-08-08 02:14:50 -07:00
bjorn fe570e19f1 Diff vao, vbo, and ibo; 2017-08-08 02:13:07 -07:00
bjorn dfd0926fab Diff framebuffer; 2017-08-08 02:05:30 -07:00
bjorn ef58eea4b8 Projection is transform state; 2017-08-08 01:37:23 -07:00
bjorn 6077cae95a Font state; 2017-08-08 01:36:29 -07:00
bjorn 80c9d7f4d8 Shader state; 2017-08-08 01:33:52 -07:00
bjorn 03c01cb97a Use access bits better when mapping Meshes; 2017-08-08 01:33:52 -07:00
bjorn 3da48027ce Use struct for shape state; 2017-08-08 01:33:52 -07:00
bjorn b65673bc3f Color object; 2017-08-08 01:33:52 -07:00
bjorn 9efa89768c Organize graphics state; 2017-08-08 01:33:52 -07:00
bjorn ef06a19fa4 Refactor texture filter structure; 2017-08-08 01:33:52 -07:00
bjorn bb2ec5b49c No pointers for CanvasState; 2017-08-08 01:33:52 -07:00
bjorn f649a50264 rm lovrGraphicsSetPerspective; 2017-08-08 01:33:52 -07:00
bjorn 38c5342d8a Private lovrGraphicsEnsureFont; 2017-08-08 01:33:52 -07:00
bjorn 7f80a8577f Mesh cleanup; 2017-08-08 01:33:52 -07:00
bjorn ce0d2746fd State diff for Mesh:setTexture; 2017-08-08 01:33:52 -07:00
bjorn 1402213029 Clean up system limits; 2017-08-08 01:33:52 -07:00
bjorn fd176a608a Private graphics primitive functions; 2017-08-08 01:33:52 -07:00
bjorn 0e474ad6af Reorganize lovrFontPrint; 2017-08-08 01:33:52 -07:00
bjorn 6b0f903b2e rm lovr.graphics.getColorMask; rm lovr.graphics.setColorMask; 2017-08-08 01:33:52 -07:00
bjorn ed25eef2d3 rm lovr.graphics.getScissor; rm lovr.graphics.setScissor; 2017-08-08 01:33:52 -07:00
bjorn 146d037cae Simplify lovrGraphicsClear; 2017-08-01 13:11:32 -07:00
bjorn 48733f87c4 Just use EMCSRIPTEN instead of LOVR_WEB; 2017-08-01 12:16:09 -07:00
bjorn 94355db2b5 Remove font shader discard; 2017-07-31 02:43:04 -07:00
bjorn 416f6f7216 Default to LEQUAL CompareMode; 2017-07-31 02:42:44 -07:00
bjorn 6a13ac5ee1 Don't include glad on web; 2017-07-31 02:41:44 -07:00
bjorn 8464463d4e Set default texture filter before creating texture; 2017-07-31 02:41:13 -07:00
bjorn 059c5d3ef2 Fix bugs with font textures; 2017-07-23 23:22:51 -07:00
bjorn 6a8e22f5be Don't check for ubiquitous extension; 2017-07-23 16:24:43 -07:00
bjorn a1007a1545 Add anisotropy system limit; 2017-07-23 16:24:43 -07:00
bjorn 7d31410c8c New Texture filter modes; lovr.graphics.setDefaultFilter; 2017-07-23 16:24:43 -07:00
bjorn f1141664b6 Mipmap generation; 2017-07-23 16:24:43 -07:00
bjorn b25d345e72 Add compressed texture formats; 2017-07-23 16:24:43 -07:00
bjorn 2a05fb4033 Refactor TextureFormat; 2017-07-23 16:24:43 -07:00
bjorn 12700f9785 Fix font shader in WebGL; 2017-07-22 16:57:09 -07:00
bjorn abaecb7f60 Font fixes; 2017-07-18 21:48:08 -07:00
bjorn d8047cdeff rm FORMAT_LUMINANCE_ALPHA; 2017-07-19 07:00:11 +09:00
bjorn c750b64b1b Cleanup; 2017-07-19 07:00:11 +09:00
bjorn 8ad3e64a2d Font shader; 2017-07-19 07:00:11 +09:00
bjorn 93c286afb6 Glyph padding; 2017-07-19 07:00:11 +09:00
bjorn 800d07a0de Use msdfgen; 2017-07-19 07:00:11 +09:00
bjorn 41210b1bd0 lovr.graphics.plane takes regular transform; 2017-07-19 05:07:18 +09:00
bjorn b2feefe98a Fix Model:getAABB more; 2017-06-25 04:16:47 -07:00
bjorn 7843e24028 Fix Model:getAABB; 2017-06-25 01:30:19 -07:00
bjorn e5a311af09 Add glad for windows; 2017-06-23 19:35:49 -07:00
bjorn 83118a5012 lovr.graphics.sphere; 2017-06-21 23:10:45 -07:00
bjorn dd1db4c86f lovr.graphics.box; Better non-uniform scale; 2017-06-21 19:42:34 -07:00
bjorn a13c793769 Model:getAABB; 2017-06-21 18:53:11 -07:00
bjorn 3744706ade Fix zero scale; 2017-06-20 22:56:11 -07:00
bjorn dfd6c91dec lovr.graphics.cylinder; 2017-06-20 20:54:22 -07:00
bjorn ca95fa0df0 Handle texture formats better; 2017-06-18 17:28:15 -07:00
bjorn 52b203240d Fix mapped buffers for WebGL 2; 2017-06-18 16:19:26 -07:00
bjorn 8beac66db0 OpenGL ES3; Remove glad;
Stop using OpenGL extensions and drop support for OpenGL ES2,
WebGL 1, and OpenGL 2.  Remove glad.
2017-06-18 15:55:01 -07:00
bjornbytes 5f3ce18fcd Fix mesh mapping; 2017-06-13 22:59:27 -07:00
bjornbytes 9f097e64e2 Add lovrNormalMatrix; 2017-06-13 20:04:51 -07:00
bjorn b84ef967e6 Fix integer attribute test; 2017-06-11 16:48:46 -07:00
bjorn 613b1ea67f Refactor GL extension code; 2017-06-10 16:25:46 -07:00
bjorn 265a81c411 Add window title; Improve initial error handling; 2017-06-10 15:34:35 -07:00
bjorn 24a980446a Add extra room to transform stack;
Currently the transform stack doesn't take into account the fact that internal functions use
transforms.  Performing error checking for the transform stack in the internal functions is kind of
difficult (right now we just segfault), so it's easier to just reserve a few of the transforms for
internal use.
2017-06-10 14:44:04 -07:00
bjorn 616e4b9488 Clean up Mesh IBO properly; 2017-06-10 14:06:55 -07:00
bjorn 10ddc06c13 No resizable window; 2017-06-01 23:52:37 -07:00
bjorn ef89de2b5f Cleanup; 2017-05-17 13:10:37 -06:00
bjorn 08a5259aec Minor lovr.graphics.clear optimization; 2017-05-16 23:43:47 -06:00
bjorn a2400e9876 WebVR fixes; 2017-04-29 13:33:59 -07:00
bjorn 520227aa87 Fix meshes; 2017-04-22 10:34:44 -07:00
bjorn 6acebc221e Fix mesh attributes; 2017-04-22 00:12:32 -07:00
bjorn 4537e17894 Fix typo; 2017-04-20 21:20:43 -07:00
bjorn 0f1acae42a WIP; 2017-04-16 16:56:49 -07:00
bjorn 9eb4d7b393 Move all window code into graphics module; 2017-04-12 19:48:47 -07:00
bjorn 25e6f3ce4e Fix Mesh unmapping; 2017-04-09 13:40:20 -07:00
bjorn 7f687f9732 No game screen; 2017-04-02 05:55:21 -07:00
bjorn 3977db7249 Don't mess with depth test when rendering fonts; 2017-04-01 15:33:32 -07:00
bjorn a04e5013ad lovr.graphics.getSystemLimits; 2017-03-31 04:22:18 -07:00
bjorn 9d89ea5634 Allow custom fullscreen shaders; 2017-03-30 18:56:51 -07:00
bjorn fbc9805ab1 Allow custom skybox shaders; 2017-03-30 18:54:39 -07:00
bjorn 847a01b76f Fix skyboxes; 2017-03-30 18:48:03 -07:00
bjorn 6cc5a036e8 Fix Font:getWidth; 2017-03-25 18:41:25 -07:00
bjorn 7077d89a22 Font metrics; 2017-03-16 01:12:32 -07:00
bjorn 0b57b48702 Font pixel densities; 2017-03-15 20:51:16 -07:00
bjorn 390220f945 Font alignment; 2017-03-15 20:46:01 -07:00
bjorn 22526552dc Use correct texture for fonts; 2017-03-14 02:32:01 -07:00
bjorn 37c2a11172 Fix panorama Skyboxes I promise; 2017-03-12 17:31:06 -07:00
bjorn 5bd364f65f Fix skybox math; 2017-03-12 17:13:50 -07:00
bjorn a4257378f0 Panorama Skybox fixes; 2017-03-12 16:57:27 -07:00