Android support, attempt-1 #8

Open
kornerr wants to merge 62 commits from and1 into master
pull from: and1
2 changed files with 7 additions and 3 deletions
Showing only changes of commit 3bcfc32ef1 - Show all commits

No files matched your search

+6
View File
@@ -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
+1 -3
View File
@@ -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()
}