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