mirror of
https://github.com/geode-sdk/geode.git
synced 2025-03-26 04:39:51 -04:00
add some opengl functions here, for now
This commit is contained in:
parent
19b0f72634
commit
e7e5ee7f26
2 changed files with 15 additions and 0 deletions
loader
|
@ -149,6 +149,11 @@ if (APPLE)
|
|||
file(COPY ${GEODE_LOADER_PATH}/include/link/libfmod.dylib DESTINATION ${GEODE_BIN_PATH}/nightly)
|
||||
endif()
|
||||
|
||||
if (ANDROID)
|
||||
# needed to define some opengl functions
|
||||
target_link_libraries(${PROJECT_NAME} EGL)
|
||||
endif()
|
||||
|
||||
target_include_directories(${PROJECT_NAME} PRIVATE
|
||||
src/
|
||||
src/loader/
|
||||
|
|
|
@ -5,7 +5,17 @@
|
|||
#include "../load.hpp"
|
||||
#include <jni.h>
|
||||
|
||||
// idk where to put this
|
||||
#include <EGL/egl.h>
|
||||
PFNGLGENVERTEXARRAYSOESPROC glGenVertexArraysOESEXT = 0;
|
||||
PFNGLBINDVERTEXARRAYOESPROC glBindVertexArrayOESEXT = 0;
|
||||
PFNGLDELETEVERTEXARRAYSOESPROC glDeleteVertexArraysOESEXT = 0;
|
||||
|
||||
extern "C" [[gnu::visibility("default")]] jint JNI_OnLoad(JavaVM* vm, void* reserved) {
|
||||
glGenVertexArraysOESEXT = (PFNGLGENVERTEXARRAYSOESPROC)eglGetProcAddress("glGenVertexArraysOES");
|
||||
glBindVertexArrayOESEXT = (PFNGLBINDVERTEXARRAYOESPROC)eglGetProcAddress("glBindVertexArrayOES");
|
||||
glDeleteVertexArraysOESEXT = (PFNGLDELETEVERTEXARRAYSOESPROC)eglGetProcAddress("glDeleteVertexArraysOES");
|
||||
|
||||
geodeEntry(nullptr);
|
||||
return JNI_VERSION_1_1;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue