about summary refs log tree commit diff stats
path: root/src/include
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2023-03-05 15:09:11 +0100
committerptitSeb <sebastien.chev@gmail.com>2023-03-05 15:09:11 +0100
commitf9bc94bfb8529c6b10c989ad3a355498a72d7f85 (patch)
tree0925bfbe5acffb73cff63fbc54724ecd9937cbe8 /src/include
parent72119ddfa449bdfc98c7152653047f34feca332c (diff)
downloadbox64-f9bc94bfb8529c6b10c989ad3a355498a72d7f85.tar.gz
box64-f9bc94bfb8529c6b10c989ad3a355498a72d7f85.zip
Refactored OpenGL symbol fetching and managment
Diffstat (limited to 'src/include')
-rwxr-xr-xsrc/include/box64context.h5
-rw-r--r--src/include/gltools.h12
-rwxr-xr-xsrc/include/library.h4
3 files changed, 13 insertions, 8 deletions
diff --git a/src/include/box64context.h b/src/include/box64context.h
index 3e55ff44..010521e8 100755
--- a/src/include/box64context.h
+++ b/src/include/box64context.h
@@ -34,7 +34,7 @@ typedef struct kh_dynablocks_s  kh_dynablocks_t;
 #endif
 #define DYNAMAP_SHIFT 16
 
-typedef void* (*procaddess_t)(const char* name);
+typedef void* (*procaddress_t)(const char* name);
 typedef void* (*vkprocaddess_t)(void* instance, const char* name);
 
 #define MAX_SIGNAL 64
@@ -114,9 +114,6 @@ typedef struct box64context_s {
     uintptr_t           vsyscall;       // vsyscall bridge value
     uintptr_t           vsyscalls[3];   // the 3 x86 VSyscall pseudo bridges (mapped at 0xffffffffff600000+)
     dlprivate_t         *dlprivate;     // dlopen library map
-    kh_symbolmap_t      *glwrappers;    // the map of wrapper for glProcs (for GLX or SDL1/2)
-    kh_symbolmap_t      *glmymap;       // link to the mysymbolmap of libGL
-    procaddess_t        glxprocaddress;
     kh_symbolmap_t      *alwrappers;    // the map of wrapper for alGetProcAddress
     kh_symbolmap_t      *almymap;       // link to the mysymbolmap if libOpenAL
     kh_symbolmap_t      *vkwrappers;    // the map of wrapper for VulkanProcs (TODO: check SDL2)
diff --git a/src/include/gltools.h b/src/include/gltools.h
new file mode 100644
index 00000000..07bd74f7
--- /dev/null
+++ b/src/include/gltools.h
@@ -0,0 +1,12 @@
+#ifndef __GL_TOOLS_H__
+#define __GL_TOOLS_H__
+
+typedef struct box64context_s box64context_t;
+
+typedef void* (*glprocaddress_t)(const char* name);
+
+void freeGLProcWrapper(box64context_t* context);
+
+void* getGLProcAddress(x64emu_t* emu, glprocaddress_t procaddr, const char* rname);
+
+#endif //__GL_TOOLS_H__
\ No newline at end of file
diff --git a/src/include/library.h b/src/include/library.h
index 48200a9e..afe108e7 100755
--- a/src/include/library.h
+++ b/src/include/library.h
@@ -28,10 +28,6 @@ int IsSameLib(library_t* lib, const char* path);    // check if lib is same (pat
 int GetLibGlobalSymbolStartEnd(library_t* lib, const char* name, uintptr_t* start, uintptr_t* end, size_t size, int* weak, int version, const char* vername, int local);
 int GetLibWeakSymbolStartEnd(library_t* lib, const char* name, uintptr_t* start, uintptr_t* end, size_t size, int* weak, int version, const char* vername, int local);
 int GetLibLocalSymbolStartEnd(library_t* lib, const char* name, uintptr_t* start, uintptr_t* end, size_t size, int* weak, int version, const char* vername, int local);
-void fillGLProcWrapper(box64context_t* context);
-void freeGLProcWrapper(box64context_t* context);
-void fillALProcWrapper(box64context_t* context);
-void freeALProcWrapper(box64context_t* context);
 char** GetNeededLibsNames(library_t* lib);
 int GetNeededLibsN(library_t* lib);
 library_t* GetNeededLib(library_t* lib, int idx);