yuanjiajia
3 years ago
3 changed files with 66 additions and 12 deletions
@ -0,0 +1,52 @@ |
|||
<?php |
|||
|
|||
namespace Blobt\Luxcore\scene; |
|||
|
|||
class RenderEngine extends BaseCfg |
|||
{ |
|||
|
|||
//打开或关闭
|
|||
const OPEN = 1; |
|||
const CLOSE = 0; |
|||
|
|||
/** |
|||
* @var string 使用何种渲染引擎 |
|||
*/ |
|||
private static $type = 'PATHOCL'; |
|||
|
|||
public function __construct() |
|||
{ |
|||
self::refreshConfig(); |
|||
} |
|||
|
|||
/** |
|||
* 更新字符串变量“$type” |
|||
*/ |
|||
public static function refreshConfig() |
|||
{ |
|||
|
|||
if( TrackerEngine::$Engine == 'PATH') |
|||
{ |
|||
self::$type = TrackerEngine::$Engine; |
|||
if( RenderDevices::$cpuSwitch == self::OPEN ) |
|||
{ |
|||
self::$type = self::$type.'CPU'; |
|||
} |
|||
else if ( RenderDevices::$gpuSwitch == self::OPEN ) |
|||
{ |
|||
self::$type = self::$type.'CPU'; |
|||
} |
|||
else; |
|||
} |
|||
else if( TrackerEngine::$Engine == 'BIDIR') |
|||
{ |
|||
self::$type = TrackerEngine::$Engine; |
|||
if( RenderDevices::$cpuSwitch == self::OPEN ) |
|||
{ |
|||
self::$type = self::$type.'CPU'; |
|||
} |
|||
} |
|||
|
|||
} |
|||
|
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue