From 9badd2dd42298b551287ec5d13fd935b67211f80 Mon Sep 17 00:00:00 2001 From: damdoum Date: Wed, 7 Feb 2007 12:08:19 +0000 Subject: [PATCH] preparing for gl manipulations --- desmume/src/GPU.c | 11 +++++++++++ desmume/src/GPU.h | 5 +++++ 2 files changed, 16 insertions(+) diff --git a/desmume/src/GPU.c b/desmume/src/GPU.c index 850bd145a..774b0f9c4 100644 --- a/desmume/src/GPU.c +++ b/desmume/src/GPU.c @@ -110,6 +110,17 @@ GraphicsInterface_struct *GFXCoreList[] = { NULL }; +BOOL _fun_gl_Begin (int screen) { return FALSE; } +void _fun_gl_End (int screen) { } + +fun_gl_Begin Open_GL_beg = _fun_gl_Begin; +fun_gl_End Open_GL_end = _fun_gl_End; + +void register_gl_fun(fun_gl_Begin beg,fun_gl_End end) { + Open_GL_beg = beg; + Open_GL_end = end; +} + /*****************************************************************************/ // INITIALIZATION diff --git a/desmume/src/GPU.h b/desmume/src/GPU.h index bb836c3f1..ee7927401 100644 --- a/desmume/src/GPU.h +++ b/desmume/src/GPU.h @@ -44,6 +44,11 @@ extern "C" { #define max(a,b) (((a)>(b))?(a):(b)) #endif +typedef BOOL (*fun_gl_Begin) (int screen); +typedef void (*fun_gl_End) (int screen); +// the GUI should use this function prior to all gl calls +// if call to beg succeeds opengl draw +void register_gl_fun(fun_gl_Begin beg,fun_gl_End end); #define GPU_MAIN 0 #define GPU_SUB 1