From 27cfbbd2848ca28b2a6b13e4b9bf4c79310fb531 Mon Sep 17 00:00:00 2001 From: David Rose Date: Mon, 25 Aug 2008 22:56:40 +0000 Subject: [PATCH] preload textures --- direct/src/showbase/Transitions.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/direct/src/showbase/Transitions.py b/direct/src/showbase/Transitions.py index ea6499b8d4..2c11956394 100644 --- a/direct/src/showbase/Transitions.py +++ b/direct/src/showbase/Transitions.py @@ -127,6 +127,13 @@ class Transitions: from black to transparent. When the color lerp is finished, it parents the fade polygon to hidden. """ + gsg = base.win.getGsg() + if gsg: + # If we're about to fade in from black, go ahead and + # preload all the textures etc. + render.prepareScene(gsg) + render2d.prepareScene(gsg) + if (t == 0): # Fade in immediately with no lerp #print "transitiosn: fadeIn 0.0"