mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 02:22:17 +00:00
1st installment of tech ENABLE_ENVIRONMENT_MAP
This commit is contained in:
@@ -1583,6 +1583,9 @@ struct Plater::priv
|
||||
Sidebar *sidebar;
|
||||
Bed3D bed;
|
||||
Camera camera;
|
||||
#if ENABLE_ENVIRONMENT_MAP
|
||||
GLTexture environment_texture;
|
||||
#endif // ENABLE_ENVIRONMENT_MAP
|
||||
Mouse3DController mouse3d_controller;
|
||||
View3D* view3D;
|
||||
GLToolbar view_toolbar;
|
||||
@@ -2078,7 +2081,6 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame)
|
||||
});
|
||||
wxGetApp().other_instance_message_handler()->init(this->q);
|
||||
|
||||
|
||||
// collapse sidebar according to saved value
|
||||
bool is_collapsed = wxGetApp().app_config->get("collapsed_sidebar") == "1";
|
||||
sidebar->collapse(is_collapsed);
|
||||
@@ -5531,6 +5533,19 @@ Camera& Plater::get_camera()
|
||||
return p->camera;
|
||||
}
|
||||
|
||||
#if ENABLE_ENVIRONMENT_MAP
|
||||
void Plater::init_environment_texture()
|
||||
{
|
||||
if (p->environment_texture.get_id() == 0)
|
||||
p->environment_texture.load_from_file(resources_dir() + "/icons/Pmetal_001.png", false, GLTexture::SingleThreaded, false);
|
||||
}
|
||||
|
||||
unsigned int Plater::get_environment_texture_id() const
|
||||
{
|
||||
return p->environment_texture.get_id();
|
||||
}
|
||||
#endif // ENABLE_ENVIRONMENT_MAP
|
||||
|
||||
const Bed3D& Plater::get_bed() const
|
||||
{
|
||||
return p->bed;
|
||||
|
||||
Reference in New Issue
Block a user