From c51d64f228e975d3395b13a47691faad18918de1 Mon Sep 17 00:00:00 2001 From: masscat Date: Fri, 20 Apr 2007 12:42:58 +0000 Subject: [PATCH] Added platform function for gl flushing/buffer switching to allow double buffering or similar. --- desmume/src/opengl_collector_3Demu.h | 34 +++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/desmume/src/opengl_collector_3Demu.h b/desmume/src/opengl_collector_3Demu.h index f13177f37..d10c37d09 100644 --- a/desmume/src/opengl_collector_3Demu.h +++ b/desmume/src/opengl_collector_3Demu.h @@ -1,4 +1,4 @@ -/* $Id: opengl_collector_3Demu.h,v 1.1 2007-04-17 16:47:11 masscat Exp $ +/* $Id: opengl_collector_3Demu.h,v 1.2 2007-04-20 12:42:58 masscat Exp $ */ #ifndef _OPENGL_COLLECTOR_3DEMU_H_ #define _OPENGL_COLLECTOR_3DEMU_H_ 1 @@ -25,9 +25,41 @@ extern GPU3DInterface gpu3D_opengl_collector; +/** + * This is called before a set of OpenGL functions are called. + * It is up to the platform code to switch to the correct context and similar. + * + * If the platform code is unsucessful then return 0 and the OpenGL functions + * will not be called. Return 1 otherwise. + * + * If this is not overridden then the call will always fail. + */ extern int (*begin_opengl_ogl_collector_platform)( void); + +/** + * This is called after a set of OpenGL functions have been called, marking + * the end the OpenGL calls. + * + * If not overridden this function will do nothing. + */ extern void (*end_opengl_ogl_collector_platform)( void); + +/** + * This is called during the OpenGL Collector's initialisation. + * + * If the platform code is unsucessful then return 0 and the initialisation + * will fail. Return 1 otherwise. + * + * If this is not overridden then the call will always fail. + */ extern int (*initialise_ogl_collector_platform)( void); +/** + * This is called when all the OpenGL functions comprising a single set + * have been called. + * + * If this is not overridden then a call to glFlush() is made. + */ +extern void (*complete_render_ogl_collector_platform)( void); #endif /* End of _OPENGL_COLLECTOR_3DEMU_H_ */