Removed legacy NPOT behavior.

This commit is contained in:
Justin Marshall
2026-05-28 19:28:22 -07:00
parent 0591e0b5c1
commit 2aa8ee62cb
2 changed files with 7 additions and 5 deletions
+1 -1
View File
@@ -850,7 +850,7 @@ struct GLBufferObject
const char* vendor = "Justin Marshall";
const char* renderer = "Quake D3D12 Wrapper";
const char* version = "1.1-quake-d3d12";
const char* extensions = "GL_SGIS_multitexture GL_ARB_multitexture GL_EXT_texture_env_add GL_ARB_texture_env_combine GL_ARB_texture_compression GL_EXT_texture_compression_s3tc GL_ARB_vertex_program GL_ARB_fragment_program GL_EXT_texture_cube_map GL_EXT_depth_bounds_test GL_EXT_stencil_two_side GL_ATI_separate_stencil GL_QD3D12_normal_map GL_QD3D12_glow_map GL_QD3D12_specular_map GL_QD3D12_terrain_blend GL_QD3D12_glass_material GL_QD3D12_volumetric_light GL_QD3D12_dlaa GL_QD3D12_taa GL_QD3D12_tonemap_brightness GL_QD3D12_neural_pom";
const char* extensions = "GL_SGIS_multitexture GL_ARB_multitexture GL_EXT_texture_env_add GL_ARB_texture_env_combine GL_ARB_texture_compression GL_EXT_texture_compression_s3tc GL_ARB_texture_non_power_of_two GL_ARB_vertex_program GL_ARB_fragment_program GL_EXT_texture_cube_map GL_EXT_depth_bounds_test GL_EXT_stencil_two_side GL_ATI_separate_stencil GL_QD3D12_normal_map GL_QD3D12_glow_map GL_QD3D12_specular_map GL_QD3D12_terrain_blend GL_QD3D12_glass_material GL_QD3D12_volumetric_light GL_QD3D12_dlaa GL_QD3D12_taa GL_QD3D12_tonemap_brightness GL_QD3D12_neural_pom";
enum TexEnvModeShader
{
+6 -4
View File
@@ -1140,8 +1140,8 @@ Automatically attempts to load .jpg and .png files if .tga files fail to load.
*pic will be NULL if the load failed.
Anything that is going to make this into a texture would use
makePowerOf2 = true, but something loading an image as a lookup
table of some sort would leave it in identity form.
makePowerOf2 = true for legacy backends, but something loading an
image as a lookup table of some sort would leave it in identity form.
It is important to do this at image load time instead of texture load
time for bump maps.
@@ -1221,9 +1221,11 @@ void R_LoadImage(const char* cname, byte** pic, int* width, int* height, ID_TIME
}
//
// Convert to exact power of 2 sizes.
// Convert to exact power of 2 sizes for legacy backends that require it.
//
if (pic && *pic && makePowerOf2) {
const bool convertToPowerOfTwo = makePowerOf2 &&
!(glConfig.isInitialized && glConfig.textureNonPowerOfTwoAvailable);
if (pic && *pic && convertToPowerOfTwo) {
int w, h;
int scaled_width, scaled_height;
byte* resampledBuffer;