GLenum FramebufferD3D::getImplementationColorReadType() const { const gl::FramebufferAttachment *readAttachment = mData.getReadAttachment(); if (readAttachment == nullptr) { return GL_NONE; } RenderTargetD3D *attachmentRenderTarget = NULL; gl::Error error = GetAttachmentRenderTarget(readAttachment, &attachmentRenderTarget); if (error.isError()) { return GL_NONE; } GLenum implementationFormat = getRenderTargetImplementationFormat(attachmentRenderTarget); const gl::InternalFormat &implementationFormatInfo = gl::GetInternalFormatInfo(implementationFormat); return implementationFormatInfo.type; }
GLenum FramebufferD3D::getImplementationColorReadType(const gl::Context *context) const { const gl::FramebufferAttachment *readAttachment = mState.getReadAttachment(); if (readAttachment == nullptr) { return GL_NONE; } RenderTargetD3D *attachmentRenderTarget = nullptr; angle::Result error = readAttachment->getRenderTarget(context, &attachmentRenderTarget); if (error != angle::Result::Continue) { return GL_NONE; } GLenum implementationFormat = getRenderTargetImplementationFormat(attachmentRenderTarget); const gl::InternalFormat &implementationFormatInfo = gl::GetSizedInternalFormatInfo(implementationFormat); return implementationFormatInfo.getReadPixelsType(context->getClientVersion()); }
GLenum FramebufferD3D::getImplementationColorReadFormat(const gl::Context *context) const { const gl::FramebufferAttachment *readAttachment = mState.getReadAttachment(); if (readAttachment == nullptr) { return GL_NONE; } RenderTargetD3D *attachmentRenderTarget = nullptr; gl::Error error = readAttachment->getRenderTarget(context, &attachmentRenderTarget); if (error.isError()) { return GL_NONE; } GLenum implementationFormat = getRenderTargetImplementationFormat(attachmentRenderTarget); const gl::InternalFormat &implementationFormatInfo = gl::GetSizedInternalFormatInfo(implementationFormat); return implementationFormatInfo.getReadPixelsFormat(); }