glGet() in Android 1.6 is not implemented (blasphemy!), so I've disabled appropriate code in on-screen keyboard

This commit is contained in:
pelya
2011-02-10 10:58:13 +00:00
parent fd86b04d47
commit c223d2eee3
4 changed files with 8 additions and 3 deletions

View File

@@ -107,6 +107,8 @@ oldGlState;
static inline void beginDrawingTex()
{
// Save OpenGL state
// TODO: this code does not work on 1.6 emulator, and on some devices
/*
oldGlState.texture2d = glIsEnabled(GL_TEXTURE_2D);
glGetIntegerv(GL_TEXTURE_BINDING_2D, &oldGlState.textureId);
glGetFloatv(GL_CURRENT_COLOR, &(oldGlState.color[0]));
@@ -117,12 +119,14 @@ static inline void beginDrawingTex()
glGetTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, &oldGlState.texFilter1);
glGetTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, &oldGlState.texFilter2);
// It's very unlikely that some app will use GL_TEXTURE_CROP_RECT_OES, so just skip it
*/
glEnable(GL_TEXTURE_2D);
}
static inline void endDrawingTex()
{
/*
// Restore OpenGL state
if( oldGlState.texture2d == GL_FALSE)
glDisable(GL_TEXTURE_2D);
@@ -134,6 +138,7 @@ static inline void endDrawingTex()
glBlendFunc(oldGlState.blend1, oldGlState.blend2);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, oldGlState.texFilter1);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, oldGlState.texFilter2);
*/
}
static inline void drawCharTex(GLTexture_t * tex, SDL_Rect * src, SDL_Rect * dest, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
@@ -669,7 +674,7 @@ static int setupScreenKeyboardButton( int buttonID, Uint8 * charBuf )
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, texture_w, texture_h, 0, GL_RGBA,
format ? GL_UNSIGNED_SHORT_4_4_4_4 : GL_UNSIGNED_SHORT_5_5_5_1, NULL);
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
//glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, w, h, GL_RGBA,
format ? GL_UNSIGNED_SHORT_4_4_4_4 : GL_UNSIGNED_SHORT_5_5_5_1,

Binary file not shown.

Binary file not shown.

View File

@@ -1,6 +1,6 @@
// Touchscreen theme to be included directly into the code witohut Java resources, not used yet
unsigned char * UltimateDroidTheme[] = { 00 // Dummy byte, skip it
,1f,8b,08,00,4a,03,13,4d,02,03,ed,9d,4b,9a,e4,28
,1f,8b,08,00,e0,c3,53,4d,02,03,ed,9d,4b,9a,e4,28
,92,80,05,02,3d,fc,99,95,99,5d,b3,98,d9,e6,4c,9d
,61,76,be,f5,a8,3e,41,54,64,6d,7a,5f,67,f0,a3,f9
,8d,fa,04,95,2d,01,92,00,01,c2,40,1e,81,3c,71,fb
@@ -453,7 +453,7 @@ unsigned char * UltimateDroidTheme[] = { 00 // Dummy byte, skip it
,ff,1f,38,f1,e0,af,04,f2,01,00
};
unsigned char * SimpleTheme[] = { 00 // Dummy byte, skip it
,1f,8b,08,00,4b,03,13,4d,02,03,ec,9d,4f,6c,db,46
,1f,8b,08,00,e0,c3,53,4d,02,03,ec,9d,4f,6c,db,46
,be,c7,29,f9,5f,8e,e6,76,13,fb,68,73,93,5a,c7,75
,d4,be,f8,1a,3f,36,75,6e,7d,0e,d8,5a,7b,0a,6a,9b
,b5,72,da,d4,6e,19,f7,d8,aa,59,ca,a7,a6,5d,35,a5