You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
could someone point me to how to render an animation to a modernGL texture/FBO?
(documentation? tutorial? any minimal code?)
or is it just not possible?
thanks
classCustomScene(Scene):
defconstruct(self):
circle=Circle(radius=3, color=BLUE)
self.add(circle)
classWindowEvents(mglw.WindowConfig):
gl_version= (3, 3)
def__init__(self, **kwargs):
super().__init__(**kwargs)
self.wnd.ctx.errorself.fbo=self.ctx.framebuffer(color_attachments=self.ctx.texture(1200,720,3))
## first issue here!## create scene but without creating a new opengl context, rather reusing existing oneself.scene=CustomScene(render_target=self.fbo)
defon_render():
self.fbo.use()
## render the sceneself.scene.step()
self.scene.render()
## use imgui to render textureif__name__=="__main__":
mglw.run_window_config(WindowEvents)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
could someone point me to how to render an animation to a modernGL texture/FBO?
(documentation? tutorial? any minimal code?)
or is it just not possible?
thanks
Beta Was this translation helpful? Give feedback.
All reactions