コード例 #1
0
ファイル: framebuffer.cpp プロジェクト: Loki7979/et-engine
void Framebuffer::buildColorAttachment()
{
	Texture::Pointer target = buildTexture(_description.size, _description.target, 
		_description.colorInternalformat, _description.colorFormat, _description.colorType);
	target->setWrap(_rc, TextureWrap::ClampToEdge, TextureWrap::ClampToEdge);
	addRenderTarget(target);
}
コード例 #2
0
ファイル: framebuffer.cpp プロジェクト: Loki7979/et-engine
void Framebuffer::buildDepthAttachment()
{
	Texture::Pointer target = buildTexture(_description.size, _description.target,
		_description.depthInternalformat, _description.depthFormat, _description.depthType);

	target->setWrap(_rc, TextureWrap::ClampToEdge, TextureWrap::ClampToEdge);

	setDepthTarget(target);
}
コード例 #3
0
ファイル: framebuffer.cpp プロジェクト: Loki7979/et-engine
void Framebuffer::addSameRendertarget()
{
	if (_description.colorIsRenderbuffer)
	{
		ET_ASSERT(!_colorRenderBuffers.empty());
		uint32_t newRenderTarget = buildColorRenderbuffer(0);
		_colorRenderBuffers.push_back(newRenderTarget);
		setColorRenderbuffer(newRenderTarget, 1);
	}
	else
	{
		ET_ASSERT(!_renderTargets.empty());
		
		const Texture::Pointer& basic = _renderTargets.front();
		
		Texture::Pointer target = buildTexture(vec3i(basic->size(), basic->description()->layersCount),
			basic->target(), basic->internalFormat(), basic->format(), basic->dataType());
		target->setName(name() + "_color_" + intToStr(_renderTargets.size() + 1));
		target->setWrap(_rc, TextureWrap::ClampToEdge, TextureWrap::ClampToEdge);
		addRenderTarget(target);
	}
}