本文整理汇总了C++中CommandBufferPtr::get方法的典型用法代码示例。如果您正苦于以下问题:C++ CommandBufferPtr::get方法的具体用法?C++ CommandBufferPtr::get怎么用?C++ CommandBufferPtr::get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CommandBufferPtr
的用法示例。
在下文中一共展示了CommandBufferPtr::get方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: create
//==============================================================================
void TexturePtr::create(
CommandBufferPtr& commands, const Initializer& initS)
{
ANKI_ASSERT(!isCreated());
Initializer init(initS);
// Copy data to temp buffers
if(init.m_copyDataBeforeReturn)
{
for(U layer = 0; layer < MAX_TEXTURE_LAYERS; ++layer)
{
for(U level = 0; level < MAX_MIPMAPS; ++level)
{
SurfaceData& surf = init.m_data[level][layer];
if(surf.m_ptr)
{
void* newData = commands.get().getInternalAllocator().
allocate(surf.m_size);
memcpy(newData, surf.m_ptr, surf.m_size);
surf.m_ptr = newData;
}
}
}
}
Base::create(commands.get().getManager());
get().setStateAtomically(GlObject::State::TO_BE_CREATED);
// Fire the command
commands.get().pushBackNewCommand<CreateTextureCommand>(
*this, init, init.m_copyDataBeforeReturn);
}
示例2: create
//==============================================================================
void FramebufferPtr::create(GrManager* manager, Initializer& init)
{
CommandBufferPtr cmdb;
cmdb.create(manager);
Base::create(cmdb.get().getManager());
get().setStateAtomically(GlObject::State::TO_BE_CREATED);
cmdb.get().pushBackNewCommand<CreateFramebufferCommand>(*this, init);
cmdb.flush();
}
示例3: blit
//==============================================================================
void FramebufferPtr::blit(CommandBufferPtr& cmdb,
const FramebufferPtr& b,
const Array<U32, 4>& sourceRect,
const Array<U32, 4>& destRect,
GLbitfield attachmentMask,
Bool linear)
{
cmdb.get().pushBackNewCommand<BlitFramebufferCommand>(
*this, b, sourceRect, destRect, attachmentMask, linear);
}
示例4: pushBackOtherCommandBuffer
//==============================================================================
void CommandBufferPtr::pushBackOtherCommandBuffer(
CommandBufferPtr& commands)
{
class Command: public GlCommand
{
public:
CommandBufferPtr m_commands;
Command(CommandBufferPtr& commands)
: m_commands(commands)
{}
Error operator()(CommandBufferImpl*)
{
return m_commands.get().executeAllCommands();
}
};
commands.get().makeImmutable();
get().pushBackNewCommand<Command>(commands);
}
示例5: generateMipmaps
//==============================================================================
void TexturePtr::generateMipmaps(CommandBufferPtr& commands)
{
ANKI_ASSERT(isCreated());
commands.get().pushBackNewCommand<GenMipmapsCommand>(*this);
}
示例6: bind
//==============================================================================
void TexturePtr::bind(CommandBufferPtr& commands, U32 unit)
{
ANKI_ASSERT(isCreated());
commands.get().pushBackNewCommand<BindTextureCommand>(*this, unit);
}
示例7: bind
//==============================================================================
void FramebufferPtr::bind(CommandBufferPtr& cmdb)
{
cmdb.get().pushBackNewCommand<BindFramebufferCommand>(*this);
}
示例8: operator
Error operator()(CommandBufferImpl*)
{
return m_commands.get().executeAllCommands();
}