@@ -124,7 +124,7 @@ def getScaledSize(self, mul, div, align):
124124
125125 return winx ,winy
126126
127- def renderSceneInto (self , depthtex = None , colortex = None , auxtex = None , auxbits = 0 , textures = None ):
127+ def renderSceneInto (self , depthtex = None , colortex = None , auxtex = None , auxbits = 0 , textures = None , fbprops = None ):
128128
129129 """ Causes the scene to be rendered into the supplied textures
130130 instead of into the original window. Puts a fullscreen quad
@@ -185,7 +185,10 @@ def renderSceneInto(self, depthtex=None, colortex=None, auxtex=None, auxbits=0,
185185 # Choose the size of the offscreen buffer.
186186
187187 (winx , winy ) = self .getScaledSize (1 ,1 ,1 )
188- buffer = self .createBuffer ("filter-base" , winx , winy , texgroup )
188+ if fbprops is not None :
189+ buffer = self .createBuffer ("filter-base" , winx , winy , texgroup , fbprops = fbprops )
190+ else :
191+ buffer = self .createBuffer ("filter-base" , winx , winy , texgroup )
189192
190193 if (buffer == None ):
191194 return None
@@ -287,7 +290,7 @@ def renderQuadInto(self, name="filter-stage", mul=1, div=1, align=1, depthtex=No
287290
288291 return quad
289292
290- def createBuffer (self , name , xsize , ysize , texgroup , depthbits = 1 ):
293+ def createBuffer (self , name , xsize , ysize , texgroup , depthbits = 1 , fbprops = None ):
291294 """ Low-level buffer creation. Not intended for public use. """
292295
293296 winprops = WindowProperties ()
@@ -297,6 +300,9 @@ def createBuffer(self, name, xsize, ysize, texgroup, depthbits=1):
297300 props .setRgbColor (1 )
298301 props .setDepthBits (depthbits )
299302 props .setStereo (self .win .isStereo ())
303+ if fbprops is not None :
304+ props .addProperties (fbprops )
305+
300306 depthtex , colortex , auxtex0 , auxtex1 = texgroup
301307 if (auxtex0 != None ):
302308 props .setAuxRgba (1 )
0 commit comments