Commit Graph

80 Commits (d7b896c013e222f96d29baa399cd3eda24fd91fb)

Author SHA1 Message Date
Andrew Tribick d7b896c013 Remove pre-C++17 Eigen alignment code 2021-12-28 21:14:29 +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 5e141eef21 Refactor random number and Perlin noise 2021-11-14 19:42:39 +01: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
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
Hleb Valoshka 77af6f7419 Refactor images related code
* move different formats support to its own directory
 * add common CaptureBufferToFile subroutine
2021-04-06 10:23:53 +03:00
Levin Li bce3dd0b9d Use new[] for GalaxyVertices 2021-03-14 20:40:59 +08:00
Levin Li 160d1b95cd Fix galaxy flickering on zooming in 2020-12-29 15:16:29 +08:00
Levin Li 0a891c4a11 More eigen fixes 2020-11-17 21:10:01 +08:00
Levin Li 8129589490 Fix potential crash in galaxy rendering 2020-10-23 16:05:20 +08:00
Levin Li 536c064160 Fix crash in DDS and galaxy picking 2020-10-11 16:53:12 +08:00
Levin Li 1f150db611 separate modelview and projection 2020-10-06 13:39:09 +08:00
Hleb Valoshka 6e8dbde814 Remove unneeded glUseProgram(0) 2020-08-05 09:58:26 +03:00
Hleb Valoshka e2bbd838a5 Add state tracking for blending 2020-07-08 15:09:18 +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 c40b186eba Increase galaxy memory chunk to decrease number of draw calls
Total number of draw call goes down from ~7k to ~2k on initial scene
2020-05-22 09:58:42 +03:00
Hleb Valoshka 1fb1f2de91 Replace fixed function GL code with GL ES compatible one 2020-05-12 15:59:56 +03:00
Hleb Valoshka fb4bede3d1 Allow building without NLS 2020-02-15 00:20:13 +03:00
Hleb Valoshka e4e1a0ddc5 Remove deprecated C++ features
std::unary_function & std::binary_function were deprecated in C++11
and removed in C++17
2019-11-30 22:45:25 +03:00
Hleb Valoshka 39eb715f98 Reimplement galaxies using shaders 2019-11-25 10:50:46 +03:00
Li Linfeng 9c371c891c define macros for print levels and avoid direct use of fmt::printf 2019-08-31 13:32:44 +08:00
Hleb Valoshka b6b543438d Port to filesystem API 2019-08-16 18:11:24 +03:00
Hleb Valoshka de1a8d181e Remove unneeded celengine/celestia.h 2019-07-09 23:38:41 +03:00
Hleb Valoshka a10da37741 Return correct type from DeepSkyObject::getRenderMask()
More correctly is to return Renderer::RenderFlags, but this require big
render.h refactoring.
2019-07-07 12:10:21 +03:00
Hleb Valoshka f3a73dae71 Move math code into celmath namespace 2019-05-20 10:48:04 +03:00
Hleb Valoshka 81aa6f43bc Remove support for old vector math 2019-03-16 18:21:50 +03:00
Hleb Valoshka ea3988b6f3 Remove unused GLContext 2018-12-11 20:32:13 +03:00
Hleb Valoshka dbd7090117 Make ShaderManager private property of Renderer 2018-12-11 20:32:13 +03:00
Hleb Valoshka 363abc40f3 Use libfmt instead of C-style & iostream workflow
TODO: check StarDatabase::getStarName
2018-10-17 22:19:03 +03:00
Hleb Valoshka 85829063e0 Finish eigenization 2018-10-07 13:38:24 +03:00
Hleb Valoshka 4bdfe271e5 Remove C++14-isms
Some day this commit will be reverted.
2018-09-22 23:42:03 +03:00
Hleb Valoshka b082d5f47f Automatically convert to c++11 using clan-tidy
+ manual cleanups
2018-09-22 23:42:02 +03:00
Hleb Valoshka 5a5b06481f Fix the most serious fixes found by coverity
… resource leaks, null pointers dereference
2018-09-22 23:41:58 +03:00
Hleb Valoshka 882e4ecf28 fix whitespaces and indents
trailing spaces are removed
tabs are replaced with 4 spaces

# Conflicts:
#	src/celengine/cmdparser.cpp
#	src/celengine/command.cpp
#	src/celestia/celestiacore.cpp
#	src/celestia/celestiacore.h
#	src/celestia/qt/qtappwin.cpp
#	src/celestia/qt/qtglwidget.cpp
#	src/celestia/win32/winmain.cpp
2018-09-22 23:41:57 +03:00
Dmitry Brant a25d26720c Adapt code to Eigen 3.3
No functional changes, just adapting to API changes in Eigen.
2018-09-22 17:08:07 +03:00
Chris Laurel dcf9232c08 Refactored some shadowing/eclipse code in the renderer
- Enabled ring shadows on moons and other objects that aren't themselves surrounded by
  ring systems.
- Use texture LOD bias to add blurriness to ring shadows (a result of the finite
  size of the light source.)
- Calculate ring phase function per-pixel instead of per-vertex
- Implemented more realistic rendering of unlit side of ring systems
- Used new Eigen's NewStdVector for vectors containing fixed-sized vectorizable
  objects.
2009-10-27 22:02:01 +00:00
cartrite 42281e4a53 Replaced lines that refered to celengine/gl.h with GL/glew.h
Added code for glewinit so all render modes work in kde
updated makefile includes path to use GL/glew.h
Removed glext from kde and gtk builds
Removed celengine/gl.h from celestia.pro
2009-08-15 17:51:15 +00:00
Chris Laurel e36646501b Eigenized more DSO code. 2009-07-25 00:28:19 +00:00
Chris Laurel c26ea667f2 Eigenized old sphere mesh code (used only for handling .cms mesh files now.) 2009-07-23 23:19:26 +00:00
Chris Laurel 9cca6b8c27 Eigenized Observer and Simulation classes. Fixed star picking bug. 2009-07-22 04:53:15 +00:00
Chris Laurel 5a31a08df9 Eigenized galaxy rendering and more of the core renderer. 2009-07-21 03:14:29 +00:00
Chris Laurel 7272945657 First round of Eigen-izing the core Celestia code. 2009-07-15 03:06:30 +00:00
Fridger Schrempp 222ee6b1a5 major upgrade of globular cluster code 2009-02-03 20:21:36 +00:00
Chris Laurel de41ec3813 Fixes to make Celestia build with gcc4.3 2008-11-16 10:19:38 +00:00
Chris Laurel 93acae93e1 Implemented the visible flag for deep sky objects. The visible attribute may
be set either in the dsc object definition or in a celx script.
2008-08-07 05:35:29 +00:00
Chris Laurel 646d427802 Eliminated min and max macros in celutil/util.h. The STL functions should be
used instead. Fixed several locations in the code where int/unsigned int
type differences in calls to min/max were confusing the compiler.
2008-05-23 18:47:18 +00:00
Da Woon Jung e59f4b4b54 HDR bloom, adaptive exposure, calibrated nightlights - disabled by default, enable with USE_HDR and HDR_COMPRESS. 4 new vertex programs added. 2008-03-25 00:23:16 +00:00
Da Woon Jung ff96b03890 Fixed memory leaks 2007-12-12 17:55:09 +00:00