mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-08 04:31:08 -06:00
Support GDAL on non-Windows platforms
Fix compile fix with TileProviderManager Fix projection error on PlanetProjection
This commit is contained in:
@@ -128,13 +128,28 @@ create_new_module(
|
||||
${HEADER_FILES} ${SOURCE_FILES} ${SHADER_FILES}
|
||||
)
|
||||
|
||||
target_include_directories(
|
||||
openspace-module-globebrowsing
|
||||
SYSTEM PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ext/gdal/include
|
||||
)
|
||||
if (WIN32)
|
||||
target_include_directories(
|
||||
openspace-module-globebrowsing
|
||||
SYSTEM PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ext/gdal/include
|
||||
)
|
||||
|
||||
target_link_libraries(
|
||||
openspace-module-globebrowsing
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ext/gdal/lib/gdal_i.lib
|
||||
)
|
||||
target_link_libraries(
|
||||
openspace-module-globebrowsing
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ext/gdal/lib/gdal_i.lib
|
||||
)
|
||||
else (WIN32)
|
||||
find_package(GDAL REQUIRED)
|
||||
|
||||
target_include_directories(
|
||||
openspace-module-globebrowsing
|
||||
SYSTEM PUBLIC
|
||||
${GDAL_INCLUDE}
|
||||
)
|
||||
|
||||
target_link_libraries(
|
||||
openspace-module-globebrowsing
|
||||
${GDAL_LIBRARY}
|
||||
)
|
||||
endif ()
|
||||
|
||||
@@ -148,8 +148,8 @@ namespace openspace {
|
||||
}
|
||||
|
||||
void TileProviderManager::prerender() {
|
||||
for each (auto layerCategory in _layerCategories) {
|
||||
for each (auto tileProviderWithName in layerCategory) {
|
||||
for (auto layerCategory : _layerCategories) {
|
||||
for (auto tileProviderWithName : layerCategory) {
|
||||
if (tileProviderWithName.isActive) {
|
||||
tileProviderWithName.tileProvider->prerender();
|
||||
}
|
||||
@@ -162,7 +162,7 @@ namespace openspace {
|
||||
LayeredTextures::TextureCategory textureCategory)
|
||||
{
|
||||
std::vector<std::shared_ptr<TileProvider> > tileProviders;
|
||||
for each (auto tileProviderWithName in _layerCategories[textureCategory]) {
|
||||
for (auto tileProviderWithName : _layerCategories[textureCategory]) {
|
||||
if (tileProviderWithName.isActive) {
|
||||
tileProviders.push_back(tileProviderWithName.tileProvider);
|
||||
}
|
||||
|
||||
@@ -83,4 +83,7 @@ void main() {
|
||||
// to be fixed soon ---abock
|
||||
color = texture(projectionTexture, vec2(projected.x, 1-projected.y));
|
||||
}
|
||||
else {
|
||||
color = vec4(0.0);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user