Panda3D
iPhoneGraphicsPipe.h
1 // Filename: iPhoneGraphicsPipe.h
2 // Created by: drose (08Apr09)
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 IPHONEGRAPHICSPIPE_H
16 #define IPHONEGRAPHICSPIPE_H
17 
18 #include "pandabase.h"
19 #include "graphicsPipe.h"
20 #include "pset.h"
21 #import "viewController.h"
22 #import <UIKit/UIKit.h>
23 
26 class PNMImage;
27 
28 ////////////////////////////////////////////////////////////////////
29 // Class : IPhoneGraphicsPipe
30 // Description : This graphics pipe represents the interface for
31 // creating OpenGL graphics windows on the various
32 // IPHONE's.
33 ////////////////////////////////////////////////////////////////////
34 class EXPCL_MISC IPhoneGraphicsPipe : public GraphicsPipe {
35 public:
37  virtual ~IPhoneGraphicsPipe();
38 
39  virtual string get_interface_name() const;
40  static PT(GraphicsPipe) pipe_constructor();
41  virtual PreferredWindowThread get_preferred_window_thread() const;
42 
43  void rotate_windows();
44 
45 protected:
46  virtual PT(GraphicsOutput) make_output(const string &name,
47  const FrameBufferProperties &fb_prop,
48  const WindowProperties &win_prop,
49  int flags,
50  GraphicsEngine *engine,
52  GraphicsOutput *host,
53  int retry,
54  bool &precertify);
55 
56 public:
57  UIWindow *_window;
58  ControllerDemoViewController *_view_controller;
59 
61  GraphicsWindows _graphics_windows;
62 
63 private:
64  static IPhoneGraphicsPipe *_global_ptr;
65 
66 public:
67  static TypeHandle get_class_type() {
68  return _type_handle;
69  }
70  static void init_type() {
71  GraphicsPipe::init_type();
72  register_type(_type_handle, "IPhoneGraphicsPipe",
73  GraphicsPipe::get_class_type());
74  }
75  virtual TypeHandle get_type() const {
76  return get_class_type();
77  }
78  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
79 
80 private:
81  static TypeHandle _type_handle;
82 
83  friend class IPhoneGraphicsBuffer;
84 };
85 
86 #endif
The name of this class derives from the fact that we originally implemented it as a layer on top of t...
Definition: pnmImage.h:68
This graphics pipe represents the interface for creating OpenGL graphics windows on the various IPHON...
virtual PreferredWindowThread get_preferred_window_thread() const
Returns an indication of the thread in which this GraphicsPipe requires its window processing to be p...
A container for the various kinds of properties we might ask to have on a graphics window before we o...
An object to create GraphicsOutputs that share a particular 3-D API.
Definition: graphicsPipe.h:58
This is a base class for the various different classes that represent the result of a frame of render...
An interface to the osx/ system for managing GL windows under X.
Encapsulates all the communication with a particular instance of a given rendering backend...
This class is the main interface to controlling the render process.
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85
A container for the various kinds of properties we might ask to have on a graphics frameBuffer before...