Panda3D
Loading...
Searching...
No Matches
iPhoneGraphicsStateGuardian.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 iPhoneGraphicsStateGuardian.h
10 * @author drose
11 * @date 2009-04-08
12 */
13
14#ifndef IPHONEGRAPHICSSTATEGUARDIAN_H
15#define IPHONEGRAPHICSSTATEGUARDIAN_H
16
17#include "pandabase.h"
18#include "glesgsg.h"
19
21
23
24/**
25 *
26 */
27class IPhoneGraphicsStateGuardian : public GLESGraphicsStateGuardian {
28public:
30 IPhoneGraphicsStateGuardian *share_with);
32 virtual void reset();
33
34protected:
35 virtual void *get_extension_func(const char *prefix, const char *name);
36
37private:
38 void describe_pixel_format(FrameBufferProperties &fb_props);
39
40 // We have to save a pointer to the GSG we intend to share texture context
41 // with, since we don't create our own context in the constructor.
42 PT(IPhoneGraphicsStateGuardian) _share_with;
43
44public:
45 GLint _shared_buffer;
46
47public:
48 static TypeHandle get_class_type() {
49 return _type_handle;
50 }
51 static void init_type() {
52 GLESGraphicsStateGuardian::init_type();
53 register_type(_type_handle, "IPhoneGraphicsStateGuardian",
54 GLESGraphicsStateGuardian::get_class_type());
55 }
56 virtual TypeHandle get_type() const {
57 return get_class_type();
58 }
59 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
60
61private:
62 static TypeHandle _type_handle;
63
64 friend class IPhoneGraphicsBuffer;
65};
66
67
68#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.
An object to create GraphicsOutputs that share a particular 3-D API.
An interface to the osx/ system for managing GL windows under X.
TypeHandle is the identifier used to differentiate C++ class types.
Definition typeHandle.h:81
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(),...