Commit Graph

77 Commits (b79959979a94f812770427a4636086d13db23383)

Author SHA1 Message Date
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
Andrew Tribick 79234cda24 Remove inheritance from Material maps, Model destructor
- Reference texture maps by ResourceHandles in cmod Materials
- Add basic path manager for integration tests and tools
- Remove virtual destructor on Model class as nothing inherits from it
2021-11-25 19:11:06 +01:00
Hleb Valoshka 8cd7bd1036 Allow to use Lunar-Lambert and specular together 2021-09-21 16:27:09 +03:00
Levin Li 32baed9bcd Do not rely on clamp to border on ring textures 2021-06-28 22:21:13 +08:00
Levin Li 17cd02b3cc Add view port effect for post processing 2020-10-10 20:18:15 +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 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
Hleb Valoshka 1c668d3d7f Fix warnings reported by clang/gcc 2020-06-20 10:11:09 +03:00
Hleb Valoshka 4619ba1a1a Check angle between normal and a light when applying shadow
to avoid shadow projection on back side (if looking from the light)
2020-06-15 19:27:46 +03:00
Hleb Valoshka c588f80824 OpenGL ES 2.0 initial support 2020-06-15 19:27:46 +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 541e9d78b3 Use custom RenderContext to create shadow map 2020-05-01 23:31:25 +03:00
Hleb Valoshka 53fee32967 Make AtmosphereExtinctionThreshold float constexpr 2020-04-24 09:54:19 +03:00
Hleb Valoshka b17d70bcb4 Use glVertexPointer instead of glVertexAttribPointer(0) 2020-04-10 12:22:28 +03:00
Hleb Valoshka 3599f14e12 Restore support for BlendTexture property
Closes: #602
2020-04-06 20:30:46 +03:00
Hleb Valoshka 96feeceae4 Add RingRenderData to hide implementation specific data 2020-04-05 13:21:50 +03:00
Hleb Valoshka e5d54df6bb Initial implementation of self shadowing
Known bugs and limitations:
  * Only the 1st light source casts shadows.
  * Thin objects have incorrect shadows, see ISS.
2020-04-03 11:31:09 +03:00
Hleb Valoshka 377d620d5b Extract FramebufferObject to its own file 2020-03-04 19:52:55 +03:00
Hleb Valoshka 32eaa68d0a Remove fixed pipeline calls 2019-12-05 11:37:33 +03:00
Hleb Valoshka e363e9102f Remove fixed pipeline calls in glsl-based code 2019-11-11 13:48:37 +03:00
Hleb Valoshka 0af14d4ca8 Add LOD for planet rings 2019-11-01 12:12:04 +03:00
Hleb Valoshka deb23a7b80 Add a ::Color -> cmod::Material::Color helper 2019-08-16 09:49:01 +03:00
Hleb Valoshka 2b275cee37 Fix two MSVC C4305 warnings
double to float truncation
2019-05-20 10:48:04 +03:00
Hleb Valoshka f3a73dae71 Move math code into celmath namespace 2019-05-20 10:48:04 +03:00
Hleb Valoshka 920a0c81b1 Remove unused and unneeded ringSystemSections option 2019-04-22 21:21:05 +03:00
Hleb Valoshka a426916e2a Get rid of immediate mode in ring rendering
nSections was hardcoded to 100 so I removed it from renderRingSystem
2019-04-22 21:21:05 +03:00
Hleb Valoshka c80a1520ac Use config.h on all platforms 2019-02-09 00:21:00 +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 60c42c2588 Add new Renderer flags
* ShowDwarfPlanets
 * ShowMoons
 * ShowMinorMoons
 * ShowAsteroids
 * ShowComets
 * ShowSpacecrafts
 * ShowFadingOrbits (not used yet)
2018-11-16 21:25:16 +01:00
Hleb Valoshka 6653929310 Remove ARB programs support completely 2018-10-23 00:03:39 +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 524cbd518f Replace some constants absent in GL ES 2018-10-07 21:27:33 +03:00
Hleb Valoshka 73a869c137 Use core OpenGL2 functions instead of their ARB versions 2018-10-07 20:45:01 +03:00
Hleb Valoshka c45e85fbfa Remove dead rendering code 2018-10-07 20:42:06 +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 f34c7568c4 fix (some) compiler warnings
# Conflicts:
#	src/celengine/observer.cpp
2018-09-22 23:41:57 +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
Andrew Tribick 207823b1d8 Patch to fix valgrind errors and gcc warnings from Daniel K.O.
Use #ifdef FOO instead of #if FOO
Unused function parameter names
Uninitialised member in FrameTree
Memory read after deallocation in ReferenceFrame
Unmatched new[]/delete[] in StarDatabase
Uninitialised temperature in StarDatabase
Uninitialised member of RenderListEntry: isOpaque
Fix for convoluted code in renderer
2012-04-26 19:50:22 +00:00
Chris Laurel 52b1dccdff Fixed eclipse shadows on non-spherical planets (especially noticeable on
Saturn.) Fix affects the GLSL/OpenGL 2.0 render path only.
2010-04-23 22:14:44 +00:00
Chris Laurel 31a31d4e2f - Moved cmod code into a separate module celmodel.
- Updated cmodtools to use celmodel.
- Improved 3ds file loader to support multiple materials per mesh.
2010-02-05 20:05:18 +00:00
Chris Laurel fe102d24fc Removed unused code from renderglsl.cpp 2009-11-10 02:13:43 +00: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
Chris Laurel f5d97be5c9 More GLEW-related cleanup.
- Added missing GLEW_STATIC define to VC++ project file
- Fixed Qt4 build to use GLEW
- Stripped out more references to old glext functions
- Fixed miscellaneous compiler warnings.
2009-08-15 00:48:42 +00:00
Chris Laurel 9d373fd041 Switched from using custom GL extension handling code to GLEW library. 2009-08-14 22:39:54 +00:00