Skip to content

Commit

Permalink
Style.
Browse files Browse the repository at this point in the history
  • Loading branch information
skaslev committed Jul 20, 2017
1 parent 7d4be93 commit ceb3ba0
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions gl3w_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,15 @@ def write(f, s):
#define __gl_h_
#endif
#ifdef __cplusplus
extern "C" {
#endif
#define GL3W_OK 0
#define GL3W_ERROR_INIT -1
#define GL3W_ERROR_LIBRARY_OPEN -2
#define GL3W_ERROR_OPENGL_VERSION -3
#ifdef __cplusplus
extern "C" {
#endif
typedef void (*GL3WglProc)(void);
typedef GL3WglProc (*GL3WGetProcAddressProc)(const char *proc);
Expand Down Expand Up @@ -254,7 +254,6 @@ def write(f, s):
return GL3W_ERROR_LIBRARY_OPEN;
*(void **)(&glx_get_proc_address) = dlsym(libgl, "glXGetProcAddressARB");
return GL3W_OK;
}
Expand Down Expand Up @@ -300,14 +299,13 @@ def write(f, s):
int gl3wInit2(GL3WGetProcAddressProc proc)
{
int ret = open_libgl();
if (!ret) {
atexit(close_libgl);
load_procs(proc);
return parse_version();
}
return ret;
int res = open_libgl();
if (res)
return res;
atexit(close_libgl);
load_procs(proc);
return parse_version();
}
int gl3wIsSupported(int major, int minor)
Expand Down

0 comments on commit ceb3ba0

Please sign in to comment.