While refreshing my mind on OpenGL ES, I decided to read a few of the books I brought a while back and search for some tutorials online.
Whilst doing so, I came across many beginner's tutorials that show how to draw a triangle using simply the followings:
gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);
....
gl.glVertexPointer(3, GL10.GL_FLOAT, 0, vertexBuffer);
gl.glDrawArrays(GL10.GL_TRIANGLE_STRIP, 0, 4);
or using simply:
glDrawElements
along with an index buffer.
However to my understanding, is that since OpenGL ES 2.0, one must supply both a vertex and a fragment shader and the modern rendering pipeline is:
Primitive Processing - Vertex Shader - Primitive Assembly - Rasterizer -
Fragment Shader - Depth Stencil - Color Buffer Blend - Frame Buffer
So my question is, how is it possible for those tutorials to draw without having any vertex nor fragment shaders using just glDrawElements
or glDrawArrays
? Or, does the program supply them automatically when no shaders are in use and when it detects that either or both glDrawElements
and glDrawArrays
are in use?
In addition, does the aforementioned flow of pipeline withhold when no shaders are in use?
Thank you.