Attempt to fix Normal Lighting and Shadows on Android, also disabled fancy trees temporarily due to performance issues on android.

This commit is contained in:
Shredder
2026-04-12 01:12:17 +05:00
parent 9db9f469cc
commit c188fa0ce2
7 changed files with 10 additions and 7 deletions

View File

@@ -375,7 +375,9 @@ void ItemInHandRenderer::render( float a )
}
glEnableClientState2(GL_VERTEX_ARRAY);
glEnableClientState2(GL_TEXTURE_COORD_ARRAY);
glEnableClientState2(GL_NORMAL_ARRAY);
renderItem(player, item);
glDisableClientState2(GL_NORMAL_ARRAY);
glDisableClientState2(GL_VERTEX_ARRAY);
glDisableClientState2(GL_TEXTURE_COORD_ARRAY);
glPopMatrix2();
@@ -394,7 +396,8 @@ void ItemInHandRenderer::render( float a )
glTranslatef2(0.8f * d, -0.75f * d - (1 - h) * 0.6f, -0.9f * d);
glRotatef2(45, 0, 1, 0);
glEnable2(GL_RESCALE_NORMAL);
// glEnable2(GL_RESCALE_NORMAL);
glEnable(GL_NORMALIZE);
glRotatef2(swing2 * 70, 0, 1, 0);
glRotatef2(-swing3 * 20, 0, 0, 1);
// glRotatef2(-swing2 * 80, 1, 0, 0);

View File

@@ -187,7 +187,7 @@ void EntityRenderer::renderShadow(Entity* e, float x, float y, float z, float po
//Textures* textures = entityRenderDispatcher->textures;
//textures->bind(textures->loadTexture("%clamp%/environment/shadow.png"));
Textures* textures = entityRenderDispatcher->textures;
textures->bind(textures->loadTexture("/misc/shadow.png"));
textures->loadAndBindTexture(("/misc/shadow.png"));
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);

View File

@@ -12,7 +12,7 @@
#if defined(ANDROID) || defined(__APPLE__) || defined(RPI)
#define OPENGL_ES
#endif
#define GLES_SILENCE_DEPRECATION
// Other systems might run it, if they #define OPENGL_ES
// #if defined(OPENGL_ES) // || defined(ANDROID)
#define USE_VBO