Explorar o código

Bugfix: Support uploads of 2D array textures in GLRenderAPI

Florian Will %!s(int64=8) %!d(string=hai) anos
pai
achega
aa58cde7bd
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      Source/BansheeGLRenderAPI/BsGLPixelBuffer.cpp

+ 3 - 2
Source/BansheeGLRenderAPI/BsGLPixelBuffer.cpp

@@ -312,9 +312,10 @@ namespace bs { namespace ct
 						data.getData());
 					BS_CHECK_GL_ERROR();
 					break;
+				case GL_TEXTURE_2D_ARRAY:
 				case GL_TEXTURE_3D:
 					glTexSubImage3D(
-						GL_TEXTURE_3D, mLevel, 
+						mTarget, mLevel,
 						dest.left, dest.top, dest.front,
 						dest.getWidth(), dest.getHeight(), dest.getDepth(),
 						GLPixelUtil::getGLOriginFormat(data.getFormat()), GLPixelUtil::getGLOriginDataType(data.getFormat()),
@@ -557,4 +558,4 @@ namespace bs { namespace ct
 		}		
 #endif
 	}
-}}
+}}