本文整理汇总了C++中VideoPtr::CreateRenderTarget方法的典型用法代码示例。如果您正苦于以下问题:C++ VideoPtr::CreateRenderTarget方法的具体用法?C++ VideoPtr::CreateRenderTarget怎么用?C++ VideoPtr::CreateRenderTarget使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VideoPtr
的用法示例。
在下文中一共展示了VideoPtr::CreateRenderTarget方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Start
void MedievalTorch::Start(VideoPtr video, InputPtr input, AudioPtr audio)
{
this->video = video;
this->input = input;
this->audio = audio;
m_props.ambient = Vector3(1,1,1);
Platform::FileManagerPtr fileManager = video->GetFileManager();
m_provider = ETHResourceProviderPtr(new ETHResourceProvider(
ETHGraphicResourceManagerPtr(new ETHGraphicResourceManager()),
ETHAudioResourceManagerPtr(new ETHAudioResourceManager()),
boost::shared_ptr<ETHShaderManager>(new ETHShaderManager(video, GS_L("assets/data/"))),
GS_L("assets/"), video, audio, input));
const Vector2 screenSize = video->GetScreenSizeF();
const float TARGET_WIDTH = 480/4;
const float TARGET_HEIGHT = 854/4;
if (pTorch)
pTorch->Release();
pTorch = new ETHRenderEntity(GS_L("assets/entities/medieval_torch.ent"), m_provider);
pTorch->SetOrphanPositionXY(Vector2(TARGET_WIDTH / 2.0f, TARGET_HEIGHT - (TARGET_HEIGHT / 10.0f)));
pTorch->ScaleParticleSystem(0, 1.6f);
pTorch->ScaleParticleSystem(0, screenSize.x / 480.0f / 4);
renderTarget = video->CreateRenderTarget(static_cast<unsigned int>(TARGET_WIDTH), static_cast<unsigned int>(TARGET_HEIGHT), GSTF_DEFAULT);
}