glerminal/tests/basic.cpp

45 lines
619 B
C++
Raw Normal View History

2024-05-26 03:16:23 +00:00
#include <glerminal.h>
#include <test-common.h>
2024-05-29 11:16:01 +00:00
#include <iostream>
#ifndef _WIN32
#include <unistd.h>
#endif
2024-05-26 03:16:23 +00:00
namespace
{
void init()
{
2024-05-29 11:16:01 +00:00
if (!glerminal_load_sprites_file("resources/image.png"))
{
#ifndef _WIN32
char buffer[257] = {};
getcwd(buffer, 256);
std::cout << buffer << std::endl;
#endif
2024-05-29 11:16:01 +00:00
std::cout << "Failed to load texture" << std::endl;
}
2024-05-26 03:16:23 +00:00
for (int i = 0; i < GRID_HEIGHT; i++)
{
glerminal_set(i, i, 0, 1);
}
glerminal_flush();
glerminal_test_save_image();
glerminal_quit();
}
void mainloop(float) {}
}
int main()
{
glerminal_run(init, mainloop);
return 0;
}