Panda3D
 All Classes Functions Variables Enumerations
renderBuffer.h
00001 // Filename: renderBuffer.h
00002 // Created by:  drose (02Feb99)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 #ifndef RENDERBUFFER_H
00016 #define RENDERBUFFER_H
00017 
00018 #include "pandabase.h"
00019 
00020 class GraphicsStateGuardian;
00021 
00022 ////////////////////////////////////////////////////////////////////
00023 //       Class : RenderBuffer
00024 // Description : A RenderBuffer is an arbitrary subset of the various
00025 //               layers (depth buffer, color buffer, etc.) of a
00026 //               drawing region.  It consists of a
00027 //               GraphicsStateGuardian pointer, along with a bitmask
00028 //               of the layers we're interested in.
00029 ////////////////////////////////////////////////////////////////////
00030 class EXPCL_PANDA_DISPLAY RenderBuffer {
00031 public:
00032   enum Type {
00033     T_aux_rgba_0       = 0x00000001,
00034     T_aux_rgba_1       = 0x00000002,
00035     T_aux_rgba_2       = 0x00000004,
00036     T_aux_rgba_3       = 0x00000008,
00037     T_aux_rgba_ALL     = 0x0000000F,
00038 
00039     T_aux_hrgba_0      = 0x00000010, // These can't really be implemented until 
00040     T_aux_hrgba_1      = 0x00000020, // we have support for hrgba textures.
00041     T_aux_hrgba_2      = 0x00000040, // I've just added the bits for the future.
00042     T_aux_hrgba_3      = 0x00000080,
00043     T_aux_hrgba_ALL    = 0x000000F0,
00044 
00045     T_aux_float_0      = 0x00000100, // These can't really be implemented until 
00046     T_aux_float_1      = 0x00000200, // we have support for float textures.
00047     T_aux_float_2      = 0x00000400, // I've just added the bits for the future.
00048     T_aux_float_3      = 0x00000800,
00049     T_aux_float_ALL    = 0x00000F00,
00050 
00051     T_aux_undef_0      = 0x00001000,
00052     T_aux_undef_1      = 0x00002000,
00053     T_aux_undef_2      = 0x00004000,
00054     T_aux_undef_3      = 0x00008000,
00055 
00056     T_aux              = 0x0000FFFF,
00057 
00058     T_front_left       = 0x00010000,
00059     T_back_left        = 0x00020000,
00060     T_front_right      = 0x00040000,
00061     T_back_right       = 0x00080000,
00062 
00063     T_front            = 0x00050000,
00064     T_back             = 0x000a0000,
00065     T_left             = 0x00030000,
00066     T_right            = 0x000c0000,
00067     
00068     T_color            = 0x000F0000,
00069 
00070     T_depth            = 0x00100000,
00071     T_stencil          = 0x00200000,
00072     T_accum            = 0x00400000,
00073   };
00074 
00075 
00076   RenderBuffer(GraphicsStateGuardian *gsg, int buffer_type)
00077     : _gsg(gsg), _buffer_type(buffer_type) { }
00078 
00079   GraphicsStateGuardian *_gsg;
00080   int _buffer_type;
00081 };
00082 
00083 #endif
 All Classes Functions Variables Enumerations