mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-26 06:20:48 +00:00
Switch GL_ARB_texture_non_power_of_two to our new probing logic.
While at it rename R_Upload32Old to R_Upload32Soft.
This commit is contained in:
parent
2e7166b157
commit
dafc41f509
3 changed files with 20 additions and 7 deletions
|
@ -382,9 +382,11 @@ typedef struct
|
|||
// ----
|
||||
|
||||
qboolean anisotropic;
|
||||
qboolean npottextures;
|
||||
qboolean palettedtexture;
|
||||
qboolean pointparameters;
|
||||
|
||||
|
||||
qboolean mtexcombine;
|
||||
|
||||
// ----
|
||||
|
@ -392,7 +394,7 @@ typedef struct
|
|||
|
||||
float max_anisotropy;
|
||||
|
||||
qboolean tex_npot;
|
||||
|
||||
} glconfig_t;
|
||||
|
||||
typedef struct
|
||||
|
|
|
@ -665,7 +665,7 @@ R_Upload32Native(unsigned *data, int width, int height, qboolean mipmap)
|
|||
|
||||
|
||||
qboolean
|
||||
R_Upload32Old(unsigned *data, int width, int height, qboolean mipmap)
|
||||
R_Upload32Soft(unsigned *data, int width, int height, qboolean mipmap)
|
||||
{
|
||||
int samples;
|
||||
unsigned scaled[256 * 256];
|
||||
|
@ -850,13 +850,13 @@ R_Upload32(unsigned *data, int width, int height, qboolean mipmap)
|
|||
{
|
||||
qboolean res;
|
||||
|
||||
if (gl_config.tex_npot)
|
||||
if (gl_config.npottextures)
|
||||
{
|
||||
res = R_Upload32Native(data, width, height, mipmap);
|
||||
}
|
||||
else
|
||||
{
|
||||
res = R_Upload32Old(data, width, height, mipmap);
|
||||
res = R_Upload32Soft(data, width, height, mipmap);
|
||||
}
|
||||
|
||||
if (mipmap)
|
||||
|
|
|
@ -1537,16 +1537,27 @@ R_Init(void *hinstance, void *hWnd)
|
|||
gl_config.max_anisotropy = 0.0;
|
||||
Cvar_SetValue("gl_anisotropic_avail", 0.0);
|
||||
|
||||
VID_Printf(PRINT_ALL, "failed\n");
|
||||
VID_Printf(PRINT_ALL, "Failed\n");
|
||||
}
|
||||
|
||||
// ----
|
||||
|
||||
/* Non power of two textures */
|
||||
VID_Printf(PRINT_ALL, " - Non power of two textures: ");
|
||||
|
||||
|
||||
if (strstr(gl_config.extensions_string, "GL_ARB_texture_non_power_of_two"))
|
||||
{
|
||||
VID_Printf(PRINT_ALL, "...using GL_ARB_texture_non_power_of_two\n");
|
||||
gl_config.tex_npot = true;
|
||||
gl_config.npottextures = true;
|
||||
VID_Printf(PRINT_ALL, "Okay\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
gl_config.npottextures = false;
|
||||
VID_Printf(PRINT_ALL, "Failed\n");
|
||||
}
|
||||
|
||||
// ----
|
||||
|
||||
gl_config.mtexcombine = false;
|
||||
|
||||
|
|
Loading…
Reference in a new issue