glerminal/examples/basic.cpp

31 lines
517 B
C++
Raw Normal View History

2024-05-09 19:42:12 +00:00
#include <glerminal.h>
2024-05-14 21:46:30 +00:00
namespace
{
void init()
{
glerminal_update_palette(0, 0xFF0000FF);
glerminal_update_palette(1, 0x00FF00FF);
glerminal_update_sprite(0, {
1, 1, 1, 1, 1, 1, 1, 1,
1, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0, 0, 0
});
}
void mainloop(float dt)
{
glerminal_flush();
}
}
2024-05-09 19:42:12 +00:00
int main(int argc, char** argv)
{
2024-05-14 21:46:30 +00:00
glerminal_run(init, mainloop);
2024-05-09 19:42:12 +00:00
}