A render buffer contains the result of draw calls. They have a width, height, and an array of character-codes, RGBA, and depth values. A render buffer is created like so:
A vertex array contains arbitrary numeric data about vertices. They normally contain spacial data (X, Y, Z), color (R, G, B, A), UV, and/or character codes.
A lot of 3D models are stored as vertex buffers and index buffers.
You can convert them into a vertex array using the
createVertexArray() function. For example:
A vertex shader accepts a vertex as an input and outputs a clipspace-position and a fragment. The clipspace-position is 4-component vector. The fragment is an array of arbitrary numeric values describing the pixel at the vertex. It is interpolated for every pixel and sent to the fragment shader.
A fragment shader accepts a fragment as an input (provided by the vertex shader), and outputs its color and character code.
To make a draw call, use the
If depth-testing is enabled, pixels with a greater depth will not be drawn over.
One way to display a render buffer is through an HTML canvas element.
Special thanks to:
Licensed under MIT.
All files can be used for commercial or non-commercial purposes. Do not resell. Attribution is appreciated but not due.