• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

タグ
未設定

よく使われているワード(クリックで追加)

javaandroidc++linuxc#windowsobjective-ccocoaqtpython誰得phprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Cross-Platform OpenGL Windowing Library


コミットメタ情報

リビジョン40079ca56ff9ac7bdf2be09ff1a270f3229b19e1 (tree)
日時2018-11-12 06:49:48
作者AlaskanEmily <emily@alas...>
コミッターAlaskanEmily

ログメッセージ

Add GetProcAddress function

変更サマリ

差分

--- a/glow.h
+++ b/glow.h
@@ -117,6 +117,14 @@ GLOW_EXPORT void Glow_ViewportSize(unsigned w, unsigned h,
117117 GLOW_EXPORT void *Glow_GetSystemWindow(struct Glow_Window *window);
118118
119119 /**
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+/**
120128 * @brief Gets the size of the Window struct.
121129 *
122130 * You must allocate the memory for windows on the application side. This will
--- a/glow_win32.c
+++ b/glow_win32.c
@@ -257,6 +257,12 @@ void Glow_ViewportSize(unsigned w, unsigned h,
257257
258258 /******************************************************************************/
259259
260+void *Glow_GetProcAddress(const char *name){
261+ return (void*)wglGetProcAddress(name);
262+}
263+
264+/******************************************************************************/
265+
260266 void Glow_CreateWindow(struct Glow_Window *out,
261267 unsigned w, unsigned h, const char *title, int flags){
262268
--- a/glow_x11.c
+++ b/glow_x11.c
@@ -108,6 +108,12 @@ void Glow_ViewportSize(unsigned w, unsigned h,
108108
109109 /******************************************************************************/
110110
111+void *Glow_GetProcAddress(const char *name){
112+ return (void*)glXGetProcAddress((GLubyte*)name);
113+}
114+
115+/******************************************************************************/
116+
111117 void Glow_CreateWindow(struct Glow_Window *window,
112118 unsigned w, unsigned h, const char *title, int flags){
113119