Commit Graph

607 Commits (b4cf176ac3495a0435d123473a154dca5526086d)

Author SHA1 Message Date
Levin Li b4cf176ac3 Fix nebula/ssc sprite rendering on hidpi setting 2022-04-02 07:53:25 -07:00
Hleb Valoshka cbdd9de63f Draw glow before objects
Closes: #1339
2022-01-31 12:20:18 +03: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 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
Andrew Tribick 33116aad4a Backport C++20 numbers header 2021-12-31 17:25:39 +01:00
Andrew Tribick f15443bf63 Remove WIP HDR implementation 2021-12-29 14:48:36 +01:00
Andrew Tribick 86f2aab284 Remove glcontext.* 2021-12-29 14:48:36 +01:00
Andrew Tribick 1d77f75963 Remove celmath::clamp in favour of std::clamp 2021-12-29 12:32:16 +01:00
Hleb Valoshka 14af83a391 Implement Logger to replace raw cerr/cout and DPRINTF usage 2021-12-20 17:54:50 +03:00
Andrew Tribick 2793756f91 Components inherit visibility from first non-component ancestor
- Share visibility logic between Component and SurfaceFeature
- Avoid null dereference for Component/SurfaceFeature defined on stars
2021-12-04 22:48:46 +01:00
Andrew Tribick a670d8e3be Cleanup and fix celutil/util.h; rename to tzutil.h
- Replace deleteFunc with lambdas
- Remove unused printlineFunc, memsize
- string_view does not allow returning the TZ name, replace with std::string&
2021-12-04 11:44:36 +01:00
Andrew Tribick b79959979a Extract inner types from Material and Mesh
- Remove using namspace cmod
- Convert enums to enum classes
2021-12-04 09:49:52 +01:00
Levin Li 7c933c576d Correctly finish rendering point stars before drawing new ones 2021-11-16 21:13:15 +08:00
Andrew Tribick debcca3a1c Further celmath cleanup
- Tidy up includes and namespace handling
- Replace Ray with Eigen::ParametrizedLine
2021-11-14 19:42:39 +01:00
Andrew Tribick ec232b7fad Fix for debug builds
- Include fmt/ostream.h in debug.h to allow formatting filesystem paths
- Avoid including headers via debug.h on non-debug builds
2021-10-26 10:17:48 +03:00
Andrew Tribick f5f8d895db Match line length in row inversion with Image constructor 2021-07-31 16:35:25 +03:00
Hleb Valoshka b3d37663f3 Fix errors and warnings with VC++2019 2021-07-13 10:03:38 +03:00
Hleb Valoshka d4c8cc8149 Star classes T5-Y should not have glow around them 2021-06-16 15:38:44 +03:00
Hleb Valoshka bece12f6e4 Refactor Image class and image capture
* use GL_MESA_pack_invert to flip captured buffer
 * move enum PixelFormat to own file
 * use PixelFormat instead of GL formats in Image
 * provide captureImage() in CelestiaCore
 * use CelestiaCore methods to capture images in Qt UI
2021-06-16 14:15:32 +03:00
Levin Li b4858b1e72 Use shared_ptr around TextureFont 2021-05-24 08:37:01 +08:00
Levin Li e3297b7775 Namespacing Marker* and Rect 2021-05-23 11:03:07 +08:00
Hleb Valoshka dd9b91f459 Fix rendering of elliptical bodies' rings 2021-05-05 15:04:31 +03:00
Hleb Valoshka 173f2399ff Disable depth writing for objects rendered as points (Closes: #947) 2021-04-19 10:24:20 +03:00
Hleb Valoshka ad5f3d31b3 Change texture clamp mode for stars to Texture::EdgeClamp
For better compatibility with OpenGL ES
2021-04-05 13:33:32 +03:00
Hleb Valoshka f16c355d11 Add a new body parameter "reflectivity" complementing albedos 2021-03-10 17:51:10 +03:00
Levin Li b21a5fd404 Draw lines with lines when lineWidth < maxLineWidth 2021-01-03 17:21:55 +08:00
Levin Li 668fd219cc Render lines with triangles 2021-01-03 17:21:55 +08:00
Levin Li e2b9598f17 Always use gl_PointSize in shader to set point size 2020-12-04 19:46:32 +08:00
Levin Li 22590114d1 Set line width according to DPI 2020-12-03 15:14:39 +08:00
Levin Li 21cba1eaeb Fix orbit depth bug in rendering 2020-12-01 15:59:41 +08:00
Levin Li b465017de8 Support fisheye projection, dumb version 2020-11-20 23:52:23 +08:00
Levin Li b1d7797e54 Restore sun halo 2020-10-27 16:53:59 +08:00
Levin Li 1f150db611 separate modelview and projection 2020-10-06 13:39:09 +08:00
Levin Li 5f2484cf5a Fix depth test for rendering object 2020-09-29 17:32:35 +08:00
Hleb Valoshka 929390eec6 Use internal state management to check MSAA state 2020-08-05 09:58:26 +03:00
Hleb Valoshka 8768f3497a Refactor depth state changing 2020-08-05 09:58:26 +03:00
Hleb Valoshka c26f64a89e Remove unneeded texture unbinds 2020-08-05 09:58:26 +03:00
Hleb Valoshka 6e8dbde814 Remove unneeded glUseProgram(0) 2020-08-05 09:58:26 +03:00
Hleb Valoshka 41f6b95c72 Add state tracking for depth 2020-07-08 15:09:18 +03:00
Hleb Valoshka e2bbd838a5 Add state tracking for blending 2020-07-08 15:09:18 +03:00
Hleb Valoshka 0811e7c350 Remove make_shared and make_unique to keep single style 2020-07-07 08:15:18 +03:00
Levin Li 06c688ad40 Larger star on hidpi screens 2020-07-04 19:39:37 +08:00
Levin Li c8338ea91f Fix point sso rendering on macOS 2020-07-01 21:43:53 +08:00
Hleb Valoshka 9e956abe3d Remove support for legacy TXF fonts 2020-06-24 17:14:31 +03:00
Hleb Valoshka ce533c9cc1 Make planet to point transition less ugly 2020-06-22 21:25:44 +03:00
Hleb Valoshka 1c668d3d7f Fix warnings reported by clang/gcc 2020-06-20 10:11:09 +03:00
Hleb Valoshka c588f80824 OpenGL ES 2.0 initial support 2020-06-15 19:27:46 +03:00
Hleb Valoshka 4731334605 Small optimization 2020-06-01 10:36:42 +03:00
Hleb Valoshka e8f813ab38 Round label position to decreate jittering 2020-06-01 10:36:42 +03:00