[Work accumulation] OpenGL Es3.0:glinvalidateframebuffer

Source: Internet
Author: User

Https://www.khronos.org/opengles/sdk/docs/man3/html/glInvalidateFramebuffer.xhtml

This is only extension on GLES2.0:

Https://www.khronos.org/registry/gles/extensions/EXT/EXT_discard_framebuffer.txt

The principle is similar to D3D9 's present parameter (D3dswapeffect_discard):

http://msdn.microsoft.com/en-us/library/windows/desktop/bb172612 (v=vs.85). aspx

In theory, each frame can be drawn based on the previous frame's drawing content overlay, so you need to maintain the validity of the previous Backbuffer content, but the real-time game in the normal between each frame does not do so.

If the original backbuffer is no longer valid after swap, this avoids the GPU's direct operation of the frame buffer cache (fast memory) and re-writes back to video memory. And from the next draw, the GPU does not care about the original backbuffer content, no longer load the backbuffer content into the frame buffer cache. This is why it is required that the Backbuffer data within video memory must be invalid.

This saves bandwidth, improves efficiency, and can save video memory overhead.

The video memory here is not necessarily the physical memory inside the video card. For modern mobile devices, most of the physical memory shared by the GPU and the CPU, like Xbox and PS4, unified memory Access.

However, opengl/es can only be architected to prepare user memory first, then "upload" to the API, which is actually a copy from memory to memory.

It is important to note that when FBO is the default FBO, the input parameters are not the same:

If a Framebuffer object is bound, attachments then may contain GL_COLOR_ATTACHMENTi ,, GL_DEPTH_ATTACHMENT GL_STENCIL_ATTACHMENT , and/or GL_DEPTH_STENCIL_ATTACHMENT . If the Framebuffer object isn't complete, may be glInvalidateFramebuffer ignored.

If The default framebuffer is bound, attachments then may contain GL_COLOR , identifying the color buffer; GL_DEPTH , identif Ying the depth buffer; and/or GL_STENCIL , identifying the stencil buffer.

[Work accumulation] OpenGL Es3.0:glinvalidateframebuffer

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.