You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1.1 KiB
36 lines
1.1 KiB
<?php
|
|
|
|
|
|
|
|
namespace Blobt\Luxcore\scene;
|
|
|
|
|
|
include dirname(dirname(__FILE__)) . "/vendor/autoload.php";
|
|
|
|
/**
|
|
* 配置CPU渲染参数。需要使用CPU设备渲染时,必须先设置渲染引擎类型为 PATHCPU
|
|
*/
|
|
|
|
|
|
/**
|
|
* 配置渲染引擎参数
|
|
*/
|
|
$renderengine = new render\RenderEngine(); //实例一个RenderEngine类对象
|
|
|
|
$renderengine->type = render\RenderEngine::TYPE_PATHCPU; //设置渲染引擎类型为 PATHCPU
|
|
|
|
echo $renderengine; //输出渲染引擎参数
|
|
|
|
|
|
|
|
/**
|
|
* 配置CPU渲染参数
|
|
*/
|
|
$device = new render\Native(); //实例一个Path类对象
|
|
|
|
$device->threadsCount = 32; //设置CPU参与渲染的线程数,如果设置的值大于实际的物理线程数,渲染引擎则使用实际的线程数参与渲染
|
|
//如果设置为0,渲染引擎则默认使用1个线程数参与渲染
|
|
|
|
echo $device; //输出GPU渲染参数
|
|
|
|
?>
|