Commit Graph

4123 Commits (spacecruft)

Author SHA1 Message Date
dave-kaye 804a5de2a7 Update GTK solar system browser
Add Dwarf Planets and Minor Moons to solar system browser to match Qt version
2022-05-05 10:41:46 +03:00
Andrew Tribick c6a320d086 Allow EOF status after skipping chunks/trailing bytes in 3ds fies.
This shouldn't happen and I cannot reproduce it, but some people
are running into issues with false positive errors.
2022-05-02 19:32:18 +02:00
Andrew Tribick 0c177cae01 Rewrite 3DS loader 2022-05-02 19:32:18 +02:00
Hleb Valoshka 4c6fa126d6 Remove remnants of the old font rendering system
Closes: #1359
2022-04-17 13:54:24 +03:00
Hleb Valoshka 698d03cd82 [gtk] Fix display of rings and fading orbits
Closes: #1360
2022-04-17 13:54:09 +03:00
Hleb Valoshka 6ab7660e0c [cmake] Don't mix plain & keyword target_link_libraries()
Closes: #1357
2022-04-07 10:45:15 +03:00
Levin Li b4cf176ac3 Fix nebula/ssc sprite rendering on hidpi setting 2022-04-02 07:53:25 -07:00
Hleb Valoshka f4bd55991f Optimize meshes with meshoptimizer library if available 2022-03-07 16:59:47 +03:00
Hleb Valoshka 746b9e3ef3 Optimize model by merging similar meshes 2022-03-07 16:59:47 +03:00
Hleb Valoshka ca80f4448a Optimize mesh by merging similar primitive groups 2022-03-07 16:59:47 +03:00
Andrew Tribick 2f77629216 Fix parsing and display of luminosity classes Ia-0, Ia, and Ib
- Allow spaces before luminosity class in stc file
- Allow Ia-0 to be spelled "Ia-0" (as displayed), "Ia0" (as previously), or
  "I-a0" (previous display format) in stc file
- Remove str() and ostream << operators on StellarClass (only used in tests)
2022-02-19 11:33:15 +01:00
Andrew Tribick d2f53d0a56 Supersede not supercede 2022-02-19 11:33:15 +01:00
Hleb Valoshka fb08de771a Create Logger in cmodview 2022-02-18 14:03:41 +03:00
Levin Li 318b4378a9 Fix lua crash in cleanup 2022-02-18 01:30:10 -08:00
Levin Li 6b856b3352 Fix broken star browser 2022-02-11 19:09:16 -08:00
Hleb Valoshka cbdd9de63f Draw glow before objects
Closes: #1339
2022-01-31 12:20:18 +03:00
Hleb Valoshka 9d60f6e660 [sdl] small cleanup 2022-01-26 22:59:43 +03:00
Hleb Valoshka b7dd51fc81 [sdl] set ShadowMapSize and SolarSystemMaxDistance from config 2022-01-26 22:59:43 +03:00
Hleb Valoshka fecc0ca0a9 [sdl] add support for CELESTIA_DATA_DIR environment variable 2022-01-26 22:59:43 +03:00
Hleb Valoshka c95e554c7a [sdl] allow copy/paste URL to/from a clipboard 2022-01-26 22:59:43 +03:00
Yasushi SHOJI 3702250525 cmod: 3dstocmod: Create logger
Without creating a logger, the command dies with SEGFAULT when
Read3DSFile(std::istream&) tries to print the verbose message.

    GetLogger()->verbose("3DS file, {} bytes\n", chunkSize + 6);

Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
2022-01-26 22:59:28 +03:00
Yasushi SHOJI 3a218976bf cmod: Fix VertexAttributeSemantic::Position compilation error
The commit b79959979a extracted cmod::Mesh::Position to
cmod::VertexAttributeSemantic::Position but didn't change this line.

This problem occurs only with cmake -DENABLE_TOOLS=1.

Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
2022-01-26 22:59:28 +03:00
Andrew Tribick 3a7e6d793b [win] Fix initialization of view options checkboxes 2022-01-26 18:21:44 +01:00
Hleb Valoshka 8f8a2f7677 Optimize calculation of center for renderLargePoint 2022-01-26 01:10:46 +03:00
Hleb Valoshka 772fe24e1b Reuse PointStarVertexBuffer do draw objects as points 2022-01-26 01:10:46 +03:00
Hleb Valoshka 96e282e161 Add methods to reset current matrices 2022-01-26 01:10:46 +03:00
Hleb Valoshka 20a4d13328 Refactor code to draw objects as points
* provide common routine to calculate point size
 * precalculate saturation magnitude
 * remove unused variables
2022-01-26 01:10:46 +03:00
Hleb Valoshka 2cb9da1085 [win32] Convert decimal point & thousands separator to UTF-8 2022-01-25 23:28:17 +03:00
Hleb Valoshka 34d18bb316 Add missing include to fix selfshadowing
Fixes: #1330
2022-01-23 11:39:33 +03:00
Hleb Valoshka f969b37c3e Refactor font handling code
* Add cache for loaded fonts
 * Replace `const std::string &` with `std::string_view` in print
 * Remove static load method
 * Reformat with clang-format
 * Return bool from celestiacore::set*Font
2022-01-20 12:10:30 +03:00
Andrew Tribick 3c9334ece9 [qt] Do not capture menu bars when taking screenshots 2022-01-18 19:00:54 +01:00
Levin Li fc561a7927 Add methods for handling HiDPI, scale icons, splash images using StretchBlt 2022-01-16 02:27:25 -08:00
Levin Li 9d1bcf14b3 Enable dpiAwareness in manifest 2022-01-16 02:27:25 -08:00
Andrew Tribick 40ed2011bf Use qreal to store return value of devicePixelRatioF 2022-01-15 18:13:28 +01:00
Andrew Tribick 7cf1aac419 [qt] Experimental Qt6 support
- Switch from legacy QGLWidget to QOpenGLWidget

- [win32] Use a frameless window 1 pixel larger than the monitor instead of a
  fullscreen window, in order to avoid issues showing context menus

- Fix a settings bug where window state on the fullscreen transition was not
  saved in the MainWindow group.
2022-01-15 18:13:28 +01:00
Levin Li 25cbfabba0 Enable visual styles for Win32 controls 2022-01-14 21:13:55 -08:00
Andrew Tribick 245225dcdf Fix for SonarScanner out of bound false positive 2022-01-12 21:40:21 +01:00
Andrew Tribick 410f86fc88 Use while loop to fix SonarScanner issue 2022-01-08 21:25:52 +01:00
Andrew Tribick 3f7bd9c13e Update floating point compilation options 2022-01-08 16:02:52 +01:00
Andrew Tribick 56751882e6 Minor tokenizer fixes
- Functions in cctype should be called with unsigned char.
- Use charconv to convert numeric tokens.
2022-01-08 15:44:25 +01:00
Hleb Valoshka 98610c9557 [cmake] suppress "deprecated-declarations" warning for gtk ui 2022-01-08 17:21:23 +03:00
Hleb Valoshka c251dac856 Split greek-letters handling from utf8 and refactor a bit 2022-01-08 17:21:23 +03:00
Hleb Valoshka eb93a24fcc Fix search for planets around stars with Bayer designations
Closes: #1297

The previos code didn't take into account names like "Ups And Ad" and
interpreted them as "Ups And A".
2022-01-05 15:56:34 +03:00
Hleb Valoshka d0899d29ee Fix ring shadow shaders for planets with several suns
Closes: #1305

Was broken in 32baed9bc
2022-01-05 13:34:51 +03:00
Hleb Valoshka 5bf9471674 Silence AstroObject::setIndex() unless debug verbosity 2022-01-02 19:32:15 +03:00
Andrew Tribick 7cdf65659d Clamp cosine of phase angle to [-1, 1] 2022-01-02 16:03:52 +01:00
Andrew Tribick 7b762832a4 [qtwin] Fix crash on pasting screenshots
Workaround for an issue with the Windows Qt version where Celestia crashes
when a copied screenshot is pasted into another application. This appears to
be because the data sent to the clipboard still contains a reference to the
data in the destructed Image object, despite the Qt documentation stating that
QClipboard::setImage causes the clipboard to take ownership of the data. This
does not occur if the QImage manages its own buffer.
2022-01-01 21:27:10 +01:00
Andrew Tribick 4a9403ecf5 Fix galaxy hue calculation 2022-01-01 12:38:54 +01:00
Andrew Tribick 33116aad4a Backport C++20 numbers header 2021-12-31 17:25:39 +01:00
Andrew Tribick e8ca56f575 Remove unused code and apply bugfixes to SphereMesh
- Remove unused overload of displace
- Fix some bugs retrieving wrong data element
- Use Eigen::Map to simplify vector code
- Remove dispmap.h/dispmap.cpp
2021-12-31 11:12:53 +01:00