mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
remove legacy gsg factory code
This commit is contained in:
parent
46d570f4ce
commit
4b528585e4
@ -91,8 +91,6 @@ init_libdisplay() {
|
||||
initialized = true;
|
||||
|
||||
GraphicsStateGuardian::init_type();
|
||||
GraphicsStateGuardian::GsgParam::init_type();
|
||||
GraphicsStateGuardian::GsgWindow::init_type();
|
||||
SavedFrameBuffer::init_type();
|
||||
GraphicsPipe::init_type();
|
||||
GraphicsWindow::init_type();
|
||||
|
@ -74,30 +74,6 @@ PStatCollector GraphicsStateGuardian::_render_states_unused_pcollector("RenderSt
|
||||
#endif
|
||||
|
||||
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
|
||||
@ -1574,18 +1550,3 @@ traverse_prepared_textures(bool (*pertex_callbackfn)(TextureContext *,void *),vo
|
||||
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);
|
||||
}
|
||||
|
@ -327,34 +327,6 @@ private:
|
||||
public:
|
||||
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:
|
||||
INLINE GraphicsWindow* get_window(void) const { return _win; }
|
||||
|
||||
|
@ -4726,21 +4726,6 @@ restore_frame_buffer(SavedFrameBuffer *frame_buffer) {
|
||||
return;
|
||||
}
|
||||
|
||||
// factory and type stuff
|
||||
|
||||
GraphicsStateGuardian *DXGraphicsStateGuardian7::
|
||||
make_DXGraphicsStateGuardian(const FactoryParams ¶ms) {
|
||||
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 {
|
||||
return get_class_type();
|
||||
}
|
||||
|
@ -4508,20 +4508,6 @@ restore_frame_buffer(SavedFrameBuffer *frame_buffer) {
|
||||
return;
|
||||
}
|
||||
|
||||
// factory and type stuff
|
||||
|
||||
GraphicsStateGuardian *DXGraphicsStateGuardian8::
|
||||
make_DXGraphicsStateGuardian8(const FactoryParams ¶ms) {
|
||||
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 {
|
||||
return get_class_type();
|
||||
}
|
||||
|
@ -110,8 +110,4 @@ init_libglgsg() {
|
||||
GLSavedFrameBuffer::init_type();
|
||||
GLTextureContext::init_type();
|
||||
GLGeomNodeContext::init_type();
|
||||
|
||||
GraphicsStateGuardian::get_factory().register_factory
|
||||
(GLGraphicsStateGuardian::get_class_type(),
|
||||
GLGraphicsStateGuardian::make_GlGraphicsStateGuardian);
|
||||
}
|
||||
|
@ -3971,21 +3971,6 @@ save_mipmap_images(Texture *tex) {
|
||||
}
|
||||
#endif // NDEBUG
|
||||
|
||||
// factory and type stuff
|
||||
|
||||
GraphicsStateGuardian *GLGraphicsStateGuardian::
|
||||
make_GlGraphicsStateGuardian(const FactoryParams ¶ms) {
|
||||
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 {
|
||||
return get_class_type();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user