mirror of https://github.com/mpv-player/mpv
debugging/testing helpers: allow forcing a certain width/height for textures
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16595 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
e74494dd4d
commit
464df17b27
|
@ -30,6 +30,13 @@
|
||||||
#define TEXTUREFORMAT_ALWAYS GL_RGBA8
|
#define TEXTUREFORMAT_ALWAYS GL_RGBA8
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
//! force texture height, useful for debugging
|
||||||
|
#define TEXTURE_HEIGHT 128
|
||||||
|
#undef TEXTURE_HEIGHT
|
||||||
|
//! force texture width, useful for debugging
|
||||||
|
#define TEXTURE_WIDTH 128
|
||||||
|
#undef TEXTURE_WIDTH
|
||||||
|
|
||||||
static vo_info_t info =
|
static vo_info_t info =
|
||||||
{
|
{
|
||||||
"X11 (OpenGL) - multiple textures version",
|
"X11 (OpenGL) - multiple textures version",
|
||||||
|
@ -197,6 +204,12 @@ static int initTextures()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
while (format != gl_internal_format && texture_width > 1 && texture_height > 1);
|
while (format != gl_internal_format && texture_width > 1 && texture_height > 1);
|
||||||
|
#ifdef TEXTURE_WIDTH
|
||||||
|
texture_width = TEXTURE_WIDTH;
|
||||||
|
#endif
|
||||||
|
#ifdef TEXTURE_HEIGHT
|
||||||
|
texture_height = TEXTURE_HEIGHT;
|
||||||
|
#endif
|
||||||
|
|
||||||
texnumx = image_width / texture_width;
|
texnumx = image_width / texture_width;
|
||||||
if ((image_width % texture_width) > 0)
|
if ((image_width % texture_width) > 0)
|
||||||
|
|
Loading…
Reference in New Issue