Skip to content

Commit 31a95ff

Browse files
committed
removed ogl creation hooks
1 parent 5db1e77 commit 31a95ff

File tree

4 files changed

+1
-16
lines changed

4 files changed

+1
-16
lines changed

example/main.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ int main() {
4747
}
4848

4949
// use GLAD to load OpenGL functions
50-
// if you are using WXGL this is not required
51-
// as then this function is called from within winxOpen()
5250
gladLoadGL();
5351

5452
// init OpenGL example

winx.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -230,11 +230,6 @@ bool winxOpen(int width, int height, const char* title) {
230230
// set vsync
231231
winxSetVsync(__winx_hint_vsync);
232232

233-
// call creation hook
234-
#ifdef WINX_CREATION_HOOK
235-
WINX_CREATION_HOOK;
236-
#endif
237-
238233
return true;
239234
}
240235

@@ -668,11 +663,6 @@ bool winxOpen(int width, int height, const char* title) {
668663
ShowWindow(winx->hndl, 1);
669664
UpdateWindow(winx->hndl);
670665

671-
// call creation hook
672-
#ifdef WINX_CREATION_HOOK
673-
WINX_CREATION_HOOK;
674-
#endif
675-
676666
return true;
677667
}
678668

wxgl/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ WXGL is a single-header library made from combining WINX and GLAD, to use WXGL f
33

44
- Go to https://glad.dav1d.de and generate GLAD zip file. **Important**: Select the "Local Files" checkbox at the bottom of the page!
55

6-
- Run `python3 generate.py --glad "/path/to/your/glad.zip"` from the `./wxgl` directory.
6+
- Run `python3 generate.py --glad "/path/to/your/glad.zip"` from the `./wxgl` directory.
77

88
The `wxgl.c` and `wxgl.h` files should have been generated in the `wxgl` directory, now you can take them and use anywhere! **Note**: The `wxgl.c` has to be compiled with the `-ldl -lGL -lX11` options on Linux and `-lopengl32 -lgdi32` on Windows.
99

10-
Advantage of doing this is an even further simplification of the process of starting a new OpenGL project. **Note**: When using WXGL you don't need to call `gladLoadGL()` this is now done from within `winxOpen()`.

wxgl/template/wxgl.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,5 @@
1212
#include "wxgl.h"
1313
#undef WXGL_EXPOSE_WINX
1414

15-
#define WINX_CREATION_HOOK gladLoadGL()
16-
1715
//REPLACE_WINX_SOURCE//
1816

0 commit comments

Comments
 (0)