Setting up OpenGL Multiple Render Targets

前端 未结 1 1309
别那么骄傲
别那么骄傲 2020-12-13 04:51

I\'ve seen a lot of material on this subject, but there are some differences between the examples I\'ve found and I\'m having a hard time getting a solid understanding of th

相关标签:
1条回答
  • 2020-12-13 05:53

    Sounds and looks reasonable. This is indeed the common way to do it. If you don't need the depth data as texture for further processing, you can also use a renderbuffer for an attachment, but a texture should also work fine.

    You can also use glCheckFramebufferStatusEXT after all the setup is done, to see if the framebuffer is valid in its current configuration, but your code looks fine. If you don't have a problem and this was just for assurance, then rest assured that you're on the right track, otherwise tell us what's wrong.

    0 讨论(0)
提交回复
热议问题