aboutsummaryrefslogtreecommitdiffstats
path: root/lib/wx/c_src/gen/gl_funcs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/wx/c_src/gen/gl_funcs.cpp')
-rw-r--r--lib/wx/c_src/gen/gl_funcs.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/wx/c_src/gen/gl_funcs.cpp b/lib/wx/c_src/gen/gl_funcs.cpp
index ea82635846..30542a0f02 100644
--- a/lib/wx/c_src/gen/gl_funcs.cpp
+++ b/lib/wx/c_src/gen/gl_funcs.cpp
@@ -23,9 +23,10 @@
#include "../egl_impl.h"
#include "gl_fdefs.h"
-int gl_error_op;
+extern gl_fns_t gl_fns[];
+
void egl_dispatch(int op, char *bp, ErlDrvPort port, ErlDrvTermData caller, char *bins[], int bins_sz[]){
- gl_error_op = op;
+ try {
switch(op)
{
case 5000:
@@ -6955,5 +6956,14 @@ case 5863: { // glStencilClearTagEXT
GLuint *stencilClearTag = (GLuint *) bp; bp += 4;
weglStencilClearTagEXT(*stencilTagBits,*stencilClearTag);
}; break;
+}} catch (char *err_msg) {
+int AP = 0; ErlDrvTermData rt[12];
+rt[AP++] = ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_error_");
+rt[AP++] = ERL_DRV_INT; rt[AP++] = (int) op;
+rt[AP++] = ERL_DRV_ATOM; rt[AP++] = driver_mk_atom((char *) err_msg);
+// rt[AP++] = ERL_DRV_ATOM; rt[AP++] = driver_mk_atom((char *) gl_fns[op-GLE_GL_FUNC_START].name);
+// rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;
+rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 3;
+driver_send_term(port,caller,rt,AP);
}} /* The End */