@param shaderSource a string containing the shader's code
()
| 972 | * @param shaderSource a string containing the shader's code |
| 973 | */ |
| 974 | protected boolean compileVertexShader() { |
| 975 | pgl.shaderSource(glVertex, PApplet.join(vertexShaderSource, "\n")); |
| 976 | pgl.compileShader(glVertex); |
| 977 | |
| 978 | pgl.getShaderiv(glVertex, PGL.COMPILE_STATUS, intBuffer); |
| 979 | boolean compiled = intBuffer.get(0) == 0 ? false : true; |
| 980 | if (!compiled) { |
| 981 | PGraphics.showException("Cannot compile vertex shader:\n" + |
| 982 | pgl.getShaderInfoLog(glVertex)); |
| 983 | return false; |
| 984 | } else { |
| 985 | return true; |
| 986 | } |
| 987 | } |
| 988 | |
| 989 | |
| 990 | /** |
no test coverage detected