Panda3D
 All Classes Functions Variables Enumerations
dxGeomMunger8.I
00001 // Filename: dxGeomMunger8.I
00002 // Created by:  drose (11Mar05)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 
00016 ////////////////////////////////////////////////////////////////////
00017 //     Function: DXGeomMunger8::Constructor
00018 //       Access: Public
00019 //  Description:
00020 ////////////////////////////////////////////////////////////////////
00021 INLINE DXGeomMunger8::
00022 DXGeomMunger8(GraphicsStateGuardian *gsg, const RenderState *state) :
00023   StandardMunger(gsg, state, 1, NT_packed_dabc, C_color),
00024   _texture(DCAST(TextureAttrib, state->get_attrib(TextureAttrib::get_class_slot()))),
00025   _tex_gen(DCAST(TexGenAttrib, state->get_attrib(TexGenAttrib::get_class_slot())))
00026 {
00027   _filtered_texture = (TextureAttrib *)NULL;
00028   _reffed_filtered_texture = false;
00029   if (_texture != (TextureAttrib *)NULL) {
00030     _filtered_texture = _texture->filter_to_max(gsg->get_max_texture_stages());
00031     if (_filtered_texture != _texture) {
00032       _filtered_texture->ref();
00033       _reffed_filtered_texture = true;
00034     }
00035   }
00036   // Set a callback to unregister ourselves when either the Texture or
00037   // the TexGen object gets deleted.
00038   _texture.set_callback(this);
00039   _tex_gen.set_callback(this);
00040 }
 All Classes Functions Variables Enumerations