Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Heightmap for Ogre 1 #180

Merged
merged 36 commits into from
Jan 30, 2021
Merged
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
cb3167b
Beginning heightmap
chapulina Oct 17, 2020
de0b976
More porting, compiles, but it's missing a manual object
chapulina Oct 23, 2020
0fe8dc1
hardcode some values, heightmap still not visible
chapulina Oct 27, 2020
f7263a1
save on pre-render, but pre-render is never called
chapulina Oct 28, 2020
43910f6
Make heightmap an object instead of geometry, process responses
chapulina Nov 20, 2020
3406e94
heightmap descriptor
chapulina Nov 21, 2020
b82646c
Move more properties to descriptor
chapulina Nov 23, 2020
1c3be50
tutorial, test
chapulina Nov 24, 2020
fe46003
const descriptor, more tweaks
chapulina Nov 25, 2020
12c788e
object -> geometry
chapulina Dec 15, 2020
428bb0f
support multiple heightmaps
chapulina Dec 16, 2020
0e07e31
PIMPLize HeightmapDescriptor
chapulina Dec 17, 2020
27cea92
add descriptor, multiple heightmaps working even when singleton is en…
chapulina Dec 17, 2020
5b08afe
split terrainsImported variable
chapulina Dec 17, 2020
b6a96ce
process responses until all terrains are loaded - this is needed on 1…
chapulina Dec 18, 2020
33f865d
codecheck
chapulina Dec 18, 2020
de6b0b7
fix compilation
chapulina Dec 18, 2020
be8c8a9
Fix caching
chapulina Dec 18, 2020
da98009
codecheck again
chapulina Dec 18, 2020
7c4ec70
tutorial image
chapulina Dec 18, 2020
324b66e
merged from main
chapulina Dec 18, 2020
b3efe1c
fix compilation
chapulina Dec 22, 2020
915fdd4
PR feedback
chapulina Jan 12, 2021
e447d00
Merge from main
chapulina Jan 12, 2021
a37be02
PR feedback
chapulina Jan 23, 2021
25fc071
clang warnings
chapulina Jan 23, 2021
990e3b7
Add default destructor
chapulina Jan 26, 2021
c73c404
default -> empty destructor
chapulina Jan 26, 2021
e425841
syntax
chapulina Jan 26, 2021
06f5900
Remove visibility for header-only class
chapulina Jan 27, 2021
005ec4f
merged from main
chapulina Jan 28, 2021
a045b1e
Windows warnings
chapulina Jan 28, 2021
999b93f
more warnings
chapulina Jan 28, 2021
5819e8e
Merge branch 'main' into chapulina/5/heightmap_single
chapulina Jan 29, 2021
295d8a5
move warning suppression and disable ogre1 test on Windows
chapulina Jan 29, 2021
5c423b3
fix build
chapulina Jan 29, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
more warnings
Signed-off-by: Louise Poubel <[email protected]>
chapulina committed Jan 28, 2021
commit 999b93fe57d5708a5f463ff5dcddc6f9ae4a660b
7 changes: 7 additions & 0 deletions include/ignition/rendering/HeightmapDescriptor.hh
Original file line number Diff line number Diff line change
@@ -20,6 +20,7 @@
#include <memory>
#include <string>
#include <ignition/common/HeightmapData.hh>
#include <ignition/common/SuppressWarning.hh>

#include "ignition/rendering/config.hh"
#include "ignition/rendering/Export.hh"
@@ -85,7 +86,9 @@ inline namespace IGNITION_RENDERING_VERSION_NAMESPACE {
public: void SetNormal(const std::string &_normal);

/// \brief Private data pointer.
IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
private: std::unique_ptr<HeightmapTexturePrivate> dataPtr;
IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
};

/// \brief Blend information to be used between textures on heightmaps.
@@ -132,7 +135,9 @@ inline namespace IGNITION_RENDERING_VERSION_NAMESPACE {
public: void SetFadeDistance(double _fadeDistance);

/// \brief Private data pointer.
IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
private: std::unique_ptr<HeightmapBlendPrivate> dataPtr;
IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
};

/// \class HeightmapDescriptor HeightmapDescriptor.hh
@@ -247,7 +252,9 @@ inline namespace IGNITION_RENDERING_VERSION_NAMESPACE {

/// \internal
/// \brief Private data
IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
private: std::unique_ptr<HeightmapDescriptorPrivate> dataPtr;
IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
};
}
}
10 changes: 10 additions & 0 deletions include/ignition/rendering/base/BaseHeightmap.hh
Original file line number Diff line number Diff line change
@@ -28,7 +28,17 @@ namespace ignition
//////////////////////////////////////////////////
template <class T>
class BaseHeightmap :
// Ignoring warning: "non dll-interface class
// 'ignition::rendering::v5::Heightmap' used as base for dll-interface class"
// because `Heightmap` is header-only
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable:4275)
#endif
public virtual Heightmap,
#ifdef _MSC_VER
#pragma warning(pop)
#endif
public virtual T
{
/// \brief Constructor
2 changes: 1 addition & 1 deletion ogre/src/OgreHeightmap.cc
Original file line number Diff line number Diff line change
@@ -2819,7 +2819,7 @@ void TerrainMaterial::Profile::updateParams(const Ogre::MaterialPtr &/*_mat*/,

//////////////////////////////////////////////////
void TerrainMaterial::Profile::updateParamsForCompositeMap(
const Ogre::MaterialPtr &/*_mat*/, const Ogre::Terrain */*_terrain*/)
const Ogre::MaterialPtr &/*_mat*/, const Ogre::Terrain * /*_terrain*/)
{
}