Skip to content

Commit

Permalink
Merge branch 'master' into topic-xml
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonbeverage committed Jan 16, 2015
2 parents 5c87db7 + c04bb83 commit 815cc7c
Show file tree
Hide file tree
Showing 45 changed files with 1,947 additions and 825 deletions.
18 changes: 17 additions & 1 deletion CMakeModules/ConfigureShaders.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,28 @@ set(template_file "@TEMPLATE_FILE@")
set(output_cpp_file "@OUTPUT_CPP_FILE@")

# modify the contents for inlining; replace input with output (var: file)
# i.e., the file name (in the form @my_file_name@) gets replaced with the
# actual contents of the named file and then processed a bit.
foreach(file ${glsl_files})
file(READ ${source_dir}/${file} contents)

# read the file into 'contents':
file(READ ${source_dir}/${file} contents)

# append a newline so we do not break the MULTILINE macro when the last line
# of the file is a comment:
set(contents "${contents}\n")

# replace hashtags with a marker string to avoid breaking the MULTILINE macro:
string(REGEX REPLACE "#" "$__HASHTAG__" tempString "${contents}")

# replace newlines with printable newlines, and overwrite the original
# file name with the processed contents.
string(REGEX REPLACE "\n" "\\\\n\n" ${file} "${tempString}")

endforeach(file)

# send the processed glsl_files to the next template to create the
# shader source file.
configure_file(
${source_dir}/${template_file}
${output_cpp_file}
Expand Down
9 changes: 5 additions & 4 deletions CMakeModules/OsgEarthMacroUtils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,9 @@ MACRO(SETUP_EXTENSION PLUGIN_NAME)

#MESSAGE("in -->SETUP_EXTENSION<-- ${TARGET_NAME}-->${TARGET_SRC} <--> ${TARGET_H}<--")

SOURCE_GROUP( "Header Files" FILES ${TARGET_H} )
SOURCE_GROUP( "Shader Files" FILES ${TARGET_GLSL} )
SOURCE_GROUP( "Header Files" FILES ${TARGET_H} )
SOURCE_GROUP( "Shader Files" FILES ${TARGET_GLSL} )
SOURCe_GROUP( "Template Files" FILES ${TARGET_IN} )

## we have set up the target label and targetname by taking into account global prefix (osgdb_)

Expand All @@ -283,9 +284,9 @@ MACRO(SETUP_EXTENSION PLUGIN_NAME)
# here we use the command to generate the library

IF (DYNAMIC_OSGEARTH)
ADD_LIBRARY(${TARGET_TARGETNAME} MODULE ${TARGET_SRC} ${TARGET_H} ${TARGET_GLSL})
ADD_LIBRARY(${TARGET_TARGETNAME} MODULE ${TARGET_SRC} ${TARGET_H} ${TARGET_GLSL} ${TARGET_IN})
ELSE (DYNAMIC_OSGEARTH)
ADD_LIBRARY(${TARGET_TARGETNAME} STATIC ${TARGET_SRC} ${TARGET_H} ${TARGET_GLSL})
ADD_LIBRARY(${TARGET_TARGETNAME} STATIC ${TARGET_SRC} ${TARGET_H} ${TARGET_GLSL} ${TARGET_IN})
ENDIF(DYNAMIC_OSGEARTH)

#not sure if needed, but for plugins only msvc need the d suffix
Expand Down
121 changes: 0 additions & 121 deletions data/splat/GLOBCOVER_legend.json

This file was deleted.

98 changes: 98 additions & 0 deletions data/splat/GLOBCOVER_legend.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
<legend>
<name>GLOBCOVER 2009</name>
<source>GLOBCOVER_L4_200901_200912_V2.3_tiled.tif</source>
<mappings>
<mapping value="11"
class="clopland1"
name="Post-flooding or irrigated croplands (or aquatic)" />

<mapping value="14"
class="cropland2"
name="Rainfed croplands" />

<mapping value="20"
class="cropland3"
name="Mosaic cropland (50-70%) / vegetation (grassland/shrubland/forest) (20-50%)"/>

<mapping value="30"
class="cropland4"
name="Mosaic vegetation (grassland/shrubland/forest) (50-70%) / cropland (20-50%)"/>

<mapping value="40"
class="forest1"
name="Closed to open (>15%) broadleaved evergreen or semi-deciduous forest (>5m)"/>

<mapping value="50"
class="forest2"
name="Closed (>40%) broadleaved deciduous forest (>5m)"/>

<mapping value="60"
class="forest3"
name="Open (15-40%) broadleaved deciduous forest/woodland (>5m)"/>

<mapping value="70"
class="forest4"
name="Closed (>40%) needleleaved evergreen forest (>5m)"/>

<mapping value="90"
class="forest"
name="Open (15-40%) needleleaved deciduous or evergreen forest (>5m)"/>

<mapping value="100"
class="forest"
name="Closed to open (>15%) mixed broadleaved and needleleaved forest (>5m)"/>

<mapping value="110"
class="grassland"
name="Mosaic forest or shrubland (50-70%) / grassland (20-50%)"/>

<mapping value="120"
class="grassland2"
name="Mosaic grassland (50-70%) / forest or shrubland (20-50)"/>

<mapping value="130"
class="savanna"
name="Mosaic grassland (50-70%) / forest or shrubland (20-50)"/>

<mapping value="140"
class="savanna"
name="Closed to open (>15%) (broadleaved or needleleaved, evergreen or deciduous) shrubland (<5m)"/>

<mapping value="150"
class="savanna"
name="Sparse (<15%) vegetation"/>

<mapping value="160"
class="swamp"
name="Closed to open (>15%) broadleaved forest regularly flooded (semi-permanently or temporarily) - Fresh or brackish water"/>

<mapping value="170"
class="swamp"
name="Closed (>40%) broadleaved forest or shrubland permanently flooded - Saline or brackish water"/>

<mapping value="180"
class="swamp"
name="Closed to open (>15%) grassland or woody vegetation on regularly flooded or waterlogged soil - Fresh, brackish or saline water"/>

<mapping value="190"
class="urban"
name="Artificial surfaces and associated areas (Urban areas >50%)"/>

<mapping value="200"
class="desert"
name="Bare areas"/>

<mapping value="210"
class="water"
name="Water bodies"/>

<mapping value="220"
class="tundra"
name="Permanent snow and ice"/>

<mapping value="230"
class="water"
name="No data"/>
</mappings>
</legend>

14 changes: 14 additions & 0 deletions data/splat/splat_biomes.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<biomes version="1">

<biome name="Australia">
<catalog>splat_catalog_au.xml</catalog>
<regions>
<region xmin="112" xmax="154" ymin="-43.5" ymax="-11.16" zmax="1e6"/>
</regions>
</biome>

<biome name="Default">
<catalog>splat_catalog.xml</catalog>
</biome>

</biomes>

0 comments on commit 815cc7c

Please sign in to comment.