Skip to content

Commit 54d524a

Browse files
GL: fixed texture copying from default frame buffer
1 parent 24694c2 commit 54d524a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Graphics/GraphicsEngineOpenGL/src/TextureBaseGL.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2019-2024 Diligent Graphics LLC
2+
* Copyright 2019-2025 Diligent Graphics LLC
33
* Copyright 2015-2019 Egor Yusov
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -629,8 +629,8 @@ void TextureBaseGL::CopyData(DeviceContextGLImpl* pDeviceCtxGL,
629629
const bool IsDefaultBackBuffer = GetGLHandle() == 0;
630630
#if GL_ARB_copy_image
631631
// We can't use glCopyImageSubData with the proxy texture of a default framebuffer
632-
// because we don't have the texture handle. Resort to quad rendering in this case.
633-
if (glCopyImageSubData && !IsDefaultBackBuffer)
632+
// because we don't have the texture handle.
633+
if (glCopyImageSubData && !IsDefaultBackBuffer && pSrcTextureGL->GetGLHandle() != 0)
634634
{
635635
GLint SrcSliceY = (SrcTexDesc.Type == RESOURCE_DIM_TEX_1D_ARRAY) ? SrcSlice : 0;
636636
GLint SrcSliceZ = (SrcTexDesc.Type == RESOURCE_DIM_TEX_2D_ARRAY) ? SrcSlice : 0;

0 commit comments

Comments
 (0)