Moderator: GZDoom Developers
Graf Zahl wrote:There's one thing that's desperately needed in the engine and that's a unification of the 2D rendering between the HWGL, SWGL and D3D backend. As things are right now, everything that gets added here needs to be done 3 times, PLUS a software fallback, which is an absolutely unacceptable situation for us developers. It virtually means that the 2D code right now is in a total state of limbo because working on it is just too excessive.
However, to streamline it, some sacrifices will have to be made. A long-term viable rewrite here is only doable if the following things get done:
1. Removal of DirectDraw backend.
2. Removal of SM14 support, including the texture atlases in the D3D and SWGL backends
3. Removal of software rendered 2D, except for the fuzzy weapon sprite.
4. Simplification of SWGL to work with lower OpenGL versions (1.4 should be possible, provided that the GL_ARB_texture_non_power_of_two and GL_EXT_shared_palette extensions are available.)
Explanations:
- DirectDraw has been the prime candidate for removal for a long time, but refactoring 2D will not be doable if this stays in.
- Ditching Shader Model 1.4 is an inevitability, because it's just for this ancient hardware that the texture atlases were implemented - but these turn out to be a huge feature blocker for the 2D code because they totally prevent any sane implementation of a flexible system - and aren't worth the effort anyway outside of fonts, but for fonts it makes more sense to create texture atlases on a higher cross-backend level anyway. SM1.4 is a relatively easy feature to remove because only one chip series (ATI R200) ever supported it and support for that ended before XP, so there's no drivers for newer Windows versions.
- software rendered 2D means a separate drawer for everything. But there's basically no hardware out there that really still needs it. If done right SWGL should cover everything remotely relevant on non-Windows and D3D already does on Windows. The only exception may be some rare old cards that cannot do NPOT textures. AFAIK among the still supported hardware that is only Geforce 5xxx series and the higher end of Radeon 9xxx series (i.e. 12+ yeah old hardware).
void D_DoAnonStats()
{
static bool done = false; // do this only once per session.
if (done) return;
done = true;
// Do not repeat if already sent.
if (currentrenderer == 0 && sentstats_swr_done >= CHECKVERSION) return;
if (currentrenderer == 1 && sentstats_hwr_done >= CHECKVERSION) return;
static char requeststring[1024];
mysnprintf(requeststring, sizeof requeststring, "GET /stats.php?render=%i&cores=%i&os=%i&renderconfig=%i HTTP/1.1\nHost: %s\nConnection: close\nUser-Agent: %s %s\n\n",
GetRenderInfo(), GetCoreInfo(), GetOSVersion(), currentrenderer, sys_statshost.GetHumanString(), GAMENAME, VERSIONSTR);
DPrintf(DMSG_NOTIFY, "Sending %s", requeststring);
std::thread t1(D_DoHTTPRequest, requeststring);
t1.detach();
}
mysnprintf(requeststring, sizeof requeststring, "GET /stats.php?render=%i&cores=%i&os=%i&renderconfig=%i HTTP/1.1\nHost: %s\nConnection: close\nUser-Agent: %s %s\n\n",
GetRenderInfo(), GetCoreInfo(), GetOSVersion(), currentrenderer, sys_statshost.GetHumanString(), GAMENAME, VERSIONSTR);
static int GetRenderInfo()
{
if (currentrenderer == 0)
{
if (!screen->Accel2D) return 0;
if (vid_glswfb) return 2;
if (screen->LegacyHardware()) return 6;
return 1;
}
else
{
auto info = gl_getInfo();
if (info.first < 3.3) return 3; // Legacy OpenGL. Don't care about Intel HD 3000 on Windows being run in 'risky' mode.
if (!info.second) return 4;
return 5;
}
}
You are using GZDoom [version] for the first time.
You appear to be running GZDoom using the following:
Operating system: __
Processor cores: __
Renderer type: __
May we send this information to gzstats.drdteam.org?
We want to know how much longer we should support this hardware and OS version in the future.
All information sent will be anonymous. We will NOT be sending this information to Microsoft, Facebook, the FBI, your spouse, whoever. It will, however, be sent unencrypted.
If you are getting this notice more than once for this version, or if the above information is incorrect, please let us know on the forums. Thanks!
- the GZDoom dev team
<YES - PLEASE SEND>
<no - I'd rather keep this private>
All information sent will be anonymous. We will NOT be sending this information to Microsoft, Facebook, the FBI, your spouse, whoever. It will, however, be sent unencrypted.
Users browsing this forum: No registered users and 1 guest