]> git.tdb.fi Git - libs/gl.git/blob - source/extension.h
Add support for detecting extensions
[libs/gl.git] / source / extension.h
1 /* $Id$
2
3 This file is part of libmspgl
4 Copyright © 2007  Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
6 */
7
8 #ifndef MSP_GL_EXTENSION_H_
9 #define MSP_GL_EXTENSION_H_
10
11 #include <msp/core/except.h>
12
13 namespace Msp {
14 namespace GL {
15
16 typedef void ExtFunc();
17
18 /**
19 Indicates whether an extension is supported.  If this returns true, the
20 functions of that extension are safe to use.
21 */
22 bool is_supported(const std::string &);
23
24 /**
25 Checks that an extension is supported and throws if it isn't.
26 */
27 void require_extension(const std::string &);
28
29 /**
30 Returns the address of an extension function.
31 */
32 ExtFunc *get_proc_address(const std::string &);
33
34 } // namespace GL
35 } // namespace Msp
36
37 #endif