Panda3D
graphicsOutputBase.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 graphicsOutputBase.h
10  * @author drose
11  * @date 2009-05-27
12  */
13 
14 #ifndef GRAPHICSOUTPUTBASE_H
15 #define GRAPHICSOUTPUTBASE_H
16 
17 #include "pandabase.h"
19 
20 class Texture;
21 
22 /**
23  * An abstract base class for GraphicsOutput, for all the usual reasons.
24  */
25 class EXPCL_PANDA_GSGBASE GraphicsOutputBase : public TypedWritableReferenceCount {
26 PUBLISHED:
27  virtual void set_sort(int sort)=0;
28  virtual Texture *get_texture(int i=0) const=0;
29 
30 public:
31  static TypeHandle get_class_type() {
32  return _type_handle;
33  }
34  static void init_type() {
35  TypedWritableReferenceCount::init_type();
36  register_type(_type_handle, "GraphicsOutputBase",
37  TypedWritableReferenceCount::get_class_type());
38  }
39  virtual TypeHandle get_type() const {
40  return get_class_type();
41  }
42  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
43 
44 private:
45  static TypeHandle _type_handle;
46 
47  friend class GraphicsPipe;
48  friend class GraphicsEngine;
49  friend class DisplayRegion;
50 };
51 
52 #include "graphicsOutputBase.I"
53 
54 #endif
Represents a texture object, which is typically a single 2-d image but may also represent a 1-d or 3-...
Definition: texture.h:71
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
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
An object to create GraphicsOutputs that share a particular 3-D API.
Definition: graphicsPipe.h:52
A base class for things which need to inherit from both TypedWritable and from ReferenceCount.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A rectangular subregion within a window for rendering into.
Definition: displayRegion.h:57
An abstract base class for GraphicsOutput, for all the usual reasons.
This class is the main interface to controlling the render process.
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:81