Commit Graph

171 Commits (2a8c39f854ce5b0801716e145106e27ee1cabc10)

Author SHA1 Message Date
Webster Sheets f5a9a64436 Add profiling, refactor Model animation ticking
Only tick animations that are marked active.
More work needs to be done in Ship.cpp to support this,
but it should enable us to have far more ships in one system.
2021-05-01 17:50:24 -04:00
Webster Sheets 4432e4594f Add new debug / editor colorscheme
Pretty much copied from the Limit Theory editor's colorscheme.
Some support is added to PiGui::Instance to allow swapping style objects on the fly.
2021-04-29 15:44:38 -04:00
Webster Sheets 3bd735e40d Fix orthographic projection
OrthoFrustum and OrthoMatrix were not properly set up for reverse-Z.
This PR fixes it by using the proper inversion of a right-handed ortho matrix.
2021-01-15 21:10:54 -05:00
Karl F 9e44b09314 Happy new year!
HAPPY MERRY 2021!
2021-01-03 19:40:16 +01:00
Webster Sheets 7c9753af16 Fix guns needing combat target, modelviewer config
Fixes #5103
Fixes #5099
2021-01-02 18:31:37 -05:00
Webster Sheets 7506dcb849 It is the nature of all things to die...
and the reaper's due must be paid.

As we fly back to base after another successful mission, let us clear
comms in a moment of silence for the wingmates who no longer fly in
this squadron.

- To Robn, who wrote newUI in the first place. Without you, there would
  be no newUI or pigui, and I'd still be complaining about oldUI.
- To Johnbartholomew, who spearheaded the move of existing systems to
  newUI and implemented plenty of code we still use today.
- To ecraven, who did all of the work of adding ImGui to the code base
 and worked tirelessly to port existing screens.
- To vakhoir, who not only worked tirelessly to port the most
  recalcitrant of screens, but developed UI frameworks and paradigms
  that made working on the UI a pleasure instead of a pain.

This commit totally removes the newUI from the codebase. Everything that
made reference to it (save the LuaConsole) has been ported or struck
from the code. This has simplified some systems significantly, has
allowed us to drop 8,000+ lines of C++ code, cut our build times
significantly, and brings us one step closer to a modern rendering and
tools pipeline.
2020-12-01 13:02:34 -05:00
Webster Sheets 1e5e1d3a62 Improve ModelViewer
- Split up the workspace better
- Add checkboxes to display model tags et. al.
- Add a tag name+location display
- Sane defaults for which animation is selected; remove the 'None' option
- Fix an issue with escape_pod.model having the wrong material name.
2020-11-15 16:05:06 -05:00
Webster Sheets aeebf6e514 Fix a few bugs with the Input system
- Refactor InputFrame add/remove to support the console better.
- Remove the unneeded HandleSDLEvent virtual method on View.
- Fix a binding name mismatch issue.
- Add a (disabled) PerfInfo debug tab for debugging the input system.
2020-11-15 01:51:34 -05:00
Webster Sheets e0451219d8 Move reverse-container implementation to utils.h
Fix unused variable warnings.

Add SmoothEasing function

- A variable-exponent easing function for input and friends
- It's not as performant as the optimized InOut*Easing variants so use sparingly
- Based on the mentioned blog and reverse-engineering the Godot implementation
2020-11-11 18:43:42 -05:00
Webster Sheets f5d7038d69 Refactor to InputFrame 2.0
Significantly refactored the Input class, added Input::Manager to handle
most duties of the Input system.

Replaced the legacy KeyBindings system with the new InputBindings
(namespace subject to change) system for handling key state and key
chords - among other improvements, there is no longer a hardcoded
dependency on Pi::input anymore, as well as storing the binding state in
the binding itself, completely decoupling InputBindings from the input
system that handles input events and significantly reducing the
complexity of the binding system.

Input::Manager now is totally responsible for generating binding events,
removing the need for WorldView::HandleSDLEvent and its ilk - interested
parties can simply bind to the onPressed event and they will only be
notified when the binding in question is part of an active input frame
and nothing else has grabbed the input event, vastly simplifying control
flow.

Among other effects, this almost totally eradicates the need for
Pi::IsConsoleActive().

The lua Console widget is slightly broken as a result of this change,
it doesn't handle activation/deactivation state changes properly. The
solution to this seems to simply be a direct rewrite in PiGui, which
I don't expect to cause too many issues.

I've added a CMake option to use LLD to speed up incremental build link
times; this seems to be somewhat platform dependent and is not
implemented for windows at this time.

Serialization of key bindings to the config file is totally completed,
although support for a graphical method of binding multi-key chords is
not anticipated for this pull request.
2020-11-11 18:41:34 -05:00
Webster Sheets 6a1945874f Remove dependence on PngWriter
Now we don't need to link it into tool binaries!
Also removed unused MsgTimer functionality
2020-06-06 18:01:41 -04:00
Webster Sheets 59cafb1b95 Remove OS::RedirectStdio
Now that the log framework can intelligently write to a file as well, there's no need to redirect the stdio streams.
2020-05-15 16:39:42 -04:00
Webster Sheets 8076a7b767 Move several classes to core module
This is primarily to make tool development easier - right now the only
way to build a tool without linking all 90MB+ of pioneer binary into the
tool is to cherry-pick a set of cpp files and hope you have all the
symbols you need for what you're doing.

Over time, "generic" functionality like compression, math, etc. will be
moved to the core module so tools can link against one library without
incurring lengthy link and compile times.
2020-05-15 16:36:14 -04:00
Edoardo Morandi e6b9cd8d71 Remove many warnings 2020-04-25 01:31:42 +02:00
Webster Sheets b754aeed2a Rewrite ModelViewer to use GuiApplication and PiGui
"Snap to Direction" keybinds don't work, due to Input not dispatching their event handlers.
Will be resolved in a later sprint on the Input system.
2020-04-01 17:04:52 -04:00
Webster Sheets 8990fbeb96 Add Input::SetCapturingMouse()
Moved mouse capture functionality from the renderer to Input
Temporarily patched ModelViewer, pending a major refactor to make it compatible with the input class.
2020-03-24 13:03:23 -04:00
Karl F 436db08636 Happy new decade!
May you live long and prosper!
2020-01-01 10:47:46 +01:00
mike-f1 75956b9fd0 Decouple includes of Sfx.* and trade dependency from Ship with dependency from ModelBody
Forward declare Space in Ship.h; Make things compiling again

Decouple WorldView.h; Some other decouple here and there

Decouple Renderer no more included in RenderState; Model not including directly its childs
2019-05-21 17:50:50 +02:00
mike-f1 c5412ffcc7 Run clang-format on everything 2019-01-22 20:13:40 +01:00
mike-f1 f1a53cffd6 Remove some inludes from Pi and get things right in order to compile 2019-01-22 20:10:28 +01:00
Webster Sheets 5cdaefad6a Run clang-format over the entire code base.
Fix hidden header-inclusion-order dependency errors.
Update .clang-format for v7.0.1.
2019-01-05 17:09:05 -05:00
Karl F d2ab921b62 Happy New Year!
Awesome sauce (for next year):
find . -type f -exec sed -i 's/2008-2018 Pioneer Developers'/'2008-2019 Pioneer Developers/g' {} \;

closes #4507
2019-01-03 15:28:42 +01:00
Andrew Copland 80ceec9b7f Remove OpenGL 2.1 code from the project 2018-09-16 11:02:02 +01:00
Karl F 7225e9c723 Happy New Year!
Ten years in the making now, but how can we improve upon perfection
for ten more years?
2018-01-01 21:22:12 +01:00
John Bartholomew 7c3a13a0c0 Remove almost all includes of Serializer.h, include GameSaveError.h where necessary. 2017-12-26 13:02:26 +00:00
Andrew Copland 6a81cbec47 Refactor buffers to have a capacity and size so they can be reused instead of discarded. 2017-12-16 16:17:38 +00:00
Andrew Copland 12a28210d6 Remove WindowSDL and move functionality and responsibilities into Renderer derived classes. 2017-05-31 20:59:06 +01:00
Andrew Copland 8cb1555f67 Eliminate the evil trailing whitespace 2017-03-05 13:15:55 +00:00
Andrew Copland 20795e5a22 Merge pull request #3934 from fluffyfreak/glew-gl2
OpenGL 2.1 support
2017-03-03 15:33:19 +00:00
mike-f1 9dd594d1cb Close #2665: Orthographic view in modelviewer 2017-02-28 22:02:53 +01:00
Andrew Copland 6d067c72d7 OpenGL 2.1 support 2017-02-26 16:47:09 +00:00
Andrew Copland 74d50958fe MERRY HAPPY 2017 2017-01-04 15:11:15 +00:00
Andrew Copland 1798c74703 Load dds instead of png for decals 2016-11-30 19:59:09 +00:00
Andrew Copland de247e7c63 Moved the responsibility for rendering NavLight billboard from scenegraph/Model into NavLights. 2016-09-14 22:45:16 +01:00
Robert Norris 51aa915285 Merge remote-tracking branch 'fluffyfreak/whole-new-ass' 2016-04-30 21:12:41 +10:00
Andrew Copland 663d8c72c0 Request a model, don't just switch and destroy the UI whilst we're in it's processing stage. 2016-04-03 22:18:05 +01:00
Andrew Copland 1f1f9b01c7 Avoid a crash in ModelViewer 2016-04-03 21:55:20 +01:00
John Bartholomew da8ff2c5a3 fix passing string variable directly to printf format string
Fixes GCC -Wformat-security warning.
2016-03-26 20:56:26 +00:00
Andrew Copland ab0fbac2fc Use within ModelViewer and provide button so user can easily change colours 2016-03-10 11:24:08 +00:00
Andrew Copland 537894fa84 Split some output lines for better formatting 2016-03-06 17:11:48 +00:00
Andrew Copland 333b8cd913 Redirect stdio output for errors and out to output.txt file 2016-03-06 17:00:18 +00:00
Andrew Copland 000fd6c8d0 A more flexible use of tag_gun_ to support any number of gun mount points. 2016-02-29 17:42:04 +00:00
Andrew Copland fea5ac26b2 MERRY HAPPY 2016 2016-01-29 11:31:54 +00:00
Andrew Copland afa47ce919 Enable toggling on/off of the Anisotropic filtering. 2016-01-11 21:58:20 +00:00
Andrew Copland d5570df283 Added ability to set color from Hex (32-bit int) value. Sets RGBA.
Removed ability to set Color4ub from single Uint8.
2015-11-22 19:02:20 +00:00
Andrew Copland 2fa38357fe Moving code out of DrawModel so it can be reused. 2015-07-22 21:18:20 +01:00
Andrew Copland 2306bb9723 Eliminate a per-frame buffer using DrawTriangles and move some calls around. 2015-07-22 21:08:09 +01:00
Robert Norris 8b5c72155a explicitly register wanted renderers from program startup
the idea here is to not have libgraphics depend directly on the
renderers, so individual renderers can be compiled in/out without link
failures
2015-01-07 07:54:45 +11:00
Robert Norris 22d380426d move GL screendump into GL renderer 2015-01-07 07:54:45 +11:00
Robert Norris 84ef0d7746 dummy renderer for the modelcompiler 2015-01-07 07:54:45 +11:00