Browse Source

remove legacy gsg factory code

David Rose 23 years ago
parent
commit
4b528585e4

+ 0 - 2
panda/src/display/config_display.cxx

@@ -91,8 +91,6 @@ init_libdisplay() {
   initialized = true;
   initialized = true;
 
 
   GraphicsStateGuardian::init_type();
   GraphicsStateGuardian::init_type();
-  GraphicsStateGuardian::GsgParam::init_type();
-  GraphicsStateGuardian::GsgWindow::init_type();
   SavedFrameBuffer::init_type();
   SavedFrameBuffer::init_type();
   GraphicsPipe::init_type();
   GraphicsPipe::init_type();
   GraphicsWindow::init_type();
   GraphicsWindow::init_type();

+ 0 - 39
panda/src/display/graphicsStateGuardian.cxx

@@ -74,30 +74,6 @@ PStatCollector GraphicsStateGuardian::_render_states_unused_pcollector("RenderSt
 #endif
 #endif
 
 
 TypeHandle GraphicsStateGuardian::_type_handle;
 TypeHandle GraphicsStateGuardian::_type_handle;
-TypeHandle GraphicsStateGuardian::GsgWindow::_type_handle;
-
-GraphicsStateGuardian::GsgFactory *GraphicsStateGuardian::_factory = NULL;
-
-GraphicsStateGuardian::GsgWindow::~GsgWindow(void) {}
-
-TypeHandle GraphicsStateGuardian::GsgWindow::get_class_type(void) {
-  return _type_handle;
-}
-
-void GraphicsStateGuardian::GsgWindow::init_type(void) {
-  GsgParam::init_type();
-  register_type(_type_handle, "GraphicsStateGuardian::GsgWindow",
-                GsgParam::get_class_type());
-}
-
-TypeHandle GraphicsStateGuardian::GsgWindow::get_type(void) const {
-  return get_class_type();
-}
-
-TypeHandle GraphicsStateGuardian::GsgWindow::force_init_type(void) {
-  init_type();
-  return get_class_type();
-}
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: GraphicsStateGuardian::Constructor
 //     Function: GraphicsStateGuardian::Constructor
@@ -1574,18 +1550,3 @@ traverse_prepared_textures(bool (*pertex_callbackfn)(TextureContext *,void *),vo
       return;
       return;
   }
   }
 }
 }
-
-////////////////////////////////////////////////////////////////////
-//     Function: GraphicsStateGuardian::get_factory
-//       Access: Public, Static
-//  Description: Returns the factory object that can be used to
-//               register new kinds of GraphicsStateGuardian objects that may
-//               be created.
-////////////////////////////////////////////////////////////////////
-GraphicsStateGuardian::GsgFactory &GraphicsStateGuardian::
-get_factory() {
-  if (_factory == (GsgFactory *)NULL) {
-    _factory = new GsgFactory;
-  }
-  return (*_factory);
-}

+ 0 - 28
panda/src/display/graphicsStateGuardian.h

@@ -327,34 +327,6 @@ private:
 public:
 public:
   void traverse_prepared_textures(bool (*pertex_callbackfn)(TextureContext *,void *),void *callback_arg);
   void traverse_prepared_textures(bool (*pertex_callbackfn)(TextureContext *,void *),void *callback_arg);
 
 
-// factory stuff
-public:
-  typedef Factory<GraphicsStateGuardian> GsgFactory;
-  typedef FactoryParam GsgParam;
-
-  // Make a factory parameter type for the window pointer
-  class EXPCL_PANDA GsgWindow : public GsgParam {
-  public:
-    INLINE GsgWindow(GraphicsWindow* w) : GsgParam(), _w(w) {}
-    virtual ~GsgWindow(void);
-    INLINE GraphicsWindow* get_window(void) { return _w; }
-  public:
-    static TypeHandle get_class_type(void);
-    static void init_type(void);
-    virtual TypeHandle get_type(void) const;
-    virtual TypeHandle force_init_type(void);
-  private:
-    GraphicsWindow* _w;
-    static TypeHandle _type_handle;
-
-    INLINE GsgWindow(void) : GsgParam() {}
-  };
-
-  static GsgFactory &get_factory();
-
-private:
-  static GsgFactory *_factory;
-
 public:
 public:
   INLINE GraphicsWindow* get_window(void) const { return _win; }
   INLINE GraphicsWindow* get_window(void) const { return _win; }
 
 

+ 0 - 15
panda/src/dxgsg7/dxGraphicsStateGuardian7.cxx

@@ -4726,21 +4726,6 @@ restore_frame_buffer(SavedFrameBuffer *frame_buffer) {
     return;
     return;
 }
 }
 
 
-// factory and type stuff
-
-GraphicsStateGuardian *DXGraphicsStateGuardian7::
-make_DXGraphicsStateGuardian(const FactoryParams &params) {
-    GraphicsStateGuardian::GsgWindow *win_param;
-    if (!get_param_into(win_param, params)) {
-        dxgsg7_cat.error()
-        << "No window specified for gsg creation!" << endl;
-        return NULL;
-    }
-
-    GraphicsWindow *win = win_param->get_window();
-    return new DXGraphicsStateGuardian7(win);
-}
-
 TypeHandle DXGraphicsStateGuardian7::get_type(void) const {
 TypeHandle DXGraphicsStateGuardian7::get_type(void) const {
     return get_class_type();
     return get_class_type();
 }
 }

+ 0 - 14
panda/src/dxgsg8/dxGraphicsStateGuardian8.cxx

@@ -4508,20 +4508,6 @@ restore_frame_buffer(SavedFrameBuffer *frame_buffer) {
     return;
     return;
 }
 }
 
 
-// factory and type stuff
-
-GraphicsStateGuardian *DXGraphicsStateGuardian8::
-make_DXGraphicsStateGuardian8(const FactoryParams &params) {
-    GraphicsStateGuardian::GsgWindow *win_param;
-    if (!get_param_into(win_param, params)) {
-        dxgsg8_cat.error() << "No window specified for gsg creation!" << endl;
-        return NULL;
-    }
-
-    GraphicsWindow *win = win_param->get_window();
-    return new DXGraphicsStateGuardian8(win);
-}
-
 TypeHandle DXGraphicsStateGuardian8::get_type(void) const {
 TypeHandle DXGraphicsStateGuardian8::get_type(void) const {
     return get_class_type();
     return get_class_type();
 }
 }

+ 0 - 4
panda/src/glgsg/config_glgsg.cxx

@@ -110,8 +110,4 @@ init_libglgsg() {
   GLSavedFrameBuffer::init_type();
   GLSavedFrameBuffer::init_type();
   GLTextureContext::init_type();
   GLTextureContext::init_type();
   GLGeomNodeContext::init_type();
   GLGeomNodeContext::init_type();
-
-  GraphicsStateGuardian::get_factory().register_factory
-    (GLGraphicsStateGuardian::get_class_type(),
-     GLGraphicsStateGuardian::make_GlGraphicsStateGuardian);
 }
 }

+ 0 - 15
panda/src/glgsg/glGraphicsStateGuardian.cxx

@@ -3971,21 +3971,6 @@ save_mipmap_images(Texture *tex) {
 }
 }
 #endif  // NDEBUG
 #endif  // NDEBUG
 
 
-// factory and type stuff
-
-GraphicsStateGuardian *GLGraphicsStateGuardian::
-make_GlGraphicsStateGuardian(const FactoryParams &params) {
-  GraphicsStateGuardian::GsgWindow *win_param;
-  if (!get_param_into(win_param, params)) {
-    glgsg_cat.error()
-      << "No window specified for gsg creation!" << endl;
-    return NULL;
-  }
-
-  GraphicsWindow *win = win_param->get_window();
-  return new GLGraphicsStateGuardian(win);
-}
-
 TypeHandle GLGraphicsStateGuardian::get_type(void) const {
 TypeHandle GLGraphicsStateGuardian::get_type(void) const {
   return get_class_type();
   return get_class_type();
 }
 }