Skip to content

Commit

Permalink
separate material for glass roofs (avoids rendering artifacts that re…
Browse files Browse the repository at this point in the history
…sulted from setting wall textures' height to 0)
  • Loading branch information
tordanik committed Jan 9, 2013
1 parent 8d5b9c0 commit e6d4787
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/org/osm2world/core/target/common/material/Materials.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ private Materials() {}
new ConfMaterial(Lighting.FLAT, new Color(1f, 0.9f, 0.55f));
public static final ConfMaterial ROOF_DEFAULT =
new ConfMaterial(Lighting.FLAT, new Color(0.8f, 0, 0));
public static final ConfMaterial GLASS_ROOF =
new ConfMaterial(Lighting.FLAT, new Color(0.9f, 0.9f, 0.9f));
public static final ConfMaterial ENTRANCE_DEFAULT =
new ConfMaterial(Lighting.FLAT, new Color(0.2f, 0, 0));
public static final ConfMaterial GARAGE_DOORS =
Expand Down
4 changes: 2 additions & 2 deletions src/org/osm2world/core/world/modules/BuildingModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ private void setAttributes(boolean useBuildingColors,
if ("greenhouse".equals(buildingValue)) {
defaultLevels = 1;
defaultMaterialWall = Materials.GLASS;
defaultMaterialRoof = Materials.GLASS;
defaultMaterialRoof = Materials.GLASS_ROOF;
defaultMaterialWindows = null;
} else if ("garage".equals(buildingValue)
|| "garages".equals(buildingValue)) {
Expand Down Expand Up @@ -751,7 +751,7 @@ private Material buildMaterial(String materialString,
if ("brick".equals(materialString)) {
return Materials.BRICK;
} else if ("glass".equals(materialString)) {
return Materials.GLASS;
return roof ? Materials.GLASS_ROOF : Materials.GLASS;
} else if ("wood".equals(materialString)) {
return Materials.WOOD_WALL;
} else if (Materials.getSurfaceMaterial(materialString) != null) {
Expand Down

0 comments on commit e6d4787

Please sign in to comment.