mirror of https://github.com/mpv-player/mpv
1000l
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10605 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
97762d4d57
commit
379ad8406e
|
@ -107,7 +107,7 @@ static void CalcFlatPoint(int x,int y,GLfloat *px,GLfloat *py)
|
||||||
if(*py>1.0) *py=1.0;
|
if(*py>1.0) *py=1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void initTextures()
|
static int initTextures()
|
||||||
{
|
{
|
||||||
unsigned char *line_1=0, *line_2=0, *mem_start=0;
|
unsigned char *line_1=0, *line_2=0, *mem_start=0;
|
||||||
struct TexSquare *tsq=0;
|
struct TexSquare *tsq=0;
|
||||||
|
@ -164,7 +164,7 @@ static void initTextures()
|
||||||
if(texture_width < 64 || texture_height < 64)
|
if(texture_width < 64 || texture_height < 64)
|
||||||
{
|
{
|
||||||
fprintf (stderr, "GLERROR: Give up .. usable texture size not avaiable, or texture config error !\n");
|
fprintf (stderr, "GLERROR: Give up .. usable texture size not avaiable, or texture config error !\n");
|
||||||
exit(1);
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -281,6 +281,8 @@ static void initTextures()
|
||||||
|
|
||||||
} /* for all texnumx */
|
} /* for all texnumx */
|
||||||
} /* for all texnumy */
|
} /* for all texnumy */
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void resetTexturePointers(unsigned char *imageSource)
|
static void resetTexturePointers(unsigned char *imageSource)
|
||||||
|
@ -894,7 +896,8 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin
|
||||||
|
|
||||||
texture_width=image_width;
|
texture_width=image_width;
|
||||||
texture_height=image_height;
|
texture_height=image_height;
|
||||||
initTextures();
|
if (initTextures() < 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
glDisable(GL_BLEND);
|
glDisable(GL_BLEND);
|
||||||
glDisable(GL_DEPTH_TEST);
|
glDisable(GL_DEPTH_TEST);
|
||||||
|
|
Loading…
Reference in New Issue