如何在 OpenGL 中重新定位绑定到帧缓冲区的 2D 纹理?

How can I re-position a 2D texture bound to a framebuffer in OpenGL?

我有两个帧缓冲区,它们目前只是绑定两个 2D 纹理,然后在 3D 应用程序的背景中绘制它们。由于图像不适合屏幕,我想通过提供某种偏移量来重新定位它们,但目前它们默认从 0,0 绘制到提供的宽度和高度。

我正在使用

绘制它们
glBindFramebuffer(GL_READ_FRAMEBUFFER, ID);
glBlitFramebuffer(0, 0, width, height, 0, 0, width, height,
    GL_COLOR_BUFFER_BIT, GL_NEAREST);

如果我更改 glBlitFramebuffer 方法的 srcX 和 srcY,它仍然会从 0,0 中绘制,但会裁剪掉一些不是我想要的图像。根据我的阅读,glBlitFramebuffer 复制了一个像素块而不是定位它们。

有谁知道我怎样才能改变抽奖位置?

If I change the srcX and srcY of the glBlitFramebuffer method, then it still draws from 0,0, but crops some of the image which is not what I'm looking for.

嗯,改变dstXdstY...