Changeset View
Changeset View
Standalone View
Standalone View
source/renderer/backend/gl/Framebuffer.cpp
Show First 20 Lines • Show All 51 Lines • ▼ Show 20 Lines | std::unique_ptr<CFramebuffer> CFramebuffer::Create( | ||||
{ | { | ||||
LOGERROR("Failed to create CFramebuffer object"); | LOGERROR("Failed to create CFramebuffer object"); | ||||
return nullptr; | return nullptr; | ||||
} | } | ||||
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, framebuffer->m_Handle); | glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, framebuffer->m_Handle); | ||||
if (colorAttachment) | if (colorAttachment) | ||||
{ | { | ||||
ENSURE(device->IsFramebufferFormatSupported(colorAttachment->GetFormat())); | |||||
Stan: Add a comment why maybe? | |||||
Done Inline ActionsMakes sense. vladislavbelov: Makes sense. | |||||
framebuffer->m_AttachmentMask |= GL_COLOR_BUFFER_BIT; | framebuffer->m_AttachmentMask |= GL_COLOR_BUFFER_BIT; | ||||
#if CONFIG2_GLES | #if CONFIG2_GLES | ||||
ENSURE(colorAttachment->GetType() == CTexture::Type::TEXTURE_2D); | ENSURE(colorAttachment->GetType() == CTexture::Type::TEXTURE_2D); | ||||
const GLenum textureTarget = GL_TEXTURE_2D; | const GLenum textureTarget = GL_TEXTURE_2D; | ||||
#else | #else | ||||
const GLenum textureTarget = colorAttachment->GetType() == CTexture::Type::TEXTURE_2D_MULTISAMPLE ? | const GLenum textureTarget = colorAttachment->GetType() == CTexture::Type::TEXTURE_2D_MULTISAMPLE ? | ||||
GL_TEXTURE_2D_MULTISAMPLE : GL_TEXTURE_2D; | GL_TEXTURE_2D_MULTISAMPLE : GL_TEXTURE_2D; | ||||
▲ Show 20 Lines • Show All 112 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
Add a comment why maybe?