forked from mirrors/kolyah35-minecraft-pe-0.6.1
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:
parent
9db9f469cc
commit
c188fa0ce2
7 changed files with 10 additions and 7 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ void Biome::teardownBiomes() {
|
|||
Feature* Biome::getTreeFeature( Random* random )
|
||||
{
|
||||
if (random->nextInt(10) == 0) {
|
||||
return new BasicTree(false);
|
||||
// return new BasicTree(false); // temporarily disabled
|
||||
}
|
||||
return new TreeFeature(false);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ public:
|
|||
return new BirchFeature();
|
||||
}
|
||||
if (random->nextInt(3) == 0) {
|
||||
return new BasicTree(false);
|
||||
// return new BasicTree(false); // temporarily disabled
|
||||
}
|
||||
return new TreeFeature(false);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ class RainforestBiome: public Biome
|
|||
public:
|
||||
Feature* getTreeFeature(Random* random) {
|
||||
if (random->nextInt(3) == 0) {
|
||||
return new BasicTree(false);
|
||||
// return new BasicTree(false); // temporarily disabled
|
||||
}
|
||||
return new TreeFeature(false);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ public:
|
|||
// }
|
||||
} else {
|
||||
if (random->nextInt(10) == 0) {
|
||||
f = new BasicTree(true);
|
||||
// f = new BasicTree(true); // temporarily disabled
|
||||
} else
|
||||
f = new TreeFeature(true);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue