*p | List of coordinates for drawing points |
n | Number of points to be drawn |
pri | Priority (use for Z value) |
attr | Attribute (select drawing method) |
NJD_DRAW_NORMAL | Normal drawing. |
NJD_TRANSPARENT | Transparent drawing. |
NJD_USE_TEXTURE | Drawing with texture. |
These three attributes can be used in mutually consistent combinations by using the "|" character as a delimiter.
The following draws 100 points at random. Sint32 i; NJS_POINT2COL p2c[100]; NJS_POINT2 p[100]; NJS_COLOR col[100]; p2c.p = p; p2c.col = col; p2c.tex = NULL; p2c.num = 100; for(i=0;i<100;i++){ p2c.p[i].x = (Sint16)(njRandom() * 640.f); p2c.p[i].y = (Sint16)(njRandom() * 480.f); p2c.col[i].color = (Sint32)(njRandom() * 0xFFFFFFFF); } njDrawPoint2D(p2c,100,-2.f,NJD_DRAW_NORMAL);