Minor fix to on-screen keyboard
This commit is contained in:
@@ -119,6 +119,23 @@ static inline void beginDrawingTex()
|
||||
// It's very unlikely that some app will use GL_TEXTURE_CROP_RECT_OES, so just skip it
|
||||
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
|
||||
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
|
||||
glEnable(GL_BLEND);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
if( SDL_ANDROID_SmoothVideo )
|
||||
{
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||
}
|
||||
else
|
||||
{
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
static inline void endDrawingTex()
|
||||
@@ -139,10 +156,7 @@ static inline void endDrawingTex()
|
||||
static inline void drawCharTex(GLTexture_t * tex, SDL_Rect * src, SDL_Rect * dest, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
|
||||
{
|
||||
GLint cropRect[4];
|
||||
/*
|
||||
GLfloat texColor[4];
|
||||
static const float onediv255 = 1.0f / 255.0f;
|
||||
*/
|
||||
|
||||
if( !dest->h || !dest->w )
|
||||
return;
|
||||
|
||||
@@ -150,23 +164,6 @@ static inline void drawCharTex(GLTexture_t * tex, SDL_Rect * src, SDL_Rect * des
|
||||
|
||||
glColor4x(r * 0x100, g * 0x100, b * 0x100, a * 0x100 );
|
||||
|
||||
//glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_BLEND);
|
||||
|
||||
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
|
||||
glEnable(GL_BLEND);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
if( SDL_ANDROID_SmoothVideo )
|
||||
{
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||
}
|
||||
else
|
||||
{
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||
}
|
||||
|
||||
cropRect[0] = 0;
|
||||
cropRect[1] = tex->h;
|
||||
cropRect[2] = tex->w;
|
||||
|
||||
Reference in New Issue
Block a user