resolve dependency issue

This commit is contained in:
David Rose 2007-12-17 21:23:38 +00:00
parent 7dcdd8899e
commit e75c8695dd
3 changed files with 23 additions and 20 deletions

View File

@ -651,22 +651,3 @@ CompositionCycleDescEntry(const RenderState *obj,
_inverted(inverted)
{
}
////////////////////////////////////////////////////////////////////
// Function: RenderState::get_generated_shader
// Access: Public
// Description: Generate a ShaderAttrib for this RenderState. This
// generated ShaderAttrib can be thought of as a
// replacement for the regular ShaderAttrib that is a
// standard part of the RenderState.
////////////////////////////////////////////////////////////////////
INLINE const ShaderAttrib *RenderState::
get_generated_shader() const {
if (_generated_shader != (RenderAttrib*)NULL) {
return DCAST(ShaderAttrib, _generated_shader);
}
((RenderState*)this)->_generated_shader =
ShaderGenerator::synthesize_shader(this);
return DCAST(ShaderAttrib, _generated_shader);
}

View File

@ -1126,6 +1126,28 @@ get_geom_rendering(int geom_rendering) const {
return geom_rendering;
}
////////////////////////////////////////////////////////////////////
// Function: RenderState::get_generated_shader
// Access: Public
// Description: Generate a ShaderAttrib for this RenderState. This
// generated ShaderAttrib can be thought of as a
// replacement for the regular ShaderAttrib that is a
// standard part of the RenderState.
////////////////////////////////////////////////////////////////////
const ShaderAttrib *RenderState::
get_generated_shader() const {
// This method cannot be declared inline, because of the circular
// dependency on shaderAttrib.h.
if (_generated_shader != (RenderAttrib*)NULL) {
return DCAST(ShaderAttrib, _generated_shader);
}
((RenderState*)this)->_generated_shader =
ShaderGenerator::synthesize_shader(this);
return DCAST(ShaderAttrib, _generated_shader);
}
////////////////////////////////////////////////////////////////////
// Function: RenderState::store_into_slots
// Access: Public

View File

@ -155,7 +155,7 @@ PUBLISHED:
int get_geom_rendering(int geom_rendering) const;
INLINE const ShaderAttrib *get_generated_shader() const;
const ShaderAttrib *get_generated_shader() const;
public:
void store_into_slots(AttribSlots *slots) const;