1Name 2 3 EXT_framebuffer_blit_layers 4 5Name Strings 6 7 GL_EXT_framebuffer_blit_layers 8 9Contacts 10 11 Simon Zeni, Status Holdings Ltd. <simon@zeni.ca> 12 13Contributors 14 15 Simon Zeni 16 17Status 18 19 Draft 20 21Version 22 23 Version 0.1, 2022/09/16 24 25Number 26 27 OpenGL Extension #558 28 OpenGL ES Extension #341 29 30Dependencies 31 32 OpenGL 3.0, OpenGL ES 3.0, or GL_EXT_framebuffer_blit required 33 34 This extension is written against the OpenGL 4.6 Core and OpenGL ES 3.2 35 specifications. 36 37Overview 38 39 This extensions defines the behaviour for copying data from one layered 40 framebuffer to another layered framebuffer. 41 42New Procedures and Functions 43 44 void BlitFramebufferLayersEXT(int srcX0, int srcY0, int srcX1, int srcY1, 45 int dstX0, int dstY0, int dstX1, int dstY1, 46 bitfield mask, enum filter); 47 48 void BlitFramebufferLayerEXT(int srcX0, int srcY0, int srcX1, int srcY1, 49 int srcLayer, int dstX0, int dstY0, int dstX1, 50 int dstY1, int dstLayer, bitfield mask, 51 enum filter); 52 53New Tokens 54 55 None 56 57Additions to Chapter 16 of the OpenGL ES 3.2 specification (Reading and 58Copying Pixels) and Chaper 18 of the OpenGL 4.6 Core specification (Reading 59and Copying Pixels) 60 61 Append the following to the section 16.2.1 (Blitting Pixel Rectangles) of 62 the OpenGL ES 3.2 specification, and to the section 18.3.1 (Blitting Pixel 63 Rectangles) of the OpenGL 4.6 core specification. 64 65 The command 66 67 void BlitFramebufferLayersEXT(int srcX0, int srcY0, int srcX1, 68 int srcY1, int dstX0, int dstY0, int dstX1, int dstY1, 69 bitfield mask, enum filter); 70 71 extends the behaviour of the command BlitFramebuffer to all the layers of 72 the textures bound to the read framebuffer and the draw framebuffer. 73 74 Calling BlitFramebufferLayersEXT will result in an INVALID_OPERATION if 75 the read and the draw framebuffers don't have the same number of layers. 76 77 The command 78 79 void BlitFramebufferLayerEXT(int srcX0, int srcY0, int srcX1, int srcY1, 80 int srcLayer, int dstX0, int dstY0, int dstX1, int dstY1, 81 int dstLayer, bitfield mask, enum filter); 82 83 extends the behaviour of the command BlitFramebuffer to a specified layer 84 of the texture bound to the read framebuffer, and a specified layer of the 85 draw framebuffer. 86 87 Calling BlitFramebufferLayerEXT will result in an INVALID_VALUE if 88 srcLayer or dstLayer is negative, larger than the value of 89 MAX_ARRAY_TEXTURE_LAYERS minus one, or larger than the number of layers in 90 the attached texture. 91 92Issues 93 94 1) How does the extension deal with GL_OVR_multiview generating the error 95 INVALID_FRAMEBUFFER_OPERATION if the read framebuffer has more than one 96 layer when using the BlitFramebuffer command. 97 98 GL_OVR_multiview defines a two dimensional array texture with multiple 99 layers as multiview. If the extension GL_OVR_multiview is enabled, and 100 a multiview texture is bound to the read framebuffer, the error 101 INVALID_FRAMEBUFFER_OPERATION is generated as expected. For any other 102 kind of textures, the commands BlitFramebufferLayerEXT and 103 BlitFramebufferLayersEXT proceed as expected. 104 105Revision History 106 107 Version 0.2, 2022-09-30 (Simon Zeni) 108 - Conflict with GL_OVR_multiview 109 110 Version 0.1, 2022-09-16 (Simon Zeni) 111 - Initial draft 112