00001 // Filename: hardwareChannel.h 00002 // Created by: mike (09Jan97) 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 #ifndef HARDWARECHANNEL_H 00019 #define HARDWARECHANNEL_H 00020 // 00021 //////////////////////////////////////////////////////////////////// 00022 // Includes 00023 //////////////////////////////////////////////////////////////////// 00024 #include <pandabase.h> 00025 00026 #include "graphicsChannel.h" 00027 00028 //////////////////////////////////////////////////////////////////// 00029 // Defines 00030 //////////////////////////////////////////////////////////////////// 00031 00032 //////////////////////////////////////////////////////////////////// 00033 // Class : HardwareChannel 00034 // Description : Video output channels if available on the current 00035 // platform 00036 // NOTE: hardware channels belong to a pipe rather 00037 // than to a particular window 00038 //////////////////////////////////////////////////////////////////// 00039 class EXPCL_PANDA HardwareChannel : public GraphicsChannel 00040 { 00041 public: 00042 00043 HardwareChannel( GraphicsWindow* window ); 00044 ~HardwareChannel( void ); 00045 00046 virtual void window_resized(int x, int y); 00047 00048 INLINE int get_id( void ) const; 00049 INLINE int get_xorg( void ) const; 00050 INLINE int get_yorg( void ) const; 00051 INLINE int get_xsize( void ) const; 00052 INLINE int get_ysize( void ) const; 00053 00054 protected: 00055 00056 int _id; 00057 int _xorg; 00058 int _yorg; 00059 int _xsize; 00060 int _ysize; 00061 00062 public: 00063 00064 static TypeHandle get_class_type() { 00065 return _type_handle; 00066 } 00067 static void init_type() { 00068 GraphicsChannel::init_type(); 00069 register_type(_type_handle, "HardwareChannel", 00070 GraphicsChannel::get_class_type()); 00071 } 00072 virtual TypeHandle get_type() const { 00073 return get_class_type(); 00074 } 00075 virtual TypeHandle force_init_type() {init_type(); return get_class_type();} 00076 00077 private: 00078 00079 static TypeHandle _type_handle; 00080 }; 00081 00082 #include "hardwareChannel.I" 00083 00084 #endif