Changeset View
Changeset View
Standalone View
Standalone View
source/gameengine/Ketsji/KX_KetsjiEngine.cpp
| Show First 20 Lines • Show All 74 Lines • ▼ Show 20 Lines | |||||
| #include "KX_TimeCategoryLogger.h" | #include "KX_TimeCategoryLogger.h" | ||||
| #include "RAS_FramingManager.h" | #include "RAS_FramingManager.h" | ||||
| #include "DNA_world_types.h" | #include "DNA_world_types.h" | ||||
| #include "DNA_scene_types.h" | #include "DNA_scene_types.h" | ||||
| #include "KX_NavMeshObject.h" | #include "KX_NavMeshObject.h" | ||||
| #include "GPU_material.h" | |||||
| #define DEFAULT_LOGIC_TIC_RATE 60.0 | #define DEFAULT_LOGIC_TIC_RATE 60.0 | ||||
| //#define DEFAULT_PHYSICS_TIC_RATE 60.0 | //#define DEFAULT_PHYSICS_TIC_RATE 60.0 | ||||
| #ifdef FREE_WINDOWS /* XXX mingw64 (gcc 4.7.0) defines a macro for DrawText that translates to DrawTextA. Not good */ | #ifdef FREE_WINDOWS /* XXX mingw64 (gcc 4.7.0) defines a macro for DrawText that translates to DrawTextA. Not good */ | ||||
| #ifdef DrawText | #ifdef DrawText | ||||
| #undef DrawText | #undef DrawText | ||||
| #endif | #endif | ||||
| #endif | #endif | ||||
| ▲ Show 20 Lines • Show All 879 Lines • ▼ Show 20 Lines | if (wi->hasWorld()) | ||||
| if (m_rasterizer->GetDrawingMode() == RAS_IRasterizer::KX_TEXTURED) | if (m_rasterizer->GetDrawingMode() == RAS_IRasterizer::KX_TEXTURED) | ||||
| { | { | ||||
| m_rasterizer->SetBackColor( | m_rasterizer->SetBackColor( | ||||
| wi->getBackColorRed(), | wi->getBackColorRed(), | ||||
| wi->getBackColorGreen(), | wi->getBackColorGreen(), | ||||
| wi->getBackColorBlue(), | wi->getBackColorBlue(), | ||||
| 0.0 | 0.0 | ||||
| ); | ); | ||||
| float horicolor[] = {wi->getBackColorRed(), wi->getBackColorGreen(), wi->getBackColorBlue()}; | |||||
| GPU_horizon_update_color(horicolor); | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| void KX_KetsjiEngine::SetWorldSettings(KX_WorldInfo* wi) | void KX_KetsjiEngine::SetWorldSettings(KX_WorldInfo* wi) | ||||
| { | { | ||||
| if (wi->hasWorld()) | if (wi->hasWorld()) | ||||
| { | { | ||||
| if (m_rasterizer->GetDrawingMode() >= RAS_IRasterizer::KX_SOLID) | if (m_rasterizer->GetDrawingMode() >= RAS_IRasterizer::KX_SOLID) | ||||
| { | { | ||||
| m_rasterizer->SetAmbientColor( | m_rasterizer->SetAmbientColor( | ||||
| wi->getAmbientColorRed(), | wi->getAmbientColorRed(), | ||||
| wi->getAmbientColorGreen(), | wi->getAmbientColorGreen(), | ||||
| wi->getAmbientColorBlue() | wi->getAmbientColorBlue() | ||||
| ); | ); | ||||
| float ambcolor[] = {wi->getAmbientColorRed(), wi->getAmbientColorGreen(), wi->getAmbientColorBlue()}; | |||||
| GPU_ambient_update_color(ambcolor); | |||||
| if (wi->hasMist()) | if (wi->hasMist()) | ||||
| { | { | ||||
| m_rasterizer->SetFog( | m_rasterizer->SetFog( | ||||
| wi->getMistType(), | wi->getMistType(), | ||||
| wi->getMistStart(), | wi->getMistStart(), | ||||
| wi->getMistDistance(), | wi->getMistDistance(), | ||||
| wi->getMistIntensity(), | wi->getMistIntensity(), | ||||
| wi->getMistColorRed(), | wi->getMistColorRed(), | ||||
| wi->getMistColorGreen(), | wi->getMistColorGreen(), | ||||
| wi->getMistColorBlue() | wi->getMistColorBlue() | ||||
| ); | ); | ||||
| float mistcolor[] = {wi->getMistColorRed(), wi->getMistColorGreen(), wi->getMistColorBlue()}; | |||||
| GPU_mist_update_values( | |||||
| wi->getMistType(), | |||||
| wi->getMistStart(), | |||||
| wi->getMistDistance(), | |||||
| wi->getMistIntensity(), | |||||
| mistcolor | |||||
| ); | |||||
| m_rasterizer->EnableFog(true); | m_rasterizer->EnableFog(true); | ||||
| GPU_mist_update_enable(true); | |||||
| } | } | ||||
| else { | else { | ||||
| m_rasterizer->EnableFog(false); | m_rasterizer->EnableFog(false); | ||||
| GPU_mist_update_enable(false); | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| void KX_KetsjiEngine::EnableCameraOverride(const STR_String& forscene) | void KX_KetsjiEngine::EnableCameraOverride(const STR_String& forscene) | ||||
| ▲ Show 20 Lines • Show All 1,002 Lines • Show Last 20 Lines | |||||