summaryrefslogtreecommitdiff
path: root/Userland/Applications/3DFileViewer
AgeCommit message (Collapse)Author
2022-08-14Base: Launch FileSystemAccessServer at session start-upLucas CHOLLET
2022-07-12Everywhere: Replace single-char StringView op. arguments with charssin-ack
This prevents us from needing a sv suffix, and potentially reduces the need to run generic code for a single character (as contains, starts_with, ends_with etc. for a char will be just a length and equality check). No functional changes.
2022-07-12Everywhere: Add sv suffix to strings relying on StringView(char const*)sin-ack
Each of these strings would previously rely on StringView's char const* constructor overload, which would call __builtin_strlen on the string. Since we now have operator ""sv, we can replace these with much simpler versions. This opens the door to being able to remove StringView(char const*). No functional changes.
2022-04-18Userland: Always construct Application with try_create()Sam Atkins
2022-04-10Applications: Support `.obj` polygons in `3DFileViewer`Jelle Raaijmakers
Our `WavefrontOBJLoader` only supported faces with 3 vertices, but `.obj` files can specify arbitrary polygons with 4 or more vertices.
2022-04-06LibGL+LibGPU+LibSoftGPU: Load SoftGPU driver dynamicallyStephan Unverwerth
This loads libsoftgpu.so during GLContext creation and instantiates the device class which is then passed into the GLContext constructor.
2022-04-023DFileViewer: Allow escape key to exit fullscreen modeAdam Patterson
I went into fullscreen mode, via the View menu, before looking at the associated key (F11). I had to kill Qemu to be able to escape. Escape is an intuitive way to exit most fullscreen modes.
2022-04-013DViewer: Add support for dropping filesJames Mintram
2022-04-013DFileViewer: Do not abort model loading when texture is missingStephan Unverwerth
2022-04-01Everywhere: Run clang-formatIdan Horowitz
2022-03-243DFileViewer: Enable smooth shading in viewer + teapot modelSahan Fernando
2022-02-28Applications: Change static constexpr variables to constexprLenny Maiorani
Function-local `static constexpr` variables can be `constexpr`. This can reduce memory consumption, binary size, and offer additional compiler optimizations.
2022-02-14Applications: Use default constructors/destructorsLenny Maiorani
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#cother-other-default-operation-rules "The compiler is more likely to get the default semantics right and you cannot implement these functions better than the compiler."
2022-01-203DFileViewer: Use FileSystemAccessClient::try_* APIsMustafa Quraish
This commit also removed the redundant `filename` parameter from `GLContextWidget::load_file`, since the filename is already stored within the file itself.
2022-01-20Userland: Add horizontal mouse scroll supportDmitry Petrov
2022-01-18LibGL+LibSoftGPU+3DFileViewer: Implement Specular highlighting :^)Jesse Buhagiar
2022-01-123DFileViewer: Replace lambertian lighting with GL LightingJesse Buhagiar
2022-01-093DFileViewer: Propagate errors using try_set_main_widget in maincreator1creeper1
2021-12-12Userland: Use File::lines() range-based for loop where appropriateSahan Fernando
2021-12-013DFileViewer: Add checkbox to disable textureJelle Raaijmakers
2021-11-293DFileViewer: Set correct aspect ratio in view frustumJelle Raaijmakers
2021-11-293DFileViewer: Improve FPS displayJelle Raaijmakers
We only showed frame times down to the millisecond. Our FPS counter was based off of that, allowing for a limited set of possible FPS values. Convert these calculations to floating point so we get more useful FPS and frame time values.
2021-11-28Everywhere: Use default execpromises argument for Core::System::pledgeBrian Gianforcaro
2021-11-23LibCore+LibSystem: Move syscall wrappers from LibSystem to LibCoreAndreas Kling
With this change, System::foo() becomes Core::System::foo(). Since LibCore builds on other systems than SerenityOS, we now have to make sure that wrappers work with just a standard C library underneath.
2021-11-22Everywhere: Use Application::construct() with Main::Arguments directlyMustafa Quraish
Use the updated API everywhere we are currently manually passing in `arguments.argc` and `arguments.argv`.
2021-11-223DFileViewer: Port to LibMainPedro Pereira
Simplified one pledge() and five unveil() by using TRY().
2021-11-133DFileViewer: Clean some code for increased readability on MeshPedro Pereira
This replaces all usages of 'm_triangle_list[i]' with 'triangle' in order to improve readability of the code.
2021-11-133DFileViewer: Calculate face-normal from vertex-normals of the trianglePedro Pereira
This change calculates the face-normal of the triangle by adding the three vertex-normals and then normalizing. This results in an average of the three vertex-normals.
2021-11-133DFileViewer: Add 'normals' to Mesh constructorPedro Pereira
This change allows a Mesh object to be created with a vector of normals.
2021-11-133DFileViewer: Add vertex normal parsing to WavefrontOBJLoaderPedro Pereira
This change allows us to parse vertex-normal lines "vn x y z" and map them to the correct index on face lines ("f v1/vt1/vn1").
2021-11-08LibGfx: Use ErrorOr<T> for Bitmap::try_create()Andreas Kling
Another one that was used in a fajillion places.
2021-11-08LibGfx: Use ErrorOr<T> for Bitmap::try_load_from_file()Andreas Kling
This was used in a lot of places, so this patch makes liberal use of ErrorOr<T>::release_value_but_fixme_should_propagate_errors().
2021-10-27Everywhere: Rename left/right-click to primary/secondaryFiliph Sandström
This resolves #10641.
2021-09-123DFileViewer: Use ElapsedTimer::start_new()Brian Gianforcaro
2021-09-093DFileViewer: Use unveil and FileSystemAccessServerTimothy
This will restrict 3DFileViewer's access to the file system. 3DFileViewer loads a texture based on the path of the model loaded, this will request access to the texture file before loading.
2021-09-013DFileViewer: Maintain the FPS counter's positionDawid Wolosowicz
Without this, any resize of the GLContextWidget might leave the label somewhere it shouldn't be. Toggling fullscreen is a single example of that behavior.
2021-08-18LibGL: Fix triangle winding calculationStephan Unverwerth
Since we operate in screen space where y points down we need to reverse what is considered clock wise and what is considered counter clockwise. The rasterizer always expects triangles with a consistent winding order thus swap 2 vertices if necessary to reverse the winding before passing the triangle on to the rasterization stage.
2021-08-18LibGL: Fix interpretation of BGRA byte orderStephan Unverwerth
This fixes byte order interpretation in several places.
2021-08-18LibGL: Fix glTexCoord behaviourStephan Unverwerth
glTexCoord should behave like glColor. It only updates a gl context variable that contains the current texture coordinates. The vertex is only actually created once glVertex is called.
2021-08-18LibGL+3DFileViewer: Make glRotatef accept degrees, not radiansStephan Unverwerth
This is in accordance with the GL spec. Also adjust rotation values in 3DFileViewer to take the new units into account.
2021-08-123DFileViewer: Allow zooming via mouse wheelStephan Unverwerth
2021-08-123DFileViewer: Add magnification filters to texture menuStephan Unverwerth
2021-08-123DFileViewer: Add texture menuStephan Unverwerth
This allows setting different texture wrap modes and setting different texture coordinate scale factors.
2021-08-013DFileViewer: Display frame rate optionallyK-Adam
It is turned off by default
2021-08-01Applications: Remove unused header includesBrian Gianforcaro
2021-07-21Userland: Add GUI::Window::add_menu() and use it everywhereAndreas Kling
Applications previously had to create a GUI::Menubar object, add menus to it, and then call GUI::Window::set_menubar(). This patch introduces GUI::Window::add_menu() which creates the menubar automatically and adds items to it. Application code becomes slightly simpler as a result. :^)
2021-07-21LibGfx: Use "try_" prefix for static factory functionsAndreas Kling
Also mark them as [[nodiscard]].
2021-07-033DFileViewer: Add primitive mouse controlsNoah Rosamilia
2021-06-17Everywhere: Add component declarationsGunnar Beutner
This adds component declarations so that users can select to not build certain parts of the OS.
2021-06-06AK+Everywhere: Disallow constructing Functions from incompatible typesAli Mohammad Pur
Previously, AK::Function would accept _any_ callable type, and try to call it when called, first with the given set of arguments, then with zero arguments, and if all of those failed, it would simply not call the function and **return a value-constructed Out type**. This lead to many, many, many hard to debug situations when someone forgot a `const` in their lambda argument types, and many cases of people taking zero arguments in their lambdas to ignore them. This commit reworks the Function interface to not include any such surprising behaviour, if your function instance is not callable with the declared argument set of the Function, it can simply not be assigned to that Function instance, end of story.