Panda3D
graphicsOutputBase.h
1 // Filename: graphicsOutputBase.h
2 // Created by: drose (27May09)
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 GRAPHICSOUTPUTBASE_H
16 #define GRAPHICSOUTPUTBASE_H
17 
18 #include "pandabase.h"
19 #include "typedWritableReferenceCount.h"
20 
21 class Texture;
22 
23 ////////////////////////////////////////////////////////////////////
24 // Class : GraphicsOutputBase
25 // Description : An abstract base class for GraphicsOutput, for all
26 // the usual reasons.
27 ////////////////////////////////////////////////////////////////////
28 class EXPCL_PANDA_GSGBASE GraphicsOutputBase : public TypedWritableReferenceCount {
29 PUBLISHED:
30  virtual void set_sort(int sort)=0;
31  virtual Texture *get_texture(int i=0) const=0;
32 
33 public:
34  static TypeHandle get_class_type() {
35  return _type_handle;
36  }
37  static void init_type() {
38  TypedWritableReferenceCount::init_type();
39  register_type(_type_handle, "GraphicsOutputBase",
40  TypedWritableReferenceCount::get_class_type());
41  }
42  virtual TypeHandle get_type() const {
43  return get_class_type();
44  }
45  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
46 
47 private:
48  static TypeHandle _type_handle;
49 
50  friend class GraphicsPipe;
51  friend class GraphicsEngine;
52  friend class DisplayRegion;
53 };
54 
55 #include "graphicsOutputBase.I"
56 
57 #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:75
An object to create GraphicsOutputs that share a particular 3-D API.
Definition: graphicsPipe.h:58
A base class for things which need to inherit from both TypedWritable and from ReferenceCount.
A rectangular subregion within a window for rendering into.
Definition: displayRegion.h:61
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:85