Fork me on GitHub

Lines and points in GLGE

Sorry I’ve been neglecting the blog a bit recently but rest assured work goes on :-) So this is probably one of the most requested features and it’s been a long time coming rendering points and lines in GLGE. You can now specify an object to render as lines in GLGE simply by setting the render type on the object:
myObject.setDrawType(GLGE.DRAW_LINES);
myObject.setDrawType(GLGE.DRAW_TRIS);
myObject.setDrawType(GLGE.DRAW_LINELOOPS);
myObject.setDrawType(GLGE.DRAW_LINESTRIPS);
myObject.setDrawType(GLGE.DRAW_POINTS);
with points you can specify the size with:
myObject.setPointSize(10);

View source in the demo below for more verbose instruction on how it work.

Live Demo

Video:

Tags: , , ,