17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-17 08:39:19 +02:00

Remove OpenGL ES / ANGLE render path

This commit is contained in:
2026-10-15 00:53:28 +02:00
parent 3d3eef2e1c
commit 0e10ce4d0b
20 changed files with 127 additions and 516 deletions

View File

@@ -13,21 +13,8 @@ void screenshot_manager::screenshot_save_thread( char *img, int w, int h )
png.width = w;
png.height = h;
int stride;
if (Global.gfx_usegles)
{
png.format = PNG_FORMAT_RGBA;
stride = -w * 4;
for (int y = 0; y < h; y++)
for (int x = 0; x < w; x++)
img[(y * w + x) * 4 + 3] = 0xFF;
}
else
{
png.format = PNG_FORMAT_RGB;
stride = -w * 3;
}
png.format = PNG_FORMAT_RGB;
int stride = -w * 3;
std::array<char, 64> datetime{};
std::tm const tm_info = local_tm(std::time(nullptr));
@@ -56,7 +43,7 @@ void screenshot_manager::screenshot_save_thread( char *img, int w, int h )
void screenshot_manager::make_screenshot()
{
auto img = new char[Global.fb_size.x * Global.fb_size.y * 4];
glReadPixels(0, 0, Global.fb_size.x, Global.fb_size.y, Global.gfx_usegles ? GL_RGBA : GL_RGB, GL_UNSIGNED_BYTE, (GLvoid*)img);
glReadPixels(0, 0, Global.fb_size.x, Global.fb_size.y, GL_RGB, GL_UNSIGNED_BYTE, (GLvoid*)img);
//m7t: use pbo
std::thread t(screenshot_save_thread, img, Global.fb_size.x, Global.fb_size.y);