00001 // Filename: wcrGraphicsPipe.cxx 00002 // Created by: skyler, based on wgl* file. 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved 00008 // 00009 // All use of this software is subject to the terms of the Panda 3d 00010 // Software license. You should have received a copy of this license 00011 // along with this source code; you will also find a current copy of 00012 // the license at http://www.panda3d.org/license.txt . 00013 // 00014 // To contact the maintainers of this program write to 00015 // panda3d@yahoogroups.com . 00016 // 00017 //////////////////////////////////////////////////////////////////// 00018 #include "wcrGraphicsPipe.h" 00019 #include "config_wcrdisplay.h" 00020 00021 //////////////////////////////////////////////////////////////////// 00022 // Static variables 00023 //////////////////////////////////////////////////////////////////// 00024 TypeHandle wcrGraphicsPipe::_type_handle; 00025 00026 wcrGraphicsPipe::wcrGraphicsPipe(const PipeSpecifier& spec) 00027 : InteractiveGraphicsPipe(spec) 00028 {} 00029 00030 //////////////////////////////////////////////////////////////////// 00031 // Function: wcrGraphicsPipe::get_window_type 00032 // Access: Published, Virtual 00033 // Description: Returns the TypeHandle of the kind of window 00034 // preferred by this kind of pipe. 00035 //////////////////////////////////////////////////////////////////// 00036 TypeHandle wcrGraphicsPipe:: 00037 get_window_type() const { 00038 return wcrGraphicsWindow::get_class_type(); 00039 } 00040 00041 GraphicsPipe *wcrGraphicsPipe:: 00042 make_wcrGraphicsPipe(const FactoryParams ¶ms) { 00043 GraphicsPipe::PipeSpec *pipe_param; 00044 if (!get_param_into(pipe_param, params)) { 00045 return new wcrGraphicsPipe(PipeSpecifier()); 00046 } else { 00047 return new wcrGraphicsPipe(pipe_param->get_specifier()); 00048 } 00049 } 00050 00051 00052 TypeHandle wcrGraphicsPipe::get_class_type() { 00053 return _type_handle; 00054 } 00055 00056 const char *pipe_type_name="wcrGraphicsPipe"; 00057 00058 void wcrGraphicsPipe::init_type() { 00059 InteractiveGraphicsPipe::init_type(); 00060 register_type(_type_handle, pipe_type_name, 00061 InteractiveGraphicsPipe::get_class_type()); 00062 } 00063 00064 TypeHandle wcrGraphicsPipe::get_type() const { 00065 return get_class_type(); 00066 } 00067 00068 wcrGraphicsPipe::wcrGraphicsPipe() { 00069 wcrdisplay_cat.error() 00070 << pipe_type_name <<"s should not be created with the default constructor" << endl; 00071 } 00072 00073 wcrGraphicsPipe::wcrGraphicsPipe(const wcrGraphicsPipe&) { 00074 wcrdisplay_cat.error() 00075 << pipe_type_name << "s should not be copied" << endl; 00076 } 00077 00078 wcrGraphicsPipe& wcrGraphicsPipe::operator=(const wcrGraphicsPipe&) { 00079 wcrdisplay_cat.error() 00080 << pipe_type_name << "s should not be assigned" << endl; 00081 return *this; 00082 }