本文整理汇总了C++中TexturePtr::Format方法的典型用法代码示例。如果您正苦于以下问题:C++ TexturePtr::Format方法的具体用法?C++ TexturePtr::Format怎么用?C++ TexturePtr::Format使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TexturePtr
的用法示例。
在下文中一共展示了TexturePtr::Format方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: InputPin
void TilingPostProcess::InputPin(uint32_t index, TexturePtr const & tex)
{
RenderFactory& rf = Context::Instance().RenderFactoryInstance();
downsample_tex_ = rf.MakeTexture2D(tex->Width(0) / 2, tex->Height(0) / 2,
4, 1, tex->Format(), 1, 0, EAH_GPU_Read | EAH_GPU_Write | EAH_Generate_Mips);
downsampler_->InputPin(index, tex);
downsampler_->OutputPin(index, downsample_tex_);
PostProcess::InputPin(index, downsample_tex_);
}
示例2: InputPin
void AsciiArtsPostProcess::InputPin(uint32_t index, TexturePtr const & tex)
{
RenderFactory& rf = Context::Instance().RenderFactoryInstance();
downsample_tex_ = rf.MakeTexture2D(tex->Width(0) / 2, tex->Height(0) / 2,
4, 1, tex->Format(), 1, 0, EAH_GPU_Read | EAH_GPU_Write | EAH_Generate_Mips);
downsampler_->InputPin(index, tex);
downsampler_->OutputPin(index, downsample_tex_);
PostProcess::InputPin(index, downsample_tex_);
*cell_per_row_line_ep_ = float2(static_cast<float>(CELL_WIDTH) / tex->Width(0), static_cast<float>(CELL_HEIGHT) / tex->Height(0));
}
示例3: InputPin
void SSSBlurPP::InputPin(uint32_t index, TexturePtr const & tex)
{
PostProcess::InputPin(index, tex);
if (0 == index)
{
RenderFactory& rf = Context::Instance().RenderFactoryInstance();
blur_x_tex_ = rf.MakeTexture2D(tex->Width(0), tex->Height(0), 1, 1, tex->Format(), 1, 0, EAH_GPU_Read | EAH_GPU_Write, NULL);
blur_y_tex_ = rf.MakeTexture2D(tex->Width(0), tex->Height(0), 1, 1, tex->Format(), 1, 0, EAH_GPU_Read | EAH_GPU_Write, NULL);
blur_x_fb_->Attach(FrameBuffer::ATT_Color0, rf.Make2DRenderView(*blur_x_tex_, 0, 1, 0));
blur_x_fb_->Attach(FrameBuffer::ATT_DepthStencil, frame_buffer_->Attached(FrameBuffer::ATT_DepthStencil));
blur_y_fb_->Attach(FrameBuffer::ATT_Color0, rf.Make2DRenderView(*blur_y_tex_, 0, 1, 0));
blur_y_fb_->Attach(FrameBuffer::ATT_DepthStencil, frame_buffer_->Attached(FrameBuffer::ATT_DepthStencil));
if (mrt_blend_support_)
{
frame_buffer_->Attach(FrameBuffer::ATT_Color1, rf.Make2DRenderView(*blur_y_tex_, 0, 1, 0));
}
}
}