mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
prepare_scene() should also prepare shaders
This commit is contained in:
parent
1354fbf5cd
commit
ccf4863ca1
@ -21,6 +21,7 @@
|
|||||||
#include "colorScaleAttrib.h"
|
#include "colorScaleAttrib.h"
|
||||||
#include "texMatrixAttrib.h"
|
#include "texMatrixAttrib.h"
|
||||||
#include "textureAttrib.h"
|
#include "textureAttrib.h"
|
||||||
|
#include "shaderAttrib.h"
|
||||||
#include "bamReader.h"
|
#include "bamReader.h"
|
||||||
#include "bamWriter.h"
|
#include "bamWriter.h"
|
||||||
#include "datagram.h"
|
#include "datagram.h"
|
||||||
@ -431,6 +432,18 @@ r_prepare_scene(GraphicsStateGuardianBase *gsg, const RenderState *node_state,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// As well as the shaders.
|
||||||
|
attrib = geom_state->get_attrib(ShaderAttrib::get_class_slot());
|
||||||
|
if (attrib != (const RenderAttrib *)NULL) {
|
||||||
|
const ShaderAttrib *sa;
|
||||||
|
DCAST_INTO_V(sa, attrib);
|
||||||
|
Shader *shader = (Shader *)sa->get_shader();
|
||||||
|
if (shader != (Shader *)NULL) {
|
||||||
|
shader->prepare(prepared_objects);
|
||||||
|
}
|
||||||
|
//TODO: Invoke the shader generator if enabled.
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PandaNode::r_prepare_scene(gsg, node_state, transformer, current_thread);
|
PandaNode::r_prepare_scene(gsg, node_state, transformer, current_thread);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user