ntdll: Make sure we don't try to attach the main exe a second time.
[wine/zf.git] / dlls / opengl32 / opengl_ext.h
blobfc67cab1a6758774d8eabe9b521cc755eb61e7ed
1 /* Typedefs for extensions loading
3 Copyright (c) 2000 Lionel Ulmer
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef __DLLS_OPENGL32_OPENGL_EXT_H
20 #define __DLLS_OPENGL32_OPENGL_EXT_H
22 #include "windef.h"
23 #include "winbase.h"
24 #include "wingdi.h"
25 #include "wine/wgl.h"
26 #include "wine/wgl_driver.h"
28 typedef struct {
29 const char *name; /* name of the extension */
30 const char *extension; /* name of the GL/WGL extension */
31 void *func; /* pointer to the Wine function for this extension */
32 } OpenGL_extension;
34 extern const OpenGL_extension extension_registry[] DECLSPEC_HIDDEN;
35 extern const int extension_registry_size DECLSPEC_HIDDEN;
36 extern struct opengl_funcs null_opengl_funcs DECLSPEC_HIDDEN;
38 static inline struct opengl_funcs *get_dc_funcs( HDC hdc )
40 struct opengl_funcs *funcs = __wine_get_wgl_driver( hdc, WINE_WGL_DRIVER_VERSION );
41 if (!funcs) SetLastError( ERROR_INVALID_HANDLE );
42 else if (funcs == (void *)-1) funcs = &null_opengl_funcs;
43 return funcs;
46 #endif /* __DLLS_OPENGL32_OPENGL_EXT_H */