File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,7 +19,6 @@ export type RenderResources = {
1919 texture : Texture ;
2020 model : Model ;
2121 fbo : Framebuffer ;
22- _externalFramebuffer ?: { handle : WebGLFramebuffer ; wrapper : Framebuffer } ;
2322} ;
2423
2524async function createDeckInstance ( gl : WebGL2RenderingContext ) : Promise < {
@@ -179,22 +178,6 @@ export function render(
179178 const pixelWidth = Math . round ( width * dpr ) ;
180179 const pixelHeight = Math . round ( height * dpr ) ;
181180
182- // Wrap the external framebuffer handle so luma.gl treats it as a proper Framebuffer resource.
183- const externalFbo = rawScreenFbo ;
184- let screenFbo : Framebuffer | null = null ;
185- if ( externalFbo ) {
186- if ( resources . _externalFramebuffer ?. handle !== externalFbo ) {
187- resources . _externalFramebuffer ?. wrapper . destroy ( ) ;
188- const wrapper = device . createFramebuffer ( {
189- handle : externalFbo ,
190- width : pixelWidth ,
191- height : pixelHeight
192- } ) ;
193- resources . _externalFramebuffer = { handle : externalFbo , wrapper} ;
194- }
195- screenFbo = resources . _externalFramebuffer ! . wrapper ;
196- }
197-
198181 fbo . resize ( { width : pixelWidth , height : pixelHeight } ) ;
199182
200183 // luma's Framebuffer.resize() clones and destroys the color attachment texture when
@@ -271,5 +254,4 @@ export function finalizeResources(resources: RenderResources) {
271254 resources . model . destroy ( ) ;
272255 resources . fbo . destroy ( ) ;
273256 resources . texture . destroy ( ) ;
274- resources . _externalFramebuffer ?. wrapper . destroy ( ) ;
275257}
You can’t perform that action at this time.
0 commit comments