Cross-Platform OpenGL Windowing Library
リビジョン | 40079ca56ff9ac7bdf2be09ff1a270f3229b19e1 (tree) |
---|---|
日時 | 2018-11-12 06:49:48 |
作者 | AlaskanEmily <emily@alas...> |
コミッター | AlaskanEmily |
Add GetProcAddress function
@@ -117,6 +117,14 @@ GLOW_EXPORT void Glow_ViewportSize(unsigned w, unsigned h, | ||
117 | 117 | GLOW_EXPORT void *Glow_GetSystemWindow(struct Glow_Window *window); |
118 | 118 | |
119 | 119 | /** |
120 | + * @brief Gets an extension function address. | |
121 | + * | |
122 | + * Note that is NOT guaranteed to return NULL for a missing function. | |
123 | + * Use glGetString(GL_EXTENSIONS) to determine if an extension is present. | |
124 | + */ | |
125 | +GLOW_EXPORT void *Glow_GetProcAddress(const char *name); | |
126 | + | |
127 | +/** | |
120 | 128 | * @brief Gets the size of the Window struct. |
121 | 129 | * |
122 | 130 | * You must allocate the memory for windows on the application side. This will |
@@ -257,6 +257,12 @@ void Glow_ViewportSize(unsigned w, unsigned h, | ||
257 | 257 | |
258 | 258 | /******************************************************************************/ |
259 | 259 | |
260 | +void *Glow_GetProcAddress(const char *name){ | |
261 | + return (void*)wglGetProcAddress(name); | |
262 | +} | |
263 | + | |
264 | +/******************************************************************************/ | |
265 | + | |
260 | 266 | void Glow_CreateWindow(struct Glow_Window *out, |
261 | 267 | unsigned w, unsigned h, const char *title, int flags){ |
262 | 268 |
@@ -108,6 +108,12 @@ void Glow_ViewportSize(unsigned w, unsigned h, | ||
108 | 108 | |
109 | 109 | /******************************************************************************/ |
110 | 110 | |
111 | +void *Glow_GetProcAddress(const char *name){ | |
112 | + return (void*)glXGetProcAddress((GLubyte*)name); | |
113 | +} | |
114 | + | |
115 | +/******************************************************************************/ | |
116 | + | |
111 | 117 | void Glow_CreateWindow(struct Glow_Window *window, |
112 | 118 | unsigned w, unsigned h, const char *title, int flags){ |
113 | 119 |