当前位置: 首页>>代码示例>>C++>>正文


C++ CommandBufferPtr::get方法代码示例

本文整理汇总了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);
}
开发者ID:zhouxh1023,项目名称:anki-3d-engine,代码行数:34,代码来源:TexturePtr.cpp

示例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();
}
开发者ID:zhouxh1023,项目名称:anki-3d-engine,代码行数:13,代码来源:FramebufferPtr.cpp

示例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);
}
开发者ID:zhouxh1023,项目名称:anki-3d-engine,代码行数:11,代码来源:FramebufferPtr.cpp

示例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);
}
开发者ID:zhouxh1023,项目名称:anki-3d-engine,代码行数:22,代码来源:CommandBufferPtr.cpp

示例5: generateMipmaps

//==============================================================================
void TexturePtr::generateMipmaps(CommandBufferPtr& commands)
{
	ANKI_ASSERT(isCreated());
	commands.get().pushBackNewCommand<GenMipmapsCommand>(*this);
}
开发者ID:zhouxh1023,项目名称:anki-3d-engine,代码行数:6,代码来源:TexturePtr.cpp

示例6: bind

//==============================================================================
void TexturePtr::bind(CommandBufferPtr& commands, U32 unit)
{
	ANKI_ASSERT(isCreated());
	commands.get().pushBackNewCommand<BindTextureCommand>(*this, unit);
}
开发者ID:zhouxh1023,项目名称:anki-3d-engine,代码行数:6,代码来源:TexturePtr.cpp

示例7: bind

//==============================================================================
void FramebufferPtr::bind(CommandBufferPtr& cmdb)
{
	cmdb.get().pushBackNewCommand<BindFramebufferCommand>(*this);
}
开发者ID:zhouxh1023,项目名称:anki-3d-engine,代码行数:5,代码来源:FramebufferPtr.cpp

示例8: operator

		Error operator()(CommandBufferImpl*)
		{
			return m_commands.get().executeAllCommands();
		}
开发者ID:zhouxh1023,项目名称:anki-3d-engine,代码行数:4,代码来源:CommandBufferPtr.cpp


注:本文中的CommandBufferPtr::get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。