- Upload custom texture

This commit is contained in:
Magnus Norddahl 2017-07-03 01:29:03 +02:00
parent ee6d7cf17e
commit befe081683
1 changed files with 3 additions and 0 deletions

View File

@ -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());