VaOs, VBOs, vertex and fragment shaders

Source: Internet
Author: User

For more information about vertex array objects (VaOs), vertex buffer objects (VBOs), vertex and fragment shaders, see the official instructions!

The OpenGL 3.2 Core Specification removes the majority of the fixed function pipeline previusly used, and replaces it with a completely programmable architecture using shaders. our tutorial will make use of VaOs and VBOs to provide our shaders with data.

A vertex array object (VAO) is an object which contains one or more vertex buffer objects (VBOs) and is designed to store the information for a complete rendered object.

A vertex buffer object (VBO) is a memory buffer in the high speed memory of your video card designed to hold information about vertices. VBOs can also store information such as normals, texcoords, indicies, etc.

A vertex shader in OpenGL is a piece of C like code written to the glsl specification which influences the attributes of a vertex. vertex Shaders can be used to modify properties of the vertex such as position, color, and texture coordinates.

A fragment shader is similar to a vertex shader, but is used for calculating individual fragment colors. This is where lighting and bump-mapping effects are saved med.

There is another shader type called geometry shaders which we will be using in a later tutorial. They are used to create additional vertices.

The shader pipeline behaves as follows: vertex shaders-> geometry shaders-> (rasterizing engine)-> fragment shaders.

The shaders are compilied and then chained together into a shader program.

The shaders receive input data from our VAO through a process of attribute binding, allowing us to perform the needed computations to provide us with the desired results.

VaOs, VBOs, vertex and fragment shaders

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.