(PGraphicsOpenGL g, PImage texture)
| 4842 | // Render the geometry stored in the root shape as VBOs, for the vertices |
| 4843 | // corresponding to this shape. Sometimes we can have root == this. |
| 4844 | protected void render(PGraphicsOpenGL g, PImage texture) { |
| 4845 | if (root == null) { |
| 4846 | // Some error. Root should never be null. At least it should be 'this'. |
| 4847 | throw new RuntimeException("Error rendering PShapeOpenGL, root shape is " + |
| 4848 | "null"); |
| 4849 | } |
| 4850 | |
| 4851 | if (hasPolys) { |
| 4852 | renderPolys(g, texture); |
| 4853 | if (g.haveRaw()) { |
| 4854 | rawPolys(g, texture); |
| 4855 | } |
| 4856 | } |
| 4857 | |
| 4858 | if (is3D()) { |
| 4859 | // In 3D mode, the lines and points need to be rendered separately |
| 4860 | // as they require their own shaders. |
| 4861 | if (hasLines) { |
| 4862 | renderLines(g); |
| 4863 | if (g.haveRaw()) { |
| 4864 | rawLines(g); |
| 4865 | } |
| 4866 | } |
| 4867 | |
| 4868 | if (hasPoints) { |
| 4869 | renderPoints(g); |
| 4870 | if (g.haveRaw()) { |
| 4871 | rawPoints(g); |
| 4872 | } |
| 4873 | } |
| 4874 | } |
| 4875 | } |
| 4876 | |
| 4877 | |
| 4878 | protected void renderPolys(PGraphicsOpenGL g, PImage textureImage) { |
no test coverage detected