88 void set_direct_3d(
d_3d_class* direct_3d) { direct_3d_ = direct_3d; };
126 virtual bool initialize(
int screen_width,
int screen_height, HWND hwdn,
bool is_vulkan);
187 void set_speed(
const float speed) { this->speed_ = speed; };
211 void set_w_folder(
const std::filesystem::path& w_folder) { w_folder_ = w_folder; };
271 std::vector<light_class*>
get_lights()
const {
return lights_; };
304 vsync_enabled_ = vsync;
307 Logger::Get().
Log(
"Setting Vsync to " + std::to_string(vsync), __FILE__, __LINE__);
355 float get_aspect_ratio()
const {
return static_cast<float>(screen_width_) /
static_cast<float>(screen_height_); };
450 std::map<std::string, std::shared_ptr<model_class>>&
get_model_cache() {
return g_model_cache; }
462 bool render(
float,
float,
float,
float,
float);
468 bool render_physics(
float delta_time);
476 bool update_mouse_strings(
int,
int,
bool);
487 bool update_render_count_string(
int);
494 bool render_scene_to_texture(
float);
500 bool render_refraction_to_texture();
506 bool render_reflection_to_texture();
519 bool render_pass(XMFLOAT4* diffuse, XMFLOAT4* position, XMFLOAT4* ambient, XMMATRIX view, XMMATRIX projection);
526 void update_skybox_position();
530 void culling_thread_function();
533 std::vector<ID3D11ShaderResourceView*> textures;
538 std::thread culling_thread_;
539 std::atomic<bool> culling_active_;
540 std::mutex objects_mutex_;
542 std::mutex terrain_mutex_;
543 std::vector<std::tuple<float, float, float, std::string, int>> terrain_generation_data_;
544 bool terrain_generation_ready_;
545 int next_terrain_object_id_;
552 IDXGISwapChain* swap_chain_;
553 model_class* model_,* ground_model_, * wall_model_, * bath_model_, * water_model_;
555 bool vsync_enabled_ =
true;
564 XMMATRIX base_view_matrix_;
568 int screen_width_, screen_height_;
575 ID3D11ShaderResourceView* shadow_map_srv_;
581 std::unique_ptr<ecs::EntityManager> entity_manager_;
583 object* selected_object_;
586 std::vector<object*> imported_object_;
588 std::vector<object*> skybox_;
595 std::vector<light_class*> lights_;
598 XMFLOAT3 true_light_position_;
609 bool enable_cel_shading_;
615 float water_height_, water_translation_;
617 std::filesystem::path w_folder_;
638 XMVECTOR previous_position_;
640 int physics_tick_rate_ = 50;
641 bool can_fixed_update_ =
false;
642 std::thread physics_thread_;
644 ID3D11Texture2D* back_buffer_texture_;
645 ID3D11ShaderResourceView* back_buffer_srv_;
655 float frustum_culling_tolerance_ = 5.f;
662 bool tab_was_pressed_;