mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
prepare for slot-based renderstate
This commit is contained in:
parent
fe03880283
commit
656fb8d683
@ -421,7 +421,7 @@ convert_triangles(const GeomVertexData *vertex_data,
|
|||||||
|
|
||||||
// Check for a color scale.
|
// Check for a color scale.
|
||||||
LVecBase4f color_scale(1.0f, 1.0f, 1.0f, 1.0f);
|
LVecBase4f color_scale(1.0f, 1.0f, 1.0f, 1.0f);
|
||||||
const ColorScaleAttrib *csa = net_state->get_color_scale();
|
const ColorScaleAttrib *csa = DCAST(ColorScaleAttrib, net_state->get_attrib(ColorScaleAttrib::get_class_type()));
|
||||||
if (csa != (const ColorScaleAttrib *)NULL) {
|
if (csa != (const ColorScaleAttrib *)NULL) {
|
||||||
color_scale = csa->get_scale();
|
color_scale = csa->get_scale();
|
||||||
}
|
}
|
||||||
@ -430,7 +430,7 @@ convert_triangles(const GeomVertexData *vertex_data,
|
|||||||
bool has_color_override = false;
|
bool has_color_override = false;
|
||||||
bool has_color_off = false;
|
bool has_color_off = false;
|
||||||
Colorf color_override;
|
Colorf color_override;
|
||||||
const ColorAttrib *ca = net_state->get_color();
|
const ColorAttrib *ca = DCAST(ColorAttrib, net_state->get_attrib(ColorAttrib::get_class_type()));
|
||||||
if (ca != (const ColorAttrib *)NULL) {
|
if (ca != (const ColorAttrib *)NULL) {
|
||||||
if (ca->get_color_type() == ColorAttrib::T_flat) {
|
if (ca->get_color_type() == ColorAttrib::T_flat) {
|
||||||
has_color_override = true;
|
has_color_override = true;
|
||||||
@ -447,7 +447,7 @@ convert_triangles(const GeomVertexData *vertex_data,
|
|||||||
|
|
||||||
// Check for a texture.
|
// Check for a texture.
|
||||||
EggTexture *egg_tex = (EggTexture *)NULL;
|
EggTexture *egg_tex = (EggTexture *)NULL;
|
||||||
const TextureAttrib *ta = net_state->get_texture();
|
const TextureAttrib *ta = DCAST(TextureAttrib, net_state->get_attrib(TextureAttrib::get_class_type()));
|
||||||
if (ta != (const TextureAttrib *)NULL) {
|
if (ta != (const TextureAttrib *)NULL) {
|
||||||
egg_tex = get_egg_texture(ta->get_texture());
|
egg_tex = get_egg_texture(ta->get_texture());
|
||||||
}
|
}
|
||||||
|
@ -351,7 +351,7 @@ collect_textures(PandaNode *node) {
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
void EggToBam::
|
void EggToBam::
|
||||||
collect_textures(const RenderState *state) {
|
collect_textures(const RenderState *state) {
|
||||||
const TextureAttrib *tex_attrib = state->get_texture();
|
const TextureAttrib *tex_attrib = DCAST(TextureAttrib, state->get_attrib(TextureAttrib::get_class_type()));
|
||||||
if (tex_attrib != (TextureAttrib *)NULL) {
|
if (tex_attrib != (TextureAttrib *)NULL) {
|
||||||
int num_on_stages = tex_attrib->get_num_on_stages();
|
int num_on_stages = tex_attrib->get_num_on_stages();
|
||||||
for (int i = 0; i < num_on_stages; ++i) {
|
for (int i = 0; i < num_on_stages; ++i) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user