summaryrefslogtreecommitdiff
path: root/Userland/Applications/3DFileViewer
AgeCommit message (Collapse)Author
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.
2021-05-30LibGL: Implement glBindTexture()Stephan Unverwerth
Textures are now initialized with a nullptr upon generation. They are only actually created once they are bound to a target. Currently only the GL_TEXTURE_2D target is supported. The software rasterizer now allows rendering with or without a bound TEXTURE_2D.
2021-05-273DFileViewer: Add separator before quit menu actionLinus Groh
2021-05-273DFileViewer: Add view menuErik Biederstadt
The view menu contains: 1. A fullscreen option (also accessed by pressing F11). 2. Rotation axis controls (x, y, z, or any combination) 3. Rotation speed controls (No rotation, slow, normal, or fast)
2021-05-263DFileViewer: Support textured modelsJesse Buhagiar
Models that contain UV co-ordinates are now supported, and will display with a texture wrapped around it, provided a `bmp` with the same name as the object is in the same directory as the 3D Model.
2021-05-213DFileViewer: Make the main widget a GUI::FrameAndreas Kling
2021-05-203DFileViewer: Clean up file handlingGunnar Beutner
This unifies how 3DFileViewer handles the initial file when starting the application and when opening files later on via the menu. Errors are shown both for the initial load as well as when loading files later on. An error during file load no longer clears the existing model. It also adds support for specifying the filename as a command-line argument. The opened file's name is shown in the titlebar.
2021-05-203DFileViewer: Move the example model into the home directoryGunnar Beutner
2021-05-203DFileViewer: Remove unveil() calls and add "thread" pledgeAndreas Kling
An application that allows opening arbitrary files from the filesystem needs to allow itself to access the filesystem, otherwise there's no point in supporting the feature. :^) And the "thread" pledge is needed for background thumbnail generation.
2021-05-193DFileViewer: Move `Demos/GLTeapot` to `Applications/3DFileViewer`Erik Biederstadt
Also changes the category to `Graphics`