move get_gsg() to StandardMunger

This commit is contained in:
David Rose 2005-06-01 00:39:31 +00:00
parent fc716f0d49
commit 8b7d141666
5 changed files with 16 additions and 17 deletions

View File

@ -16,3 +16,14 @@
//
////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////
// Function: StandardMunger::get_gsg
// Access: Public
// Description: Returns a pointer to the GSG that created this
// munger.
////////////////////////////////////////////////////////////////////
INLINE GraphicsStateGuardian *StandardMunger::
get_gsg() const {
return _gsg;
}

View File

@ -33,7 +33,7 @@ TypeHandle StandardMunger::_type_handle;
// we might as well convert it as we munge).
////////////////////////////////////////////////////////////////////
StandardMunger::
StandardMunger(const GraphicsStateGuardianBase *gsg, const RenderState *state,
StandardMunger(GraphicsStateGuardianBase *gsg, const RenderState *state,
int num_components,
StandardMunger::NumericType numeric_type,
StandardMunger::Contents contents) :

View File

@ -38,11 +38,13 @@
////////////////////////////////////////////////////////////////////
class EXPCL_PANDA StandardMunger : public StateMunger {
public:
StandardMunger(const GraphicsStateGuardianBase *gsg, const RenderState *state,
StandardMunger(GraphicsStateGuardianBase *gsg, const RenderState *state,
int num_components, NumericType numeric_type,
Contents contents);
virtual ~StandardMunger();
INLINE GraphicsStateGuardian *get_gsg() const;
protected:
virtual CPT(qpGeomVertexData) munge_data_impl(const qpGeomVertexData *data);
virtual int compare_to_impl(const qpGeomMunger *other) const;
@ -54,7 +56,7 @@ private:
int _num_components;
NumericType _numeric_type;
Contents _contents;
CPT(GraphicsStateGuardian) _gsg;
PT(GraphicsStateGuardian) _gsg;
CPT(RenderModeAttrib) _render_mode;
bool _munge_color;

View File

@ -25,23 +25,11 @@
INLINE CLP(GeomMunger)::
CLP(GeomMunger)(GraphicsStateGuardian *gsg, const RenderState *state) :
StandardMunger(gsg, state, 4, NT_uint8, C_color),
_gsg(gsg),
_texture(state->get_texture()),
_tex_gen(state->get_tex_gen())
{
}
////////////////////////////////////////////////////////////////////
// Function: CLP(GeomMunger)::get_gsg
// Access: Public
// Description: Returns a pointer to the GSG that created this
// munger.
////////////////////////////////////////////////////////////////////
INLINE GraphicsStateGuardian *CLP(GeomMunger)::
get_gsg() const {
return _gsg;
}
////////////////////////////////////////////////////////////////////
// Function: CLP(GeomMunger)::operator new
// Access: Public

View File

@ -36,8 +36,6 @@ public:
INLINE CLP(GeomMunger)(GraphicsStateGuardian *gsg, const RenderState *state);
virtual ~CLP(GeomMunger)();
INLINE GraphicsStateGuardian *get_gsg() const;
protected:
virtual CPT(qpGeomVertexFormat) munge_format_impl(const qpGeomVertexFormat *orig,
const qpGeomVertexAnimationSpec &animation);