forked from podsvirov/osgqtquick
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '11-feature_osg_shadow_qml_wrapper1' into 'master'
osg shadow qml wrapper Closes podsvirov#11 See merge request energid/osgqtquick!10 (cherry picked from commit 9d1a97e) 7a30081 ENHANCEMENT: 1) added few shadow wrapper classes for osgShadow classes.
- Loading branch information
Piyoosh Mukhija
committed
May 2, 2018
1 parent
5ee57b0
commit c152658
Showing
23 changed files
with
1,314 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Module configuration | ||
osgqtquick_imported_module("osgShadow") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#include <QtQml/QtQml> | ||
|
||
#include <osgShadow/ModuleQtQml> | ||
|
||
class osgShadowPlugin : public QQmlExtensionPlugin | ||
{ | ||
Q_OBJECT | ||
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") | ||
|
||
public: | ||
void registerTypes(const char *uri) | ||
{ | ||
Q_ASSERT(uri == QLatin1String("osgShadow")); | ||
// osgShadow types from osgQtQml library | ||
osgShadow::registerQtQmlTypes(uri); | ||
} | ||
}; | ||
|
||
#include "plugin.moc" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#include "module.hpp" | ||
|
||
#include "shadowedscene.hpp" | ||
#include "shadowtechnique.hpp" | ||
#include "shadowmap.hpp" | ||
|
||
#include <osgQtQuick/Version> | ||
#include <QtQml/QtQml> | ||
|
||
#include <QtCore/QDebug> | ||
|
||
namespace osgShadow { | ||
|
||
void registerQtQmlTypes(const char *uri) | ||
|
||
|
||
{ | ||
|
||
qmlRegisterType<ShadowedSceneQtQml>( | ||
uri, osgQtQuick_VERSION_MAJOR, osgQtQuick_VERSION_MINOR, | ||
"ShadowedScene"); | ||
|
||
qmlRegisterType<ShadowMapQtQml>( | ||
uri, osgQtQuick_VERSION_MAJOR, osgQtQuick_VERSION_MINOR, | ||
"ShadowMap"); | ||
|
||
qmlRegisterUncreatableType<ShadowTechniqueQtQml>( | ||
uri, osgQtQuick_VERSION_MAJOR, osgQtQuick_VERSION_MINOR, | ||
"ShadowTechnique", "[osgQtQuick] ShadowTechnique is Uncreatable"); | ||
|
||
|
||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#ifndef _OSGSHADOW_MODULE_QTQML_ | ||
#define _OSGSHADOW_MODULE_QTQML_ 1 | ||
|
||
#include <osgQtQml/Export> | ||
|
||
namespace osgShadow { | ||
|
||
OSGQTQML_EXPORT void registerQtQmlTypes(const char *uri); | ||
|
||
} | ||
|
||
#endif // _OSGSHADOW_MODULE_QTQML_ |
Oops, something went wrong.