Panda3D
winGraphicsPipe.h
1 // Filename: winGraphicsPipe.h
2 // Created by: drose (20Dec02)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef WINGRAPHICSPIPE_H
16 #define WINGRAPHICSPIPE_H
17 
18 #include "pandabase.h"
19 #include "graphicsPipe.h"
20 #include "winGraphicsWindow.h"
21 
22 ////////////////////////////////////////////////////////////////////
23 // Class : WinGraphicsPipe
24 // Description : This is an abstract base class for wglGraphicsPipe
25 // and wdxGraphicsPipe; that is, those graphics pipes
26 // that are specialized for working with Microsoft
27 // Windows.
28 //
29 // There isn't much code here, since most of the fancy
30 // stuff is handled in WinGraphicsWindow. You could
31 // make a case that we don't even need a WinGraphicsPipe
32 // class at all, but it is provided mainly for
33 // completeness.
34 ////////////////////////////////////////////////////////////////////
35 class EXPCL_PANDAWIN WinGraphicsPipe : public GraphicsPipe {
36 public:
38  virtual ~WinGraphicsPipe();
39 
40  virtual void lookup_cpu_data();
41 
42 private:
43  HINSTANCE _hUser32;
44 
45  typedef BOOL (WINAPI *PFN_TRACKMOUSEEVENT)(LPTRACKMOUSEEVENT);
46  PFN_TRACKMOUSEEVENT _pfnTrackMouseEvent;
47 
48 public:
49  static TypeHandle get_class_type() {
50  return _type_handle;
51  }
52  static void init_type() {
53  GraphicsPipe::init_type();
54  register_type(_type_handle, "WinGraphicsPipe",
55  GraphicsPipe::get_class_type());
56  }
57  virtual TypeHandle get_type() const {
58  return get_class_type();
59  }
60  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
61 
62 private:
63  static TypeHandle _type_handle;
64 
65  friend class WinGraphicsWindow;
66 };
67 
68 extern EXPCL_PANDAWIN bool MyLoadLib(HINSTANCE &hDLL, const char *DLLname);
69 extern EXPCL_PANDAWIN bool MyGetProcAddr(HINSTANCE hDLL, FARPROC *pFn, const char *szExportedFnName);
70 
71 #include "winGraphicsPipe.I"
72 
73 #endif
An abstract base class for glGraphicsWindow and dxGraphicsWindow (and, in general, graphics windows that interface with the Microsoft Windows API).
An object to create GraphicsOutputs that share a particular 3-D API.
Definition: graphicsPipe.h:58
virtual void lookup_cpu_data()
Looks up the detailed CPU information and stores it in _display_information, if supported by the OS...
This is an abstract base class for wglGraphicsPipe and wdxGraphicsPipe; that is, those graphics pipes...
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85