|
Post by branster707 on Dec 24, 2020 23:25:55 GMT
How do I draw individual points using nitro? I tried this code but it doesnt show anything:
graphics = require "nitro.graphics"
graphics.setdefaultvf('p2c4')
points = {
}
for x = 100,200 do for y = 100,200 do points[#points+1] = { {x,y},{1,0,0,1} } end end
points = graphics.newvbo{v=points}
graphics.showscreen()
graphics.clear(draw.white) graphics.points(points) graphics.present() --sys.sleep(1000) sys.halt()
|
|
|
Post by Admin on Dec 25, 2020 14:29:58 GMT
First thing you need to do is initialize nitro lib. before using its api, so move this line; graphics.showscreen()
To be the second line.
|
|
|
Post by branster707 on Dec 25, 2020 17:59:53 GMT
First thing you need to do is initialize nitro lib. before using its api, so move this line; graphics.showscreen() To be the second line. Oh moving that to the second line didn’t help
|
|