mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-02-18 10:02:12 +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 anisotropic;
|
||||||
|
qboolean npottextures;
|
||||||
qboolean palettedtexture;
|
qboolean palettedtexture;
|
||||||
qboolean pointparameters;
|
qboolean pointparameters;
|
||||||
|
|
||||||
|
|
||||||
qboolean mtexcombine;
|
qboolean mtexcombine;
|
||||||
|
|
||||||
// ----
|
// ----
|
||||||
|
@ -392,7 +394,7 @@ typedef struct
|
||||||
|
|
||||||
float max_anisotropy;
|
float max_anisotropy;
|
||||||
|
|
||||||
qboolean tex_npot;
|
|
||||||
} glconfig_t;
|
} glconfig_t;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
|
|
|
@ -665,7 +665,7 @@ R_Upload32Native(unsigned *data, int width, int height, qboolean mipmap)
|
||||||
|
|
||||||
|
|
||||||
qboolean
|
qboolean
|
||||||
R_Upload32Old(unsigned *data, int width, int height, qboolean mipmap)
|
R_Upload32Soft(unsigned *data, int width, int height, qboolean mipmap)
|
||||||
{
|
{
|
||||||
int samples;
|
int samples;
|
||||||
unsigned scaled[256 * 256];
|
unsigned scaled[256 * 256];
|
||||||
|
@ -850,13 +850,13 @@ R_Upload32(unsigned *data, int width, int height, qboolean mipmap)
|
||||||
{
|
{
|
||||||
qboolean res;
|
qboolean res;
|
||||||
|
|
||||||
if (gl_config.tex_npot)
|
if (gl_config.npottextures)
|
||||||
{
|
{
|
||||||
res = R_Upload32Native(data, width, height, mipmap);
|
res = R_Upload32Native(data, width, height, mipmap);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
res = R_Upload32Old(data, width, height, mipmap);
|
res = R_Upload32Soft(data, width, height, mipmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mipmap)
|
if (mipmap)
|
||||||
|
|
|
@ -1537,16 +1537,27 @@ R_Init(void *hinstance, void *hWnd)
|
||||||
gl_config.max_anisotropy = 0.0;
|
gl_config.max_anisotropy = 0.0;
|
||||||
Cvar_SetValue("gl_anisotropic_avail", 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"))
|
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.npottextures = true;
|
||||||
gl_config.tex_npot = true;
|
VID_Printf(PRINT_ALL, "Okay\n");
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
gl_config.npottextures = false;
|
||||||
|
VID_Printf(PRINT_ALL, "Failed\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
// ----
|
||||||
|
|
||||||
gl_config.mtexcombine = false;
|
gl_config.mtexcombine = false;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue