Add ConfigVariableColor

This commit is contained in:
rdb 2015-02-05 13:34:52 +01:00
parent 3bf2a0f814
commit eaabc1bfa5
15 changed files with 315 additions and 59 deletions

View File

@ -52,6 +52,9 @@ operator << (ostream &out, ConfigFlags::ValueType type) {
case ConfigFlags::VT_int64: case ConfigFlags::VT_int64:
return out << "int64"; return out << "int64";
case ConfigFlags::VT_color:
return out << "color";
} }
return out << "**invalid(" << (int)type << ")**"; return out << "**invalid(" << (int)type << ")**";

View File

@ -39,6 +39,7 @@ PUBLISHED:
VT_enum, VT_enum,
VT_search_path, VT_search_path,
VT_int64, VT_int64,
VT_color,
}; };
enum VariableFlags { enum VariableFlags {
@ -75,4 +76,3 @@ ostream &operator << (ostream &out, ConfigFlags::ValueType type);
#include "configFlags.I" #include "configFlags.I"
#endif #endif

View File

@ -451,8 +451,8 @@ ConfigVariableDouble pixel_zoom
("pixel-zoom", 1.0, ("pixel-zoom", 1.0,
PRC_DESC("The default pixel_zoom factor for new windows.")); PRC_DESC("The default pixel_zoom factor for new windows."));
ConfigVariableDouble background_color ConfigVariableColor background_color
("background-color", "0.41 0.41 0.41", ("background-color", "0.41 0.41 0.41 0.0",
PRC_DESC("Specifies the rgb(a) value of the default background color for a " PRC_DESC("Specifies the rgb(a) value of the default background color for a "
"new window or offscreen buffer.")); "new window or offscreen buffer."));

View File

@ -24,6 +24,7 @@
#include "configVariableInt.h" #include "configVariableInt.h"
#include "configVariableEnum.h" #include "configVariableEnum.h"
#include "configVariableFilename.h" #include "configVariableFilename.h"
#include "configVariableColor.h"
#include "coordinateSystem.h" #include "coordinateSystem.h"
#include "dconfig.h" #include "dconfig.h"
@ -107,7 +108,7 @@ extern EXPCL_PANDA_DISPLAY ConfigVariableInt back_buffers;
extern EXPCL_PANDA_DISPLAY ConfigVariableDouble pixel_zoom; extern EXPCL_PANDA_DISPLAY ConfigVariableDouble pixel_zoom;
extern EXPCL_PANDA_DISPLAY ConfigVariableDouble background_color; extern EXPCL_PANDA_DISPLAY ConfigVariableColor background_color;
extern EXPCL_PANDA_DISPLAY ConfigVariableBool sync_video; extern EXPCL_PANDA_DISPLAY ConfigVariableBool sync_video;
extern EXPCL_PANDA_DISPLAY ConfigVariableBool basic_shaders_only; extern EXPCL_PANDA_DISPLAY ConfigVariableBool basic_shaders_only;

View File

@ -163,29 +163,7 @@ GraphicsOutput(GraphicsEngine *engine, GraphicsPipe *pipe,
set_clear_color_active(true); set_clear_color_active(true);
set_clear_depth_active(true); set_clear_depth_active(true);
set_clear_stencil_active(true); set_clear_stencil_active(true);
set_clear_color(background_color.get_value());
switch (background_color.get_num_words()) {
case 1:
set_clear_color(LColor(background_color[0], background_color[0], background_color[0], 0.0f));
break;
case 2:
set_clear_color(LColor(background_color[0], background_color[0], background_color[0], background_color[1]));
break;
case 3:
set_clear_color(LColor(background_color[0], background_color[1], background_color[2], 0.0f));
break;
case 4:
set_clear_color(LColor(background_color[0], background_color[1], background_color[2], background_color[3]));
break;
default:
display_cat.warning()
<< "Invalid background-color specification: "
<< background_color.get_string_value() << "\n";
}
} }
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////

View File

@ -12,6 +12,7 @@
aa_luse.h \ aa_luse.h \
compose_matrix.h compose_matrix_src.I \ compose_matrix.h compose_matrix_src.I \
compose_matrix_src.cxx compose_matrix_src.h config_linmath.h \ compose_matrix_src.cxx compose_matrix_src.h config_linmath.h \
configVariableColor.h configVariableColor.I \
coordinateSystem.h dbl2fltnames.h dblnames.h \ coordinateSystem.h dbl2fltnames.h dblnames.h \
deg_2_rad.h deg_2_rad.I \ deg_2_rad.h deg_2_rad.I \
flt2dblnames.h fltnames.h intnames.h lcast_to.h lcast_to_src.h \ flt2dblnames.h fltnames.h intnames.h lcast_to.h lcast_to_src.h \
@ -43,8 +44,8 @@
mathNumbers.h mathNumbers.I mathNumbers.h mathNumbers.I
#define INCLUDED_SOURCES \ #define INCLUDED_SOURCES \
compose_matrix.cxx config_linmath.cxx coordinateSystem.cxx \ compose_matrix.cxx config_linmath.cxx configVariableColor.cxx \
lmatrix.cxx \ coordinateSystem.cxx lmatrix.cxx \
lorientation.cxx lpoint2.cxx \ lorientation.cxx lpoint2.cxx \
lpoint3.cxx lpoint4.cxx lquaternion.cxx lrotation.cxx \ lpoint3.cxx lpoint4.cxx lquaternion.cxx lrotation.cxx \
luse.cxx lvecBase2.cxx lvecBase3.cxx lvecBase4.cxx \ luse.cxx lvecBase2.cxx lvecBase3.cxx lvecBase4.cxx \
@ -53,7 +54,9 @@
#define INSTALL_HEADERS \ #define INSTALL_HEADERS \
aa_luse.h \ aa_luse.h \
compose_matrix.h compose_matrix_src.I \ compose_matrix.h compose_matrix_src.I \
compose_matrix_src.h config_linmath.h coordinateSystem.h \ compose_matrix_src.h config_linmath.h \
configVariableColor.h configVariableColor.I \
coordinateSystem.h \
dbl2fltnames.h dblnames.h \ dbl2fltnames.h dblnames.h \
deg_2_rad.h deg_2_rad.I \ deg_2_rad.h deg_2_rad.I \
flt2dblnames.h fltnames.h intnames.h lcast_to.h lcast_to_src.I lcast_to_src.h \ flt2dblnames.h fltnames.h intnames.h lcast_to.h lcast_to_src.I lcast_to_src.h \

View File

@ -0,0 +1,182 @@
// Filename: configVariableColor.I
// Created by: rdb (02Feb14)
//
////////////////////////////////////////////////////////////////////
//
// PANDA 3D SOFTWARE
// Copyright (c) Carnegie Mellon University. All rights reserved.
//
// All use of this software is subject to the terms of the revised BSD
// license. You should have received a copy of this license along
// with this source code in a file named "LICENSE."
//
////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////
// Function: ConfigVariableColor::Constructor
// Access: Published
// Description:
////////////////////////////////////////////////////////////////////
INLINE ConfigVariableColor::
ConfigVariableColor(const string &name) :
ConfigVariable(name, VT_color),
_local_modified(initial_invalid_cache()),
_cache(0, 0, 0, 1)
{
_core->set_used();
}
////////////////////////////////////////////////////////////////////
// Function: ConfigVariableColor::Constructor
// Access: Published
// Description:
////////////////////////////////////////////////////////////////////
INLINE ConfigVariableColor::
ConfigVariableColor(const string &name, const LColor &default_value,
const string &description, int flags) :
#ifdef PRC_SAVE_DESCRIPTIONS
ConfigVariable(name, ConfigVariableCore::VT_color, description, flags),
#else
ConfigVariable(name, ConfigVariableCore::VT_color, string(), flags),
#endif
_local_modified(initial_invalid_cache()),
_cache(0, 0, 0, 1)
{
set_default_value(default_value);
_core->set_used();
}
////////////////////////////////////////////////////////////////////
// Function: ConfigVariableColor::Constructor
// Access: Published
// Description:
////////////////////////////////////////////////////////////////////
INLINE ConfigVariableColor::
ConfigVariableColor(const string &name, const string &default_value,
const string &description, int flags) :
#ifdef PRC_SAVE_DESCRIPTIONS
ConfigVariable(name, ConfigVariableCore::VT_color, description, flags),
#else
ConfigVariable(name, ConfigVariableCore::VT_color, string(), flags),
#endif
_local_modified(initial_invalid_cache()),
_cache(0, 0, 0, 1)
{
_core->set_default_value(default_value);
_core->set_used();
}
////////////////////////////////////////////////////////////////////
// Function: ConfigVariableColor::operator =
// Access: Published
// Description: Reassigns the variable's local value.
////////////////////////////////////////////////////////////////////
INLINE void ConfigVariableColor::
operator = (const LColor &value) {
set_value(value);
}
////////////////////////////////////////////////////////////////////
// Function: ConfigVariableColor::typecast operator
// Access: Published
// Description: Returns the variable's value.
////////////////////////////////////////////////////////////////////
INLINE ConfigVariableColor::
operator const LColor & () const {
return get_value();
}
////////////////////////////////////////////////////////////////////
// Function: ConfigVariableColor::operator []
// Access: Published
// Description: Returns the value of the color's nth component
// (which is not necessarily the same thing as the
// variable's nth word).
////////////////////////////////////////////////////////////////////
INLINE PN_stdfloat ConfigVariableColor::
operator [] (int n) const {
return get_value()[n];
}
////////////////////////////////////////////////////////////////////
// Function: ConfigVariableColor::set_value
// Access: Published
// Description: Reassigns the variable's local value.
////////////////////////////////////////////////////////////////////
INLINE void ConfigVariableColor::
set_value(const LColor &color) {
set_string_value("");
set_double_word(0, color[0]);
set_double_word(1, color[1]);
set_double_word(2, color[2]);
set_double_word(3, color[3]);
}
////////////////////////////////////////////////////////////////////
// Function: ConfigVariableColor::get_value
// Access: Published
// Description: Returns the variable's value.
////////////////////////////////////////////////////////////////////
INLINE const LColor &ConfigVariableColor::
get_value() const {
TAU_PROFILE("const LColor &ConfigVariableColor::get_value() const", " ", TAU_USER);
if (!is_cache_valid(_local_modified)) {
mark_cache_valid(_local_modified);
switch (get_num_words()) {
case 1:
_cache.set(get_double_word(0), get_double_word(0), get_double_word(0), 1);
break;
case 2:
_cache.set(get_double_word(0), get_double_word(0), get_double_word(0), get_double_word(1));
break;
case 3:
_cache.set(get_double_word(0), get_double_word(1), get_double_word(2), 1);
break;
case 4:
_cache.set(get_double_word(0), get_double_word(1), get_double_word(2), get_double_word(3));
break;
default:
prc_cat->warning()
<< "Invalid color value for ConfigVariable "
<< get_name() << ": " << get_string_value() << "\n";
}
}
return _cache;
}
////////////////////////////////////////////////////////////////////
// Function: ConfigVariableColor::get_default_value
// Access: Published
// Description: Returns the variable's default value.
////////////////////////////////////////////////////////////////////
INLINE LColor ConfigVariableColor::
get_default_value() const {
const ConfigDeclaration *decl = ConfigVariable::get_default_value();
if (decl != (ConfigDeclaration *)NULL) {
switch (decl->get_num_words()) {
case 1:
return LColor(decl->get_double_word(0), decl->get_double_word(0),
decl->get_double_word(0), 1);
case 2:
return LColor(decl->get_double_word(0), decl->get_double_word(0),
decl->get_double_word(0), decl->get_double_word(1));
case 3:
return LColor(decl->get_double_word(0), decl->get_double_word(1),
decl->get_double_word(2), 1);
case 4:
return LColor(decl->get_double_word(0), decl->get_double_word(1),
decl->get_double_word(2), decl->get_double_word(3));
default:
prc_cat->warning()
<< "Invalid default color value for ConfigVariable "
<< get_name() << ": " << decl->get_string_value() << "\n";
}
}
return LColor(0, 0, 0, 1);
}

View File

@ -0,0 +1,28 @@
// Filename: configVariableColor.cxx
// Created by: rdb (02Feb14)
//
////////////////////////////////////////////////////////////////////
//
// PANDA 3D SOFTWARE
// Copyright (c) Carnegie Mellon University. All rights reserved.
//
// All use of this software is subject to the terms of the revised BSD
// license. You should have received a copy of this license along
// with this source code in a file named "LICENSE."
//
////////////////////////////////////////////////////////////////////
#include "configVariableColor.h"
////////////////////////////////////////////////////////////////////
// Function: ConfigVariableColor::set_default_value
// Access: Private
// Description:
////////////////////////////////////////////////////////////////////
void ConfigVariableColor::
set_default_value(const LColor &default_value) {
ostringstream strm;
strm << default_value;
_core->set_default_value(strm.str());
}

View File

@ -0,0 +1,69 @@
// Filename: configVariableColor.h
// Created by: rdb (02Feb14)
//
////////////////////////////////////////////////////////////////////
//
// PANDA 3D SOFTWARE
// Copyright (c) Carnegie Mellon University. All rights reserved.
//
// All use of this software is subject to the terms of the revised BSD
// license. You should have received a copy of this license along
// with this source code in a file named "LICENSE."
//
////////////////////////////////////////////////////////////////////
#ifndef CONFIGVARIABLECOLOR_H
#define CONFIGVARIABLECOLOR_H
#include "dtoolbase.h"
#include "config_linmath.h"
#include "config_prc.h"
#include "configVariable.h"
#include "luse.h"
////////////////////////////////////////////////////////////////////
// Class : ConfigVariableColor
// Description : This is a convenience class to specialize
// ConfigVariable as a set of floating-point types
// representing a color value.
//
// It interprets the color differently depending on
// how many words were specified: if only one, it
// is interpreted as a shade of gray with alpha 1.
// If two values were specified, a grayscale and
// alpha pair. If three, a set of R, G, B values
// with alpha 1, and if four, a complete RGBA color.
//
// This isn't defined in dtool because it relies on
// the LColor class, which is defined in linmath.
////////////////////////////////////////////////////////////////////
class EXPCL_PANDA_LINMATH ConfigVariableColor : public ConfigVariable {
PUBLISHED:
INLINE ConfigVariableColor(const string &name);
INLINE ConfigVariableColor(const string &name, const LColor &default_value,
const string &description = string(),
int flags = 0);
INLINE ConfigVariableColor(const string &name, const string &default_value,
const string &description = string(),
int flags = 0);
INLINE void operator = (const LColor &value);
INLINE operator const LColor & () const;
INLINE PN_stdfloat operator [] (int n) const;
INLINE void set_value(const LColor &value);
INLINE const LColor &get_value() const;
INLINE LColor get_default_value() const;
private:
void set_default_value(const LColor &default_value);
private:
mutable AtomicAdjust::Integer _local_modified;
mutable LColor _cache;
};
#include "configVariableColor.I"
#endif

View File

@ -1,5 +1,6 @@
#include "compose_matrix.cxx" #include "compose_matrix.cxx"
#include "configVariableColor.cxx"
#include "config_linmath.cxx" #include "config_linmath.cxx"
#include "coordinateSystem.cxx" #include "coordinateSystem.cxx"
#include "lmatrix.cxx" #include "lmatrix.cxx"

View File

@ -17,7 +17,7 @@
#include "cullResult.h" #include "cullResult.h"
#include "config_pgraph.h" #include "config_pgraph.h"
#include "string_utils.h" #include "string_utils.h"
#include "configVariableColor.h"
CullBinManager *CullBinManager::_global_ptr = (CullBinManager *)NULL; CullBinManager *CullBinManager::_global_ptr = (CullBinManager *)NULL;
@ -111,24 +111,13 @@ add_bin(const string &name, BinType type, int sort) {
#ifndef NDEBUG #ifndef NDEBUG
// Check if there was a flash color configured for this bin name. // Check if there was a flash color configured for this bin name.
ConfigVariableDouble flash_bin ConfigVariableColor flash_bin
("flash-bin-" + name, "", "", ConfigVariable::F_dynamic); ("flash-bin-" + name, "", "", ConfigVariable::F_dynamic);
if (flash_bin.get_num_words() == 0) { if (flash_bin.get_num_words() == 0) {
def._flash_active = false; def._flash_active = false;
} else if (flash_bin.get_num_words() == 3) {
def._flash_active = true;
def._flash_color.set(flash_bin[0], flash_bin[1], flash_bin[2], 1.0f);
} else if (flash_bin.get_num_words() == 4) {
def._flash_active = true;
def._flash_color.set(flash_bin[0], flash_bin[1], flash_bin[2], flash_bin[3]);
} else { } else {
def._flash_active = false; def._flash_active = true;
pgraph_cat.warning() def._flash_color = flash_bin.get_value();
<< "Invalid value for flash-bin-" << name << ": "
<< flash_bin.get_string_value() << "\n";
} }
#endif #endif

View File

@ -17,6 +17,7 @@
#include "pStatClient.h" #include "pStatClient.h"
#include "config_pstats.h" #include "config_pstats.h"
#include "configVariableBool.h" #include "configVariableBool.h"
#include "configVariableColor.h"
#include "configVariableDouble.h" #include "configVariableDouble.h"
#include "configVariableInt.h" #include "configVariableInt.h"
#include "configVariableString.h" #include "configVariableString.h"
@ -339,8 +340,8 @@ initialize_collector_def(const PStatClient *client, PStatCollectorDef *def) {
("pstats-units-" + config_name, def->_level_units, "", ConfigVariable::F_dynamic); ("pstats-units-" + config_name, def->_level_units, "", ConfigVariable::F_dynamic);
ConfigVariableDouble pstats_factor ConfigVariableDouble pstats_factor
("pstats-factor-" + config_name, 1.0, "", ConfigVariable::F_dynamic); ("pstats-factor-" + config_name, 1.0, "", ConfigVariable::F_dynamic);
ConfigVariableDouble pstats_color ConfigVariableColor pstats_color
("pstats-color-" + config_name, 0.0, "", ConfigVariable::F_dynamic); ("pstats-color-" + config_name, LColor::zero(), "", ConfigVariable::F_dynamic);
if (pstats_active.has_value()) { if (pstats_active.has_value()) {
def->_is_active = pstats_active; def->_is_active = pstats_active;

View File

@ -116,11 +116,11 @@ ConfigVariableDouble speedtree_fog_distance
PRC_DESC("Specifies the nearest and farthest distance of the fog on trees " PRC_DESC("Specifies the nearest and farthest distance of the fog on trees "
"and terrain.")); "and terrain."));
ConfigVariableDouble speedtree_fog_color ConfigVariableColor speedtree_fog_color
("speedtree-fog-color", "1.0 1.0 1.0", ("speedtree-fog-color", "1.0 1.0 1.0",
PRC_DESC("Specifies the r g b color of SpeedTree fog.")); PRC_DESC("Specifies the r g b color of SpeedTree fog."));
ConfigVariableDouble speedtree_sky_color ConfigVariableColor speedtree_sky_color
("speedtree-sky-color", "0.2 0.3 0.5", ("speedtree-sky-color", "0.2 0.3 0.5",
PRC_DESC("Specifies the r g b color of the SpeedTree sky, when the sky " PRC_DESC("Specifies the r g b color of the SpeedTree sky, when the sky "
"is enabled. Currently unused.")); "is enabled. Currently unused."));
@ -129,7 +129,7 @@ ConfigVariableDouble speedtree_sky_fog
("speedtree-sky-fog", "-0.5 1.0", ("speedtree-sky-fog", "-0.5 1.0",
PRC_DESC("Specifies the range of fog in the sky. -1 is down, 1 is up.")); PRC_DESC("Specifies the range of fog in the sky. -1 is down, 1 is up."));
ConfigVariableDouble speedtree_sun_color ConfigVariableColor speedtree_sun_color
("speedtree-sun-color", "1.0 1.0 0.85", ("speedtree-sun-color", "1.0 1.0 0.85",
PRC_DESC("Specifies the r g b color of the SpeedTree sun, when the sun " PRC_DESC("Specifies the r g b color of the SpeedTree sun, when the sun "
"is enabled. Currently unused.")); "is enabled. Currently unused."));
@ -146,12 +146,12 @@ ConfigVariableDouble speedtree_sun_fog_bloom
("speedtree-sun-fog-bloom", 0.0, ("speedtree-sun-fog-bloom", 0.0,
PRC_DESC("Undocumented SpeedTree parameter.")); PRC_DESC("Undocumented SpeedTree parameter."));
ConfigVariableDouble speedtree_specular_color ConfigVariableColor speedtree_specular_color
("speedtree-specular-color", "1 1 1", ("speedtree-specular-color", "1 1 1",
PRC_DESC("Specifies the r g b color of the specular reflections on SpeedTree " PRC_DESC("Specifies the r g b color of the specular reflections on SpeedTree "
"surfaces.")); "surfaces."));
ConfigVariableDouble speedtree_emissive_color ConfigVariableColor speedtree_emissive_color
("speedtree-emissive-color", "0 0 0", ("speedtree-emissive-color", "0 0 0",
PRC_DESC("Specifies the r g b color of the emissive light effect on SpeedTree " PRC_DESC("Specifies the r g b color of the emissive light effect on SpeedTree "
"surfaces.")); "surfaces."));

View File

@ -22,6 +22,7 @@
#include "configVariableString.h" #include "configVariableString.h"
#include "configVariableInt.h" #include "configVariableInt.h"
#include "configVariableFilename.h" #include "configVariableFilename.h"
#include "configVariableColor.h"
NotifyCategoryDecl(speedtree, EXPCL_PANDASPEEDTREE, EXPTP_PANDASPEEDTREE); NotifyCategoryDecl(speedtree, EXPCL_PANDASPEEDTREE, EXPTP_PANDASPEEDTREE);
@ -43,16 +44,16 @@ extern ConfigVariableBool speedtree_detail_normal_mapping;
extern ConfigVariableBool speedtree_ambient_contrast; extern ConfigVariableBool speedtree_ambient_contrast;
extern ConfigVariableDouble speedtree_transmission_scalar; extern ConfigVariableDouble speedtree_transmission_scalar;
extern ConfigVariableDouble speedtree_fog_distance; extern ConfigVariableDouble speedtree_fog_distance;
extern ConfigVariableDouble speedtree_fog_color; extern ConfigVariableColor speedtree_fog_color;
extern ConfigVariableDouble speedtree_sky_color; extern ConfigVariableColor speedtree_sky_color;
extern ConfigVariableDouble speedtree_sky_fog_min; extern ConfigVariableDouble speedtree_sky_fog_min;
extern ConfigVariableDouble speedtree_sky_fog_max; extern ConfigVariableDouble speedtree_sky_fog_max;
extern ConfigVariableDouble speedtree_sun_color; extern ConfigVariableColor speedtree_sun_color;
extern ConfigVariableDouble speedtree_sun_size; extern ConfigVariableDouble speedtree_sun_size;
extern ConfigVariableDouble speedtree_sun_spread_exponent; extern ConfigVariableDouble speedtree_sun_spread_exponent;
extern ConfigVariableDouble speedtree_sun_fog_bloom; extern ConfigVariableDouble speedtree_sun_fog_bloom;
extern ConfigVariableDouble speedtree_specular_color; extern ConfigVariableColor speedtree_specular_color;
extern ConfigVariableDouble speedtree_emissive_color; extern ConfigVariableColor speedtree_emissive_color;
extern ConfigVariableInt speedtree_shadow_map_resolution; extern ConfigVariableInt speedtree_shadow_map_resolution;
extern ConfigVariableDouble speedtree_cascading_shadow_splits; extern ConfigVariableDouble speedtree_cascading_shadow_splits;
extern ConfigVariableBool speedtree_smooth_shadows; extern ConfigVariableBool speedtree_smooth_shadows;

View File

@ -719,8 +719,8 @@ reload_config() {
render_info.m_nMaxBillboardImagesByBase = speedtree_max_billboard_images_by_base; render_info.m_nMaxBillboardImagesByBase = speedtree_max_billboard_images_by_base;
render_info.m_fVisibility = speedtree_visibility; render_info.m_fVisibility = speedtree_visibility;
render_info.m_fGlobalLightScalar = speedtree_global_light_scalar; render_info.m_fGlobalLightScalar = speedtree_global_light_scalar;
render_info.m_sLightMaterial.m_vSpecular = SpeedTree::Vec4(speedtree_specular_color[0], speedtree_specular_color[1], speedtree_specular_color[2], 1.0f); render_info.m_sLightMaterial.m_vSpecular = SpeedTree::Vec4(speedtree_specular_color[0], speedtree_specular_color[1], speedtree_specular_color[2], speedtree_specular_color[3]);
render_info.m_sLightMaterial.m_vEmissive = SpeedTree::Vec4(speedtree_emissive_color[0], speedtree_emissive_color[1], speedtree_emissive_color[2], 1.0f); render_info.m_sLightMaterial.m_vEmissive = SpeedTree::Vec4(speedtree_emissive_color[0], speedtree_emissive_color[1], speedtree_emissive_color[2], speedtree_emissive_color[3]);
render_info.m_bSpecularLighting = speedtree_specular_lighting; render_info.m_bSpecularLighting = speedtree_specular_lighting;
render_info.m_bTransmissionLighting = speedtree_transmission_lighting; render_info.m_bTransmissionLighting = speedtree_transmission_lighting;
render_info.m_bDetailLayer = speedtree_detail_layer; render_info.m_bDetailLayer = speedtree_detail_layer;