mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-31 18:31:04 +00:00
Avoid cloud jump when switching between mainmenu and loading screen (#15163)
... by using the same Clouds object for both. The mainmenu clouds already used shaders before. I had to choose between both or neither, so now both the mainmenu clouds and the loading screen clouds use shaders if available.
This commit is contained in:
parent
4aec4fbe6f
commit
47f199e6cb
5 changed files with 12 additions and 52 deletions
|
@ -203,8 +203,6 @@ private:
|
|||
MainMenuData *m_data = nullptr;
|
||||
/** texture source */
|
||||
std::unique_ptr<ISimpleTextureSource> m_texture_source;
|
||||
/** shader source */
|
||||
std::unique_ptr<IWritableShaderSource> m_shader_source;
|
||||
/** sound manager */
|
||||
std::unique_ptr<ISoundManager> m_sound_manager;
|
||||
|
||||
|
@ -279,23 +277,11 @@ private:
|
|||
/** and text that is in it */
|
||||
EnrichedString m_toplefttext;
|
||||
|
||||
/** initialize cloud subsystem */
|
||||
void cloudInit();
|
||||
/** do preprocessing for cloud subsystem */
|
||||
void drawClouds(float dtime);
|
||||
|
||||
/** internam data required for drawing clouds */
|
||||
struct clouddata {
|
||||
/** pointer to cloud class */
|
||||
irr_ptr<Clouds> clouds;
|
||||
/** camera required for drawing clouds */
|
||||
scene::ICameraSceneNode *camera = nullptr;
|
||||
};
|
||||
|
||||
/** is drawing of clouds enabled atm */
|
||||
bool m_clouds_enabled = true;
|
||||
/** data used to draw clouds */
|
||||
clouddata m_cloud;
|
||||
bool m_clouds_enabled = true;
|
||||
|
||||
static void fullscreenChangedCallback(const std::string &name, void *data);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue