From befe081683ca0f3a7718a634acfe46a459f5467d Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Mon, 3 Jul 2017 01:29:03 +0200 Subject: [PATCH] - Upload custom texture --- src/gl/renderer/gl_postprocess.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gl/renderer/gl_postprocess.cpp b/src/gl/renderer/gl_postprocess.cpp index 5fb40b2aff..2a5c1b829e 100644 --- a/src/gl/renderer/gl_postprocess.cpp +++ b/src/gl/renderer/gl_postprocess.cpp @@ -198,7 +198,10 @@ void FGLRenderer::RunCustomPostProcessShaders(FString target) shader.Instance->CustomTexture.Init(shader.Instance->Program, "CustomTexture"); if (shader.Texture) + { shader.Instance->HWTexture = new FHardwareTexture(shader.Texture->GetWidth(), shader.Texture->GetHeight(), false); + shader.Instance->HWTexture->CreateTexture((unsigned char*)shader.Texture->GetPixelsBgra(), shader.Texture->GetWidth(), shader.Texture->GetHeight(), 0, false, 0, "CustomTexture"); + } } FGLDebug::PushGroup(shader.ShaderLumpName.GetChars());