Support software renderer upscaling engine-side in sdlayer and sdlayer12 with various scaling factors (beyond just pixel doubling).

When glsurface is available, use GL to upscale the render buffer.
Additionally, fix build issues with sdlayer12 introduced by GLAD changes (r6656).

git-svn-id: https://svn.eduke32.com/eduke32@6939 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
pogokeen 2018-07-14 21:36:44 +00:00
parent 1b932fddaf
commit 1df7127609
27 changed files with 475 additions and 357 deletions

View file

@ -56,14 +56,14 @@ static GLuint compileShader(GLenum shaderType, const char* const source)
return shaderID;
}
bool glsurface_initialize(vec2_t inputBufferResolution)
bool glsurface_initialize(vec2_t bufferResolution)
{
if (buffer)
glsurface_destroy();
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
bufferRes = inputBufferResolution;
bufferRes = bufferResolution;
buffer = Xaligned_alloc(16, bufferRes.x * bufferRes.y);
glGenBuffers(1, &quadVertsID);