- Which steps of the OpenGL render pipeline are user-definable? Which steps must be defined in order to render anything? You may need to reference the documentation at https://www.khronos.org/opengl/wiki/Rendering_Pipeline_Overview.
The vertex processing and fragment shader steps are user-definable. At a minimum, you must create a vertex shader and a fragment shader. Optional steps include the geometry shader and tessellation steps, which are part of vertex processing.
- You're writing a shader for an OpenGL 2.1 program. Does the following look correct?
#version 2.1
attribute highp vec4 vertex;
void main (void)
{
gl_Position = vertex;
}
Your version string is wrong. It should read #version 120, since it specifies the version of GLSL, not the version of OpenGL. Versions are also specified as a three-digit number with no period.
- Is the following a vertex...