Panda3D
Loading...
Searching...
No Matches
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
25class PNMImage;
26
27/**
28 * This graphics pipe represents the interface for creating OpenGL graphics
29 * windows on the various IPHONE's.
30 */
31class EXPCL_MISC IPhoneGraphicsPipe : public GraphicsPipe {
32public:
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
42protected:
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,
49 GraphicsOutput *host,
50 int retry,
51 bool &precertify);
52
53public:
54 UIWindow *_window;
55 ControllerDemoViewController *_view_controller;
56
58 GraphicsWindows _graphics_windows;
59
60private:
61 static IPhoneGraphicsPipe *_global_ptr;
62
63public:
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
77private:
78 static TypeHandle _type_handle;
79
80 friend class IPhoneGraphicsBuffer;
81};
82
83#endif
A container for the various kinds of properties we might ask to have on a graphics frameBuffer before...
This class is the main interface to controlling the render process.
This is a base class for the various different classes that represent the result of a frame of render...
An object to create GraphicsOutputs that share a particular 3-D API.
Encapsulates all the communication with a particular instance of a given rendering backend.
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...
An interface to the osx/ system for managing GL windows under X.
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 is the identifier used to differentiate C++ class types.
Definition typeHandle.h:81
A container for the various kinds of properties we might ask to have on a graphics window before we o...
This is our own Panda specialization on the default STL set.
Definition pset.h:49
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.