Skip to content

Commit

Permalink
Added texture content flag TXCF_UPLOAD_ARG_NOSMARTFILTER. Currently o…
Browse files Browse the repository at this point in the history
…nly used with the busy mode screen grab (was taking upwards of 3.4 seconds at 1920x1200 with smart filtering enabled).
  • Loading branch information
danij committed Feb 18, 2007
1 parent 4e0c2fd commit bf1bd6d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion doomsday/engine/portable/include/gl_defer.h
Expand Up @@ -55,7 +55,8 @@ typedef struct texturecontent_s {
#define TXCF_UPLOAD_ARG_ALPHACHANNEL 0x10
#define TXCF_UPLOAD_ARG_RGBDATA 0x20
#define TXCF_UPLOAD_ARG_NOSTRETCH 0x40
#define TXCF_NEVER_DEFER 0x80
#define TXCF_UPLOAD_ARG_NOSMARTFILTER 0x80
#define TXCF_NEVER_DEFER 0x100

void GL_InitDeferred(void);
void GL_ShutdownDeferred(void);
Expand Down
2 changes: 1 addition & 1 deletion doomsday/engine/portable/src/con_busy.c
Expand Up @@ -252,7 +252,7 @@ void Con_AcquireScreenshotTexture(void)
texScreenshot = GL_UploadTexture(frame, glScreenWidth, glScreenHeight,
false, false, true, false,
DGL_LINEAR, DGL_LINEAR, DGL_CLAMP, DGL_CLAMP,
TXCF_NEVER_DEFER);
(TXCF_NEVER_DEFER | TXCF_UPLOAD_ARG_NOSMARTFILTER));
glMaxTexSize = oldMaxTexSize;
M_Free(frame);

Expand Down
3 changes: 2 additions & 1 deletion doomsday/engine/portable/src/gl_texmanager.c
Expand Up @@ -909,6 +909,7 @@ DGLuint GL_UploadTexture2(texturecontent_t *content)
boolean generateMipmaps = ((content->flags & TXCF_MIPMAP) != 0);
boolean RGBData = ((content->flags & TXCF_UPLOAD_ARG_RGBDATA) != 0);
boolean noStretch = ((content->flags & TXCF_UPLOAD_ARG_NOSTRETCH) != 0);
boolean noSmartFilter = ((content->flags & TXCF_UPLOAD_ARG_NOSMARTFILTER) != 0);
byte *palette = GL_GetPalette();
int i, levelWidth, levelHeight; // width and height at the current level
int comps;
Expand Down Expand Up @@ -941,7 +942,7 @@ DGLuint GL_UploadTexture2(texturecontent_t *content)
}

// If smart filtering is enabled, all textures are magnified 2x.
if(useSmartFilter /* && comps == 3 */ )
if(useSmartFilter && !noSmartFilter /* && comps == 3 */ )
{
byte *filtered = M_Malloc(4 * width * height * 4);

Expand Down

0 comments on commit bf1bd6d

Please sign in to comment.