1 ////////////////////////////////////////////////////////////////////////////////
2 // Scorched3D (c) 2000-2003
4 // This file is part of Scorched3D.
6 // Scorched3D is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; either version 2 of the License, or
9 // (at your option) any later version.
11 // Scorched3D is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License
17 // along with Scorched3D; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 ////////////////////////////////////////////////////////////////////////////////
21 #if !defined(__INCLUDE_GLStateExtensionh_INCLUDE__)
22 #define __INCLUDE_GLStateExtensionh_INCLUDE__
24 #include <GLEXT/GLState.h>
26 class GLStateExtension
29 static void setup(); // Setup and check for each extension
32 static bool hasVBO() { return hasVBO_
; }
33 static int getMaxElementVertices() { return maxElementVertices_
; }
34 static int getMaxElementIndices() { return maxElementIndices_
; }
36 static bool hasMultiTex() { return hasMultiTex_
; }
38 static bool hasFBO() { return hasFBO_
; }
39 // User drawrangeelements
40 static bool hasDrawRangeElements() { return hasDrawRangeElements_
; }
41 // Use tex sub image extension?
42 static bool getNoTexSubImage() { return noTexSubImage_
; }
43 // Use cube map extension?
44 static bool hasCubeMap() { return hasCubeMap_
; }
45 // Use sphere map extension?
46 static bool hasSphereMap() { return hasSphereMap_
; }
47 // Use hardware mipmap extension?
48 static bool hasHardwareMipmaps() { return hasHardwareMipmaps_
; }
50 static bool hasEnvCombine() { return envCombine_
; }
51 // How many texture units
52 static int getTextureUnits() { return textureUnits_
; }
53 // Use FrameBuffer extension
54 static bool hasHardwareShadows() { return hasHardwareShadows_
; }
55 // Use glBlendColorEXT
56 static bool hasBlendColor() { return hasBlendColor_
; }
58 static bool hasShaders() { return hasShaders_
; }
61 static bool envCombine_
;
62 static bool multiTexDisabled_
;
65 static bool hasShaders_
;
66 static int textureUnits_
;
67 static int maxElementVertices_
;
68 static int maxElementIndices_
;
69 static bool hasCubeMap_
;
70 static bool hasSphereMap_
;
71 static bool hasHardwareMipmaps_
;
72 static bool noTexSubImage_
;
73 static bool hasHardwareShadows_
;
74 static bool hasBlendColor_
;
75 static bool hasMultiTex_
;
76 static bool hasDrawRangeElements_
;