2: /* 3: Provides the calling sequences for all the basic PetscDraw routines. 4: */ 5: #include <petsc/private/drawimpl.h> /*I "petscdraw.h" I*/ 7: PETSC_EXTERN PetscErrorCode PetscDrawCreate_TikZ(PetscDraw); 8: #if defined(PETSC_HAVE_X) 9: PETSC_EXTERN PetscErrorCode PetscDrawCreate_X(PetscDraw); 10: #endif 11: #if defined(PETSC_HAVE_GLUT) 12: PETSC_EXTERN PetscErrorCode PetscDrawCreate_GLUT(PetscDraw); 13: #endif 14: #if defined(PETSC_HAVE_OPENGLES) 15: PETSC_EXTERN PetscErrorCode PetscDrawCreate_OpenGLES(PetscDraw); 16: #endif 17: PETSC_EXTERN PetscErrorCode PetscDrawCreate_Null(PetscDraw); 18: #if defined(PETSC_USE_WINDOWS_GRAPHICS) 19: PETSC_EXTERN PetscErrorCode PetscDrawCreate_Win32(PetscDraw); 20: #endif 22: PetscBool PetscDrawRegisterAllCalled; 26: /*@C 27: PetscDrawRegisterAll - Registers all of the graphics methods in the PetscDraw package. 29: Not Collective 31: Level: developer 33: .seealso: PetscDrawRegisterDestroy() 34: @*/ 35: PetscErrorCode PetscDrawRegisterAll(void) 36: { 40: if (PetscDrawRegisterAllCalled) return(0); 41: PetscDrawRegisterAllCalled = PETSC_TRUE; 43: PetscDrawRegister(PETSC_DRAW_TIKZ, PetscDrawCreate_TikZ); 44: #if defined(PETSC_HAVE_OPENGLES) 45: PetscDrawRegister(PETSC_DRAW_OPENGLES, PetscDrawCreate_OpenGLES); 46: #endif 47: #if defined(PETSC_HAVE_GLUT) 48: PetscDrawRegister(PETSC_DRAW_GLUT, PetscDrawCreate_GLUT); 49: #endif 50: #if defined(PETSC_HAVE_X) 51: PetscDrawRegister(PETSC_DRAW_X, PetscDrawCreate_X); 52: #elif defined(PETSC_USE_WINDOWS_GRAPHICS) 53: PetscDrawRegister(PETSC_DRAW_WIN32, PetscDrawCreate_Win32); 54: #endif 55: PetscDrawRegister(PETSC_DRAW_NULL, PetscDrawCreate_Null); 56: return(0); 57: }