mirror of
https://github.com/3b1b/manim.git
synced 2025-04-13 09:47:07 +00:00
Use non-window fbo in scene.get_image
This commit is contained in:
parent
3a175c1a4c
commit
9ee9e1946a
1 changed files with 4 additions and 5 deletions
|
@ -288,13 +288,12 @@ class Scene(object):
|
||||||
|
|
||||||
def get_image(self) -> Image:
|
def get_image(self) -> Image:
|
||||||
if self.window is not None:
|
if self.window is not None:
|
||||||
self.window.size = self.camera.get_pixel_shape()
|
self.camera.use_window_fbo(False)
|
||||||
self.window.swap_buffers()
|
self.camera.clear()
|
||||||
self.update_frame()
|
self.camera.capture(*self.mobjects)
|
||||||
self.window.swap_buffers()
|
|
||||||
image = self.camera.get_image()
|
image = self.camera.get_image()
|
||||||
if self.window is not None:
|
if self.window is not None:
|
||||||
self.window.to_default_position()
|
self.camera.use_window_fbo(True)
|
||||||
return image
|
return image
|
||||||
|
|
||||||
def show(self) -> None:
|
def show(self) -> None:
|
||||||
|
|
Loading…
Add table
Reference in a new issue