Skip to content

Commit

Permalink
skybox bug fix
Browse files Browse the repository at this point in the history
git-svn-id: http://min3d.googlecode.com/svn/trunk@116 470a5c22-fb99-cafe-615f-f07c7e978966
  • Loading branch information
ippeldv committed Feb 21, 2011
1 parent a26bf81 commit 730bada
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/min3d/objectPrimitives/SkyBox.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,23 +45,27 @@ private void build() {
north.lightingEnabled(false);

east.rotation().y = -90;
east.position().x = -halfSize;
east.position().x = halfSize;
east.doubleSidedEnabled(true);
east.lightingEnabled(false);

south.rotation().y = 180;
south.position().z = -halfSize;
south.lightingEnabled(false);

west.rotation().y = 90;
west.position().x = halfSize;
west.position().x = -halfSize;
west.doubleSidedEnabled(true);
west.lightingEnabled(false);

up.rotation().x = -90;
up.rotation().x = 90;
up.position().y = halfSize;
up.doubleSidedEnabled(true);
up.lightingEnabled(false);

down.rotation().x = 90;
down.rotation().x = -90;
down.position().y = -halfSize;
down.doubleSidedEnabled(true);
down.lightingEnabled(false);

faces[Face.North.ordinal()] = north;
Expand All @@ -81,7 +85,7 @@ private void build() {

public void addTexture(Face face, int resourceId, String id) {
Bitmap bitmap = Utils.makeBitmapFromResourceId(resourceId);
Shared.textureManager().addTextureId(bitmap, id, false);
Shared.textureManager().addTextureId(bitmap, id, true);
bitmap.recycle();
addTexture(face, bitmap, id);
}
Expand Down

0 comments on commit 730bada

Please sign in to comment.