Panda3D

iPhoneGraphicsPipe.h
Go to the documentation of this file.
1 /**
2 * PANDA 3D SOFTWARE
3 * Copyright (c) Carnegie Mellon University. All rights reserved.
4 *
5 * All use of this software is subject to the terms of the revised BSD
6 * license. You should have received a copy of this license along
7 * with this source code in a file named "LICENSE."
8 *
9 * @file iPhoneGraphicsPipe.h
10 * @author drose
11 * @date 2009-04-08
12 */
13
14 #ifndef IPHONEGRAPHICSPIPE_H
15 #define IPHONEGRAPHICSPIPE_H
16
17 #include "pandabase.h"
18 #include "graphicsPipe.h"
19 #include "pset.h"
20 #import "viewController.h"
21 #import <UIKit/UIKit.h>
22
23 class IPhoneGraphicsStateGuardian;
24 class IPhoneGraphicsWindow;
25 class PNMImage;
26
27 /**
28 * This graphics pipe represents the interface for creating OpenGL graphics
29 * windows on the various IPHONE's.
30 */
31 class EXPCL_MISC IPhoneGraphicsPipe : public GraphicsPipe {
32 public:
33 IPhoneGraphicsPipe();
34 virtual ~IPhoneGraphicsPipe();
35
36 virtual std::string get_interface_name() const;
37 static PT(GraphicsPipe) pipe_constructor();
38 virtual PreferredWindowThread get_preferred_window_thread() const;
39
40 void rotate_windows();
41
42 protected:
43 virtual PT(GraphicsOutput) make_output(const std::string &name,
44 const FrameBufferProperties &fb_prop,
45 const WindowProperties &win_prop,
46 int flags,
47 GraphicsEngine *engine,
48 GraphicsStateGuardian *gsg,
49 GraphicsOutput *host,
50 int retry,
51 bool &precertify);
52
53 public:
54 UIWindow *_window;
55 ControllerDemoViewController *_view_controller;
56
57 typedef pset<IPhoneGraphicsWindow *> GraphicsWindows;
58 GraphicsWindows _graphics_windows;
59
60 private:
61 static IPhoneGraphicsPipe *_global_ptr;
62
63 public:
64 static TypeHandle get_class_type() {
65 return _type_handle;
66 }
67 static void init_type() {
68 GraphicsPipe::init_type();
69 register_type(_type_handle, "IPhoneGraphicsPipe",
70 GraphicsPipe::get_class_type());
71 }
72 virtual TypeHandle get_type() const {
73 return get_class_type();
74 }
75 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
76
77 private:
78 static TypeHandle _type_handle;
79
80 friend class IPhoneGraphicsBuffer;
81 };
82
83 #endif
FrameBufferProperties
A container for the various kinds of properties we might ask to have on a graphics frameBuffer before...
Definition: frameBufferProperties.h:26
GraphicsEngine
This class is the main interface to controlling the render process.
Definition: graphicsEngine.h:53
GraphicsOutput
This is a base class for the various different classes that represent the result of a frame of render...
Definition: graphicsOutput.h:63
GraphicsPipe
An object to create GraphicsOutputs that share a particular 3-D API.
Definition: graphicsPipe.h:52
GraphicsStateGuardian
Encapsulates all the communication with a particular instance of a given rendering backend.
Definition: graphicsStateGuardian.h:65
IPhoneGraphicsPipe
This graphics pipe represents the interface for creating OpenGL graphics windows on the various IPHON...
Definition: iPhoneGraphicsPipe.h:31
IPhoneGraphicsPipe::get_preferred_window_thread
virtual PreferredWindowThread get_preferred_window_thread() const
Returns an indication of the thread in which this GraphicsPipe requires its window processing to be p...
IPhoneGraphicsStateGuardian
Definition: iPhoneGraphicsStateGuardian.h:27
IPhoneGraphicsWindow
An interface to the osx/ system for managing GL windows under X.
Definition: iPhoneGraphicsWindow.h:28
PNMImage
The name of this class derives from the fact that we originally implemented it as a layer on top of t...
Definition: pnmImage.h:58
TypeHandle
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:81
WindowProperties
A container for the various kinds of properties we might ask to have on a graphics window before we o...
Definition: windowProperties.h:29
pset< IPhoneGraphicsWindow * >
graphicsPipe.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
ControllerDemoViewController
Definition: viewController.h:21
pandabase.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
pset.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
register_type
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
Definition: register_type.I:22
viewController.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.