Panda3D
 All Classes Functions Variables Enumerations
renderBuffer.h
1 // Filename: renderBuffer.h
2 // Created by: drose (02Feb99)
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 RENDERBUFFER_H
16 #define RENDERBUFFER_H
17 
18 #include "pandabase.h"
19 
21 
22 ////////////////////////////////////////////////////////////////////
23 // Class : RenderBuffer
24 // Description : A RenderBuffer is an arbitrary subset of the various
25 // layers (depth buffer, color buffer, etc.) of a
26 // drawing region. It consists of a
27 // GraphicsStateGuardian pointer, along with a bitmask
28 // of the layers we're interested in.
29 ////////////////////////////////////////////////////////////////////
30 class EXPCL_PANDA_DISPLAY RenderBuffer {
31 public:
32  enum Type {
33  T_aux_rgba_0 = 0x00000001,
34  T_aux_rgba_1 = 0x00000002,
35  T_aux_rgba_2 = 0x00000004,
36  T_aux_rgba_3 = 0x00000008,
37  T_aux_rgba_ALL = 0x0000000F,
38 
39  T_aux_hrgba_0 = 0x00000010, // These can't really be implemented until
40  T_aux_hrgba_1 = 0x00000020, // we have support for hrgba textures.
41  T_aux_hrgba_2 = 0x00000040, // I've just added the bits for the future.
42  T_aux_hrgba_3 = 0x00000080,
43  T_aux_hrgba_ALL = 0x000000F0,
44 
45  T_aux_float_0 = 0x00000100, // These can't really be implemented until
46  T_aux_float_1 = 0x00000200, // we have support for float textures.
47  T_aux_float_2 = 0x00000400, // I've just added the bits for the future.
48  T_aux_float_3 = 0x00000800,
49  T_aux_float_ALL = 0x00000F00,
50 
51  T_aux_undef_0 = 0x00001000,
52  T_aux_undef_1 = 0x00002000,
53  T_aux_undef_2 = 0x00004000,
54  T_aux_undef_3 = 0x00008000,
55 
56  T_aux = 0x0000FFFF,
57 
58  T_front_left = 0x00010000,
59  T_back_left = 0x00020000,
60  T_front_right = 0x00040000,
61  T_back_right = 0x00080000,
62 
63  T_front = 0x00050000,
64  T_back = 0x000a0000,
65  T_left = 0x00030000,
66  T_right = 0x000c0000,
67 
68  T_color = 0x000F0000,
69 
70  T_depth = 0x00100000,
71  T_stencil = 0x00200000,
72  T_accum = 0x00400000,
73  };
74 
75 
76  RenderBuffer(GraphicsStateGuardian *gsg, int buffer_type)
77  : _gsg(gsg), _buffer_type(buffer_type) { }
78 
80  int _buffer_type;
81 };
82 
83 #endif
Encapsulates all the communication with a particular instance of a given rendering backend...
A RenderBuffer is an arbitrary subset of the various layers (depth buffer, color buffer, etc.) of a drawing region.
Definition: renderBuffer.h:30