It well be damn good if we can remove the 512x512 texture limit! 馃憤
Possible duplicate of #12.
The limit has to do with the engine using a buffer that's 512 x 1024 x 4 bytes large (RGBA takes up 4 bytes per pixel). Increasing the limit involves increasing the size of the buffer as well, or using a dynamically allocated one.
Link to the relevant code in Quake:
https://github.com/id-Software/Quake/blob/bf4ac424ce754894ac8f1dae6a3981954bc9852d/WinQuake/gl_draw.c#L1007-L1024
https://github.com/id-Software/Quake/blob/bf4ac424ce754894ac8f1dae6a3981954bc9852d/WinQuake/gl_draw.c#L1096-L1128
Dynamic memory allocation isn't that expensive anymore, so maybe it could be worth experimenting to see how much of a performance impact it has. An upper limit is probably still needed because GL_MAX_TEXTURE_SIZE is an API-implementation defined limit, so the engine should query that value and rescale textures to fit. Halving size until it fits will maintain texture size ratio so that's probably the best solution if textures are too large.
Agreed, this limit was already removed in all un-official goldsrc titles (Sven co-op, paranoia 2, etc..) So I don't see a reason why this limit is still there. 1024 is good enough for an old engine imo
Most helpful comment
The limit has to do with the engine using a buffer that's 512 x 1024 x 4 bytes large (RGBA takes up 4 bytes per pixel). Increasing the limit involves increasing the size of the buffer as well, or using a dynamically allocated one.
Link to the relevant code in Quake:
https://github.com/id-Software/Quake/blob/bf4ac424ce754894ac8f1dae6a3981954bc9852d/WinQuake/gl_draw.c#L1007-L1024
https://github.com/id-Software/Quake/blob/bf4ac424ce754894ac8f1dae6a3981954bc9852d/WinQuake/gl_draw.c#L1096-L1128
Dynamic memory allocation isn't that expensive anymore, so maybe it could be worth experimenting to see how much of a performance impact it has. An upper limit is probably still needed because
GL_MAX_TEXTURE_SIZEis an API-implementation defined limit, so the engine should query that value and rescale textures to fit. Halving size until it fits will maintain texture size ratio so that's probably the best solution if textures are too large.