Closed pavelkrupala closed 5 years ago
Hello, I'm trying to render to a texture and render to screen again (hopefully just once). However I tried 2 versions and at both I failed: A) RTT, copy to screen B) RTT, render to screen
min code:
self.vao = self.ctx.vertex_array(self.prog2, self.vao_content, self.ibo) size = (1024, 1024) self.texture = self.ctx.texture(size, components=3, dtype='f1') depth_attachment = self.ctx.depth_renderbuffer(size) self.fbo1 = self.ctx.framebuffer(self.texture, depth_attachment) #render method A self.fbo1.use() self.vao.render() self.ctx.detect_framebuffer().use() self.vao.render() self.ctx.finish() #render method B self.fbo1.use() self.vao.render() #self.ctx.detect_framebuffer().use() self.ctx.copy_framebuffer(self.ctx.screen, self.fbo1) self.ctx.finish()
Is there something obvious I do miss?
This issue probably belongs to the moderngl project : https://github.com/moderngl/moderngl
I suggest reporting the issue there.
yup, sorry about that
Hello, I'm trying to render to a texture and render to screen again (hopefully just once). However I tried 2 versions and at both I failed: A) RTT, copy to screen B) RTT, render to screen
min code:
Is there something obvious I do miss?