summaryrefslogtreecommitdiff
path: root/lua/test.lua
blob: bc6c4fc046c00b3c7fd5dfacdde0ecd108b95224 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/lua

require("libluakms")
require("bit32")

card = libluakms.Card()
card:print_short()

conn = card:get_first_connected_connector()

mode = conn:get_default_mode()

fb = libluakms.Framebuffer(card, mode.hdisplay, mode.vdisplay, "XR24");
libluakms.draw_test_pattern(fb);

crtc = conn:get_current_crtc()

crtc:set_mode(conn, fb, mode)

print("Press enter to exit")
io.read()