![]() You can "ping pong" between the two in each pass, so that the destination from pass n becomes the source in pass n + 1, and the source from pass n becomes the destination in pass n + 1. Note that even if you need more than two passes, you typically still only need two textures. So for multipass rendering of the kind you have in mind, you need two textures, where one is used as source and the other one as the destination. Im trying to set up a CAEAGLLayer subclass with a gl context. ![]() it can be used if you want to implement your own mipmap generation). ![]() But that's a somewhat esoteric case (e.g. There are some exceptions where the results are defined, particularly if the same mipmap levels are not used for both the render target and for texturing. When a feedback loop exists, undefined behavior results. From section 4.4.4 of the ES 2.0 spec:Ī feedback loop may exist when a texture object is used as both the source and destination of a GL operation. Driver can reset all contents to 0, or it can leave as it is, or maybe it will use this information when you will next call glClear and will perform it more efficiently. What driver (or GPU) decides to do with it - its not up to you. This is what the spec calls a "rendering feedback loop", which produces undefined results. Job of glDiscardFramebufferEXT is to inform driver that you dont care about contents of framebuffer. No, under most circumstances, you can't use the same texture as a render target and for texturing at the same time.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |