move extensions loading to Aux
This commit is contained in:
1 parent
5e5537aee6
commit
3bcfc32ef1
2 files changed
+7
-3
No files matched your search
@@ -4,6 +4,7 @@
|
||||
// Header
|
||||
|
||||
void *raybriGLLoader(const char *name);
|
||||
void raybriLoadExtensions(void);
|
||||
|
||||
// Source
|
||||
|
||||
@@ -11,6 +12,7 @@ void *raybriGLLoader(const char *name);
|
||||
|
||||
#include <dlfcn.h>
|
||||
#include "raybriConst.h"
|
||||
#include "rlgl.h"
|
||||
#include <stddef.h>
|
||||
|
||||
// raylib is built as a static/dynamic library with GLFW baked in, but we never
|
||||
@@ -30,6 +32,10 @@ void *raybriGLLoader(const char *name) {
|
||||
return dlsym(handle, name);
|
||||
}
|
||||
|
||||
void raybriLoadExtensions(void) {
|
||||
rlLoadExtensions(raybriGLLoader);
|
||||
}
|
||||
|
||||
#endif // RAYBRI_AUX_IMPLEMENTATION
|
||||
|
||||
#endif // RAYBRI_AUX_H
|
||||
@@ -16,9 +16,7 @@ func renderInit(_ vm: RenderVM) {
|
||||
var swapInterval: Int32 = 1
|
||||
vm.glView.openGLContext?.setValues(&swapInterval, for: .swapInterval)
|
||||
|
||||
// Load OpenGL extensions
|
||||
rlLoadExtensions(unsafeBitCast(raybriGLLoader as @convention(c) (UnsafePointer<CChar>?) -> UnsafeMutableRawPointer?, to: UnsafeMutableRawPointer.self))
|
||||
|
||||
raybriLoadExtensions()
|
||||
raybriInit()
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user