diff options
author | Michael Lutz <michi@icosahedron.de> | 2021-01-16 16:43:05 +0100 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2021-02-22 22:16:07 +0100 |
commit | d7b96a424fdd939aa7de65153e3b9baa20edf626 (patch) | |
tree | 2ba9d0a6a4425b86903ba515557b391273ef9cea /src/video/opengl.h | |
parent | ef478ade649add1ab1706370ff53bcb0c32798d1 (diff) | |
download | openttd-d7b96a424fdd939aa7de65153e3b9baa20edf626.tar.xz |
Codechange: [OpenGL] Use new-style extension testing introduced with OpenGL 3.0.
Diffstat (limited to 'src/video/opengl.h')
-rw-r--r-- | src/video/opengl.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/video/opengl.h b/src/video/opengl.h index 9db1be5f5..08ef56b9a 100644 --- a/src/video/opengl.h +++ b/src/video/opengl.h @@ -14,7 +14,12 @@ #include "../core/alloc_type.hpp" -/** Platform-independent back-end singleton class for OpenGL video drivers. */ +typedef void (*OGLProc)(); +typedef OGLProc (*GetOGLProcAddressProc)(const char *proc); + +bool IsOpenGLVersionAtLeast(byte major, byte minor); + +/** Platform-independent back-end class for OpenGL video drivers. */ class OpenGLBackend : public ZeroedMemoryAllocator { private: static OpenGLBackend *instance; ///< Singleton instance pointer. @@ -33,7 +38,7 @@ public: { return OpenGLBackend::instance; } - static const char *Create(); + static const char *Create(GetOGLProcAddressProc get_proc); static void Destroy(); bool Resize(int w, int h, bool force = false); |