diff --git a/devlog.md b/devlog.md index 041ccb9..6b35ed4 100644 --- a/devlog.md +++ b/devlog.md @@ -1,20 +1,19 @@ -This is, by far, the devlog with most hours registered this project has ever had. So, what new, cool thing did I implement? Nothing! This time was almost entirely dedicated writing _documentation_, and preparing the project to be released. +A month later, we're in the world wide web! -One of the main challenges I knew I'd have to face when starting this project was explaining it to other people. The math behind it is quite complex (get it?), so I knew that, eventually, I'd have to write some sort of educational guide to tell people what it does, and how to use it. More than nine hours later, we're done! +From the beginning of the project, I kept telling myself that I would, eventually, port it to Web Assembly. Many architectural choices were made with this in mind (not using compute shaders, sticking to version 330 features, using ImGUI for the frontend, not using a file system, etc). +I just knew that this would be sort of a headache, and kept delaying it, but it comes a time at our lives where we have to accept that not everyone wants to download a sketchy binary from github. So we had to port it to web assembly! -I figured most people learn better visualy, so I poured some of my time to learn how to use Manim, the animation software 3blue1brown uses for his videos. I made about a dozen animations with it, and wrote a guide to introduce a laymen into complex analysis and function plotting. -Additionally, I also documented how the tool works internally (basically doing the same thing that I already did with the devlogs, but to more depth), and its features. -This, plus an install guide, getting a bunch of screenshots and videos from the plotter to put in README, makes us have completed our project's documentation! +For those not familiar with the tech, WebAssembly (wasm, for short), is essentially the low-level language of the web. The advantage is that it's faster than javascript, and many languages can compile down to it - and that includes C++! +Our graphics core is entirely made in OpenGL, but thankfully, a tool named Emscripten also handles this conversion by turning OpenGL into WebGL (the web equivalent). So, we just had to rewrite our code to handle things specific to the web. -A small portion of this time was also dedicated to making the project build to a single executable, for it to have a favicon, and other small quality-of-life changes. Next we'll bugfix, and this project will be ready to ship! +Our main change was the textures that we were using to send data to our shaders. Originally, this was done through `samplerBuffer`s, which don't exist in the version OpenGL runs. This made us have to change our data to 2D textures, `sampler2D`. This requires a little more math to get data from the texture, but it's small enough to be a change applied both to the desktop and web version (to avoid refactoring headache). -Attached, some of the animations! +The rest is changing the main loop logic (to be step-based), the event callbacks, and creeating a basic UI. Attached, our code running in the website! -**Related Commits** -[Commit a160c09](https://url.jam06452.uk/754z65): Finished basic settings for deployment -[Commit fae6ce0](https://url.jam06452.uk/1c5esi5): Added grid warping -[Commit 42ee549](https://url.jam06452.uk/1v2p4t0): Finished the-basics documentation -[Commit 5bb3f81](https://url.jam06452.uk/akab42): Added advanced.md and assets -[Commit 6a5f185](https://url.jam06452.uk/44q6td): Added images to features.md, started README.md -[Commit 30b3560](https://url.jam06452.uk/e7mrhd): Finished readme.md +Take a look for yourself in: https://sekqies.github.io/complex-plotter/ +**Commits** +[04e5437](https://url.jam06452.uk/1w417ue): Working web assembly build - ImGUI not working +[181a62c](https://url.jam06452.uk/up08en): Finished web assembly porting +[5ea3105](https://url.jam06452.uk/1s6zjmu): Add web deploy +...and 7 other commits fixing github \ No newline at end of file diff --git a/src/graphics/ui.cpp b/src/graphics/ui.cpp index c8f35a8..070bd31 100644 --- a/src/graphics/ui.cpp +++ b/src/graphics/ui.cpp @@ -265,7 +265,7 @@ void render_and_update(FunctionState& state, ViewState& view_state, unsigned int } return out; }(); - ImGui::TextWrapped(supported_operators.c_str()); + ImGui::TextWrapped("%s", supported_operators.c_str()); } if (UI::CollapsingHeader("Presets")) { static const char* presets[] = {