mirror of
https://github.com/jojo61/vdr-plugin-softhdcuvid.git
synced 2023-10-10 13:37:41 +02:00
Optimize for hbbtv plugin
This commit is contained in:
parent
a424a57036
commit
6a31404aa0
@ -84,6 +84,8 @@ uniform sampler2D screenTexture; \
|
|||||||
void main() \
|
void main() \
|
||||||
{ \
|
{ \
|
||||||
color = texture(screenTexture, TexCoords) * alphaValue; \
|
color = texture(screenTexture, TexCoords) * alphaValue; \
|
||||||
|
if (color == vec4(0.0,0.0,0.0,1.0))\
|
||||||
|
color.a = 0.0;\
|
||||||
} \
|
} \
|
||||||
";
|
";
|
||||||
|
|
||||||
@ -747,6 +749,9 @@ void cOglVb::SetShaderColor(GLint color)
|
|||||||
|
|
||||||
void cOglVb::SetShaderAlpha(GLint alpha)
|
void cOglVb::SetShaderAlpha(GLint alpha)
|
||||||
{
|
{
|
||||||
|
GLfloat a = (GLfloat) (alpha) / 255.0f;
|
||||||
|
if (a > 0.98)
|
||||||
|
a = 1.0;
|
||||||
Shaders[shader]->SetVector4f("alpha", 1.0f, 1.0f, 1.0f, (GLfloat) (alpha) / 255.0f);
|
Shaders[shader]->SetVector4f("alpha", 1.0f, 1.0f, 1.0f, (GLfloat) (alpha) / 255.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1272,7 +1277,7 @@ cOglCmdDrawText::cOglCmdDrawText(cOglFb * fb, GLint x, GLint y, unsigned int *sy
|
|||||||
this->x = x;
|
this->x = x;
|
||||||
this->y = y;
|
this->y = y;
|
||||||
this->limitX = limitX;
|
this->limitX = limitX;
|
||||||
this->colorText = colorText;
|
this->colorText = colorText & 0xfeffffff;
|
||||||
this->fontSize = fontSize;
|
this->fontSize = fontSize;
|
||||||
this->symbols = symbols;
|
this->symbols = symbols;
|
||||||
this->fontName = name;
|
this->fontName = name;
|
||||||
|
10
video.c
10
video.c
@ -1557,8 +1557,11 @@ static void CuvidDestroySurfaces(CuvidDecoder * decoder)
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined PLACEBO && API_VER >= 58
|
#ifdef PLACEBO
|
||||||
|
pl_gpu_finish(p->gpu);
|
||||||
|
#if API_VER >= 58
|
||||||
p->num_shaders = 0;
|
p->num_shaders = 0;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (i = 0; i < decoder->SurfacesNeeded; i++) {
|
for (i = 0; i < decoder->SurfacesNeeded; i++) {
|
||||||
@ -3875,6 +3878,9 @@ static void CuvidMixVideo(CuvidDecoder * decoder, __attribute__((unused))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
render_params.hooks = &p->hook;
|
render_params.hooks = &p->hook;
|
||||||
|
if (ovl)
|
||||||
|
render_params.num_hooks = 0; // no shaders when OSD activ
|
||||||
|
else
|
||||||
render_params.num_hooks = p->num_shaders;
|
render_params.num_hooks = p->num_shaders;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -5465,7 +5471,7 @@ void exit_display()
|
|||||||
if (osdoverlay.plane.texture)
|
if (osdoverlay.plane.texture)
|
||||||
pl_tex_destroy(p->gpu, &osdoverlay.plane.texture);
|
pl_tex_destroy(p->gpu, &osdoverlay.plane.texture);
|
||||||
|
|
||||||
pl_renderer_destroy(&p->renderer);
|
// pl_renderer_destroy(&p->renderer);
|
||||||
if (p->renderertest) {
|
if (p->renderertest) {
|
||||||
pl_renderer_destroy(&p->renderertest);
|
pl_renderer_destroy(&p->renderertest);
|
||||||
p->renderertest = NULL;
|
p->renderertest = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user