Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QOpenGLFrameBufferObject: Create object @ position possible?



  • So, I am upgrading a code which basically deletes and redraws all 3D objects on an edit in open GL.

    The idea is to now create all the objects in separate frame buffers to escape having to re-create the untouched objects. I'd prefer if I could somehow configure the framebuffer itself to a particular position on my canvas (something like 10,10,20,20) which would create a frame buffer from point 10x10 to 20x20. Granted, I can create a 10x10 buffer right now and then save the start position; i'd prefer if I could avoid it.

    So, any suggestions?



  • The framebuffer itself has no concept of where you will ultimately want to use it. For example, you might render a robot to an FBO, and then blit that FBO 150 times to different parts of the screen. Or not using it on the screen directly at all, but rather use it as a texture wrapped around some geometry, etc.

    You may want to make some class of your own that has a QOpenGLFrameBufferObject and use a QOpenGLTextureBlitter to make a transformation matrix that you persist alongside your FBO.

    https://doc.qt.io/qt-5/qopengltextureblitter.html


Log in to reply