mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-22 19:29:04 -05:00
Change properties and variables to opacity instead of transparency
This commit is contained in:
@@ -68,13 +68,6 @@ namespace {
|
||||
BlendModeAdditive
|
||||
};
|
||||
|
||||
constexpr openspace::properties::Property::PropertyInfo TransparencyInfo = {
|
||||
"Transparency",
|
||||
"Transparency",
|
||||
"This value is a multiplicative factor that is applied to the transparency of "
|
||||
"all points."
|
||||
};
|
||||
|
||||
constexpr openspace::properties::Property::PropertyInfo ScaleFactorInfo = {
|
||||
"ScaleFactor",
|
||||
"Scale Factor",
|
||||
@@ -200,12 +193,6 @@ documentation::Documentation RenderablePlanesCloud::Documentation() {
|
||||
"The path to the SPECK file that contains information about the "
|
||||
"astronomical object being rendered."
|
||||
},
|
||||
{
|
||||
TransparencyInfo.identifier,
|
||||
new DoubleVerifier,
|
||||
Optional::No,
|
||||
TransparencyInfo.description
|
||||
},
|
||||
{
|
||||
ScaleFactorInfo.identifier,
|
||||
new DoubleVerifier,
|
||||
@@ -297,7 +284,6 @@ documentation::Documentation RenderablePlanesCloud::Documentation() {
|
||||
|
||||
RenderablePlanesCloud::RenderablePlanesCloud(const ghoul::Dictionary& dictionary)
|
||||
: Renderable(dictionary)
|
||||
, _alphaValue(TransparencyInfo, 1.f, 0.f, 1.f)
|
||||
, _scaleFactor(ScaleFactorInfo, 1.f, 0.f, 10000.f)
|
||||
, _textColor(
|
||||
TextColorInfo,
|
||||
@@ -324,6 +310,8 @@ RenderablePlanesCloud::RenderablePlanesCloud(const ghoul::Dictionary& dictionary
|
||||
"RenderablePlanesCloud"
|
||||
);
|
||||
|
||||
addProperty(_opacity);
|
||||
|
||||
if (dictionary.hasKey(KeyFile)) {
|
||||
_speckFile = absPath(dictionary.value<std::string>(KeyFile));
|
||||
_hasSpeckFile = true;
|
||||
@@ -371,13 +359,6 @@ RenderablePlanesCloud::RenderablePlanesCloud(const ghoul::Dictionary& dictionary
|
||||
_unit = Meter;
|
||||
}
|
||||
|
||||
if (dictionary.hasKey(TransparencyInfo.identifier)) {
|
||||
_alphaValue = static_cast<float>(
|
||||
dictionary.value<double>(TransparencyInfo.identifier)
|
||||
);
|
||||
}
|
||||
addProperty(_alphaValue);
|
||||
|
||||
if (dictionary.hasKey(ScaleFactorInfo.identifier)) {
|
||||
_scaleFactor = static_cast<float>(
|
||||
dictionary.value<double>(ScaleFactorInfo.identifier)
|
||||
@@ -580,7 +561,7 @@ void RenderablePlanesCloud::renderPlanes(const RenderData&,
|
||||
_uniformCache.modelViewProjectionTransform,
|
||||
modelViewProjectionMatrix
|
||||
);
|
||||
_program->setUniform(_uniformCache.alphaValue, _alphaValue);
|
||||
_program->setUniform(_uniformCache.alphaValue, _opacity);
|
||||
_program->setUniform(_uniformCache.fadeInValue, fadeInVariable);
|
||||
|
||||
GLint viewport[4];
|
||||
|
||||
Reference in New Issue
Block a user