- Does kha support different drawing modes like GL_LINES, GL_TRIANGLES, etc?
- Or alternately, is there a way to draw a line?
- Also, is there an easy way to draw text in a plane?
For example, in processing by default you draw text in the xy plane, and then you can apply a transformation to render it in a different plane.
Some questions about graphics4.
g4 only supports indexed triangles - and so does your actual hardware. A line simply consists of two triangles.
You can draw text into a texture. Use var image = Image.createRenderTarget(w, h); image.g2.begin(); image.g2.drawString(...); image.g2.end(); - you can then use that image just like any other image. g2 doesn't itself consider 3D transformations, because it is designed to be mapped to HTML5 canvas and similar apis.