本文整理汇总了C++中CGuestOSType::GetRecommended3DAcceleration方法的典型用法代码示例。如果您正苦于以下问题:C++ CGuestOSType::GetRecommended3DAcceleration方法的具体用法?C++ CGuestOSType::GetRecommended3DAcceleration怎么用?C++ CGuestOSType::GetRecommended3DAcceleration使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CGuestOSType
的用法示例。
在下文中一共展示了CGuestOSType::GetRecommended3DAcceleration方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: createVM
//.........这里部分代码省略.........
/* Set the recommended triple fault behavior: */
m_machine.SetCPUProperty(KCPUPropertyType_TripleFaultReset, type.GetRecommendedTFReset());
/* Set recommended firmware type: */
KFirmwareType fwType = type.GetRecommendedFirmware();
m_machine.SetFirmwareType(fwType);
/* Set recommended human interface device types: */
if (type.GetRecommendedUSBHID())
{
m_machine.SetKeyboardHIDType(KKeyboardHIDType_USBKeyboard);
m_machine.SetPointingHIDType(KPointingHIDType_USBMouse);
if (!fOhciEnabled && !usbDeviceFilters.isNull())
m_machine.AddUSBController("OHCI", KUSBControllerType_OHCI);
}
if (type.GetRecommendedUSBTablet())
{
m_machine.SetPointingHIDType(KPointingHIDType_USBTablet);
if (!fOhciEnabled && !usbDeviceFilters.isNull())
m_machine.AddUSBController("OHCI", KUSBControllerType_OHCI);
}
/* Set HPET flag: */
m_machine.SetHPETEnabled(type.GetRecommendedHPET());
/* Set UTC flags: */
m_machine.SetRTCUseUTC(type.GetRecommendedRTCUseUTC());
/* Set graphic bits: */
if (type.GetRecommended2DVideoAcceleration())
m_machine.SetAccelerate2DVideoEnabled(type.GetRecommended2DVideoAcceleration());
if (type.GetRecommended3DAcceleration())
m_machine.SetAccelerate3DEnabled(type.GetRecommended3DAcceleration());
/* Register the VM prior to attaching hard disks: */
vbox.RegisterMachine(m_machine);
if (!vbox.isOk())
{
msgCenter().cannotRegisterMachine(vbox, m_machine.GetName(), this);
return false;
}
/* Attach default devices: */
{
bool success = false;
QString strMachineId = m_machine.GetId();
CSession session = vboxGlobal().openSession(strMachineId);
if (!session.isNull())
{
CMachine machine = session.GetMachine();
QString strId = field("virtualDiskId").toString();
/* Boot virtual hard drive: */
if (!strId.isNull())
{
UIMedium vmedium = vboxGlobal().medium(strId);
CMedium medium = vmedium.medium(); // @todo r=dj can this be cached somewhere?
machine.AttachDevice(strHDName, 0, 0, KDeviceType_HardDisk, medium);
if (!machine.isOk())
msgCenter().cannotAttachDevice(machine, UIMediumType_HardDisk, field("virtualDiskLocation").toString(),
StorageSlot(ctrHDBus, 0, 0), this);
}
/* Attach empty optical drive: */