Age | Commit message (Collapse) | Author |
|
|
|
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.
|
|
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.
|
|
|
|
Our `WavefrontOBJLoader` only supported faces with 3 vertices, but
`.obj` files can specify arbitrary polygons with 4 or more vertices.
|
|
This loads libsoftgpu.so during GLContext creation and instantiates the
device class which is then passed into the GLContext constructor.
|
|
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.
|
|
|
|
|
|
|
|
|
|
Function-local `static constexpr` variables can be `constexpr`. This
can reduce memory consumption, binary size, and offer additional
compiler optimizations.
|
|
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."
|
|
This commit also removed the redundant `filename` parameter from
`GLContextWidget::load_file`, since the filename is already stored
within the file itself.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
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.
|
|
Use the updated API everywhere we are currently manually passing in
`arguments.argc` and `arguments.argv`.
|
|
Simplified one pledge() and five unveil() by using TRY().
|
|
This replaces all usages of 'm_triangle_list[i]' with 'triangle' in
order to improve readability of the code.
|
|
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.
|
|
This change allows a Mesh object to be created with a vector of normals.
|
|
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").
|
|
Another one that was used in a fajillion places.
|
|
This was used in a lot of places, so this patch makes liberal use of
ErrorOr<T>::release_value_but_fixme_should_propagate_errors().
|
|
This resolves #10641.
|
|
|
|
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.
|
|
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.
|
|
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.
|
|
This fixes byte order interpretation in several places.
|
|
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.
|
|
This is in accordance with the GL spec. Also adjust rotation values in
3DFileViewer to take the new units into account.
|
|
|
|
|
|
This allows setting different texture wrap modes
and setting different texture coordinate scale factors.
|
|
It is turned off by default
|
|
|
|
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. :^)
|
|
Also mark them as [[nodiscard]].
|
|
|
|
This adds component declarations so that users can select to not build
certain parts of the OS.
|
|
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.
|