In the last post, we saw how to adapt the GLShaderManager
from the C code to Java. But the C code from the book actually has 2 responsabilities, the first is actually being a GLShader, and the second is being a factory to create several default Shaders.
In the Java implementation, I decided to separate those responsabilities and created a class GLShaderFactory
that has method to create the default shaders. Theres no need to go in detail. The shaders are the same from the book.
The code for the GLShaderFactory.java
is available here