00001 //////////////////////////////////////////////////////////////////////////////// 00002 // Scorched3D (c) 2000-2009 00003 // 00004 // This file is part of Scorched3D. 00005 // 00006 // Scorched3D is free software; you can redistribute it and/or modify 00007 // it under the terms of the GNU General Public License as published by 00008 // the Free Software Foundation; either version 2 of the License, or 00009 // (at your option) any later version. 00010 // 00011 // Scorched3D is distributed in the hope that it will be useful, 00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 // GNU General Public License for more details. 00015 // 00016 // You should have received a copy of the GNU General Public License 00017 // along with Scorched3D; if not, write to the Free Software 00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 //////////////////////////////////////////////////////////////////////////////// 00020 00021 #if !defined(__INCLUDE_GLStateExtensionh_INCLUDE__) 00022 #define __INCLUDE_GLStateExtensionh_INCLUDE__ 00023 00024 #include <GLEXT/GLState.h> 00025 00026 class GLStateExtension 00027 { 00028 public: 00029 static void setup(); // Setup and check for each extension 00030 00031 // Use VBO 00032 static bool hasVBO() { return hasVBO_; } 00033 static int getMaxElementVertices() { return maxElementVertices_; } 00034 static int getMaxElementIndices() { return maxElementIndices_; } 00035 // Use MultiTex 00036 static bool hasMultiTex() { return hasMultiTex_; } 00037 // Use framebuffers 00038 static bool hasFBO() { return hasFBO_; } 00039 // User drawrangeelements 00040 static bool hasDrawRangeElements() { return hasDrawRangeElements_; } 00041 // Use tex sub image extension? 00042 static bool getNoTexSubImage() { return noTexSubImage_; } 00043 // Use cube map extension? 00044 static bool hasCubeMap() { return hasCubeMap_; } 00045 // Use sphere map extension? 00046 static bool hasSphereMap() { return hasSphereMap_; } 00047 // Use hardware mipmap extension? 00048 static bool hasHardwareMipmaps() { return hasHardwareMipmaps_; } 00049 // Use env combine 00050 static bool hasEnvCombine() { return envCombine_; } 00051 // How many texture units 00052 static int getTextureUnits() { return textureUnits_; } 00053 // Use FrameBuffer extension 00054 static bool hasHardwareShadows() { return hasHardwareShadows_; } 00055 // Use glBlendColorEXT 00056 static bool hasBlendColor() { return hasBlendColor_; } 00057 // Use shaders 00058 static bool hasShaders() { return hasShaders_; } 00059 00060 protected: 00061 static bool envCombine_; 00062 static bool multiTexDisabled_; 00063 static bool hasVBO_; 00064 static bool hasFBO_; 00065 static bool hasShaders_; 00066 static int textureUnits_; 00067 static int maxElementVertices_; 00068 static int maxElementIndices_; 00069 static bool hasCubeMap_; 00070 static bool hasSphereMap_; 00071 static bool hasHardwareMipmaps_; 00072 static bool noTexSubImage_; 00073 static bool hasHardwareShadows_; 00074 static bool hasBlendColor_; 00075 static bool hasMultiTex_; 00076 static bool hasDrawRangeElements_; 00077 00078 private: 00079 GLStateExtension(); 00080 ~GLStateExtension(); 00081 }; 00082 00083 00084 #endif
1.5.3