mirror of
https://gitea.sffempire.ru/Kolyah35/minecraft-pe-0.6.1.git
synced 2026-04-30 17:43:30 +00:00
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:
@@ -375,7 +375,9 @@ void ItemInHandRenderer::render( float a )
|
|||||||
}
|
}
|
||||||
glEnableClientState2(GL_VERTEX_ARRAY);
|
glEnableClientState2(GL_VERTEX_ARRAY);
|
||||||
glEnableClientState2(GL_TEXTURE_COORD_ARRAY);
|
glEnableClientState2(GL_TEXTURE_COORD_ARRAY);
|
||||||
|
glEnableClientState2(GL_NORMAL_ARRAY);
|
||||||
renderItem(player, item);
|
renderItem(player, item);
|
||||||
|
glDisableClientState2(GL_NORMAL_ARRAY);
|
||||||
glDisableClientState2(GL_VERTEX_ARRAY);
|
glDisableClientState2(GL_VERTEX_ARRAY);
|
||||||
glDisableClientState2(GL_TEXTURE_COORD_ARRAY);
|
glDisableClientState2(GL_TEXTURE_COORD_ARRAY);
|
||||||
glPopMatrix2();
|
glPopMatrix2();
|
||||||
@@ -394,7 +396,8 @@ void ItemInHandRenderer::render( float a )
|
|||||||
glTranslatef2(0.8f * d, -0.75f * d - (1 - h) * 0.6f, -0.9f * d);
|
glTranslatef2(0.8f * d, -0.75f * d - (1 - h) * 0.6f, -0.9f * d);
|
||||||
|
|
||||||
glRotatef2(45, 0, 1, 0);
|
glRotatef2(45, 0, 1, 0);
|
||||||
glEnable2(GL_RESCALE_NORMAL);
|
// glEnable2(GL_RESCALE_NORMAL);
|
||||||
|
glEnable(GL_NORMALIZE);
|
||||||
glRotatef2(swing2 * 70, 0, 1, 0);
|
glRotatef2(swing2 * 70, 0, 1, 0);
|
||||||
glRotatef2(-swing3 * 20, 0, 0, 1);
|
glRotatef2(-swing3 * 20, 0, 0, 1);
|
||||||
// glRotatef2(-swing2 * 80, 1, 0, 0);
|
// glRotatef2(-swing2 * 80, 1, 0, 0);
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ void EntityRenderer::renderShadow(Entity* e, float x, float y, float z, float po
|
|||||||
//Textures* textures = entityRenderDispatcher->textures;
|
//Textures* textures = entityRenderDispatcher->textures;
|
||||||
//textures->bind(textures->loadTexture("%clamp%/environment/shadow.png"));
|
//textures->bind(textures->loadTexture("%clamp%/environment/shadow.png"));
|
||||||
Textures* textures = entityRenderDispatcher->textures;
|
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_S, GL_CLAMP_TO_EDGE);
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
#if defined(ANDROID) || defined(__APPLE__) || defined(RPI)
|
#if defined(ANDROID) || defined(__APPLE__) || defined(RPI)
|
||||||
#define OPENGL_ES
|
#define OPENGL_ES
|
||||||
#endif
|
#endif
|
||||||
|
#define GLES_SILENCE_DEPRECATION
|
||||||
// Other systems might run it, if they #define OPENGL_ES
|
// Other systems might run it, if they #define OPENGL_ES
|
||||||
// #if defined(OPENGL_ES) // || defined(ANDROID)
|
// #if defined(OPENGL_ES) // || defined(ANDROID)
|
||||||
#define USE_VBO
|
#define USE_VBO
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ void Biome::teardownBiomes() {
|
|||||||
Feature* Biome::getTreeFeature( Random* random )
|
Feature* Biome::getTreeFeature( Random* random )
|
||||||
{
|
{
|
||||||
if (random->nextInt(10) == 0) {
|
if (random->nextInt(10) == 0) {
|
||||||
return new BasicTree(false);
|
// return new BasicTree(false); // temporarily disabled
|
||||||
}
|
}
|
||||||
return new TreeFeature(false);
|
return new TreeFeature(false);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ public:
|
|||||||
return new BirchFeature();
|
return new BirchFeature();
|
||||||
}
|
}
|
||||||
if (random->nextInt(3) == 0) {
|
if (random->nextInt(3) == 0) {
|
||||||
return new BasicTree(false);
|
// return new BasicTree(false); // temporarily disabled
|
||||||
}
|
}
|
||||||
return new TreeFeature(false);
|
return new TreeFeature(false);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ class RainforestBiome: public Biome
|
|||||||
public:
|
public:
|
||||||
Feature* getTreeFeature(Random* random) {
|
Feature* getTreeFeature(Random* random) {
|
||||||
if (random->nextInt(3) == 0) {
|
if (random->nextInt(3) == 0) {
|
||||||
return new BasicTree(false);
|
// return new BasicTree(false); // temporarily disabled
|
||||||
}
|
}
|
||||||
return new TreeFeature(false);
|
return new TreeFeature(false);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ public:
|
|||||||
// }
|
// }
|
||||||
} else {
|
} else {
|
||||||
if (random->nextInt(10) == 0) {
|
if (random->nextInt(10) == 0) {
|
||||||
f = new BasicTree(true);
|
// f = new BasicTree(true); // temporarily disabled
|
||||||
} else
|
} else
|
||||||
f = new TreeFeature(true);
|
f = new TreeFeature(true);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user