Optimize for hbbtv plugin

This commit is contained in:
jojo61
2020-06-22 16:35:37 +02:00
parent a424a57036
commit 6a31404aa0
2 changed files with 16 additions and 5 deletions

View File

@@ -84,6 +84,8 @@ uniform sampler2D screenTexture; \
void main() \
{ \
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)
{
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);
}
@@ -1272,7 +1277,7 @@ cOglCmdDrawText::cOglCmdDrawText(cOglFb * fb, GLint x, GLint y, unsigned int *sy
this->x = x;
this->y = y;
this->limitX = limitX;
this->colorText = colorText;
this->colorText = colorText & 0xfeffffff;
this->fontSize = fontSize;
this->symbols = symbols;
this->fontName = name;