Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | Related Pages

rendercaps.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                 rendercaps.h  -  Render device capability bitfield
00003                              -------------------
00004     begin                : Thu Mar 27 2003
00005     copyright            : (C) 2003 by Reality Rift Studios
00006     email                : mattias@realityrift.com
00007  ***************************************************************************
00008 
00009  The contents of this file are subject to the Mozilla Public License Version
00010  1.1 (the "License"); you may not use this file except in compliance with
00011  the License. You may obtain a copy of the License at 
00012  http://www.mozilla.org/MPL/
00013 
00014  Software distributed under the License is distributed on an "AS IS" basis,
00015  WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00016  for the specific language governing rights and limitations under the
00017  License.
00018 
00019  The Original Code is the NeoEngine, rendercaps.h
00020 
00021  The Initial Developer of the Original Code is Mattias Jansson.
00022  Portions created by Mattias Jansson are Copyright (C) 2003
00023  Reality Rift Studios. All Rights Reserved.
00024 
00025  ***************************************************************************/
00026 
00027 #ifndef __NERENDERCAPS_H
00028 #define __NERENDERCAPS_H
00029 
00030 
00037 #include "base.h"
00038 #include "util.h"
00039 
00040 
00041 namespace NeoEngine
00042 {
00043 
00044 
00045 
00050 class NEOENGINE_API RenderCaps
00051 {
00052     public:
00053 
00057         enum RENDERCAPS
00058         {
00060           BUFFER_GROUP                                = 0x00000000,
00061 
00063           STENCILBUFFER                               = 0x00000001,
00064 
00066           PIXELFORMAT                                 = 0x00000100,
00067 
00069           PIXELBUFFER                                 = 0x00000200,
00070 
00072           RENDERTEXTURE                               = 0x00000400,
00073 
00074 
00076           PROGRAM_GROUP                               = 0x01000000,
00077 
00079           VERTEXPROGRAM                               = 0x01000001,
00080 
00082           FRAGMENTPROGRAM                             = 0x01000002,
00083 
00084 
00086           MULTITEXTURE_GROUP                          = 0x02000000,
00087 
00089           MULTITEXTURE                                = 0x02000001,
00090 
00092           CUBEMAP                                     = 0x02000010,
00093 
00095           BLENDMODE_FACTOR                            = 0x02000100,
00096 
00098           MULTITEXTURE_UNITS_MASK                     = 0x00FF0000,
00099 
00101           MULTITEXTURE_UNITS_SHIFT                    = 0x00000010,
00102 
00103 
00105           MISC_GROUP                                  = 0x04000000,
00106 
00108           NORMALIZATION                               = 0x04000001,
00109 
00110 
00112           WINDOW_GROUP                                = 0x0F000000,
00113 
00115           DOUBLEBUFFER                                = 0x0F000001,
00116 
00118           FULLSCREEN                                  = 0x0F000002,
00119 
00120 
00122           ACCELERATION_GROUP                          = 0xF0000000,
00123 
00125           HARDWAREACCELERATED                         = 0xF0000100
00126         };
00127 
00128 
00129 
00130 
00131     protected:
00132 
00134         unsigned int                                  m_auiCaps[256];
00135 
00136 
00137     public:
00138 
00141                                                       RenderCaps() { memset( m_auiCaps, 0, sizeof( unsigned int ) * 256 ); }
00142 
00145                                                      ~RenderCaps() {}
00146 
00152         inline bool                                   IsSet( unsigned int uiCaps ) const { return( ( m_auiCaps[ ( uiCaps >> 24 ) & 0xFF ] & ( uiCaps & 0x00FFFFFF ) ) != 0 ); }
00153 
00158         inline void                                   Set( unsigned int uiCaps ) { m_auiCaps[ ( uiCaps >> 24 ) & 0xFF ] |= ( uiCaps & 0x00FFFFFF ); }
00159 
00164         inline void                                   Reset( unsigned int uiCaps ) { m_auiCaps[ ( uiCaps >> 24 ) & 0xFF ] &= ( ~uiCaps & 0x00FFFFFF ); }
00165 
00169         inline void                                   ResetAll() { memset( m_auiCaps, 0, sizeof( unsigned int ) * 256 ); }
00170 
00175         inline unsigned int                           GetGroupFlags( unsigned int uiGroup ) const { return m_auiCaps[ ( uiGroup >> 24 ) & 0xFF ]; }
00176 
00181         inline RenderCaps                            &operator = ( const RenderCaps &rkCaps ) { fmemcpy( m_auiCaps, rkCaps.m_auiCaps, sizeof( unsigned int ) * 256 ); return( *this ); }
00182 };
00183 
00184 }; // namespace NeoEngine
00185 
00186 
00187 #endif

Generated on Wed Jan 21 14:21:07 2004 for NeoEngine by doxygen 1.3.5